Template:DebianVM Development: Difference between revisions
Ageisreiter (talk | contribs) |
|||
Line 137: | Line 137: | ||
::Folder "<code>'''/usr/bin'''</code>" | ::Folder "<code>'''/usr/bin'''</code>" | ||
::Prefix type "<code>'''arm-linux-gnueabi-'''</code>" | ::Prefix type "<code>'''arm-linux-gnueabi-'''</code>" | ||
== Use Virtualbox instead of VMware Player/Workstation == | |||
[[media:DHCOM_HAL.zip| VMware Machine mit VirtualBox starten (German)]] | |||
== Code Examples for Userspace-Applications to Access SPI, I2C, GPIOs, and more == | == Code Examples for Userspace-Applications to Access SPI, I2C, GPIOs, and more == |
Revision as of 07:08, 17 May 2017
Introduction
For cross developing of applications we provide virtual machines with preinstalled toolchains. Choose the virtual machine which fits to your DHCOM target (Debian 8 on target -> Debian 8 virtual machine). Debian 8 does include support for architecture armhf and armel (Debian 6 only armel). By default Debian 8 is configured for armhf. The sections Code Examples for Userspace-Applications to Access SPI, I2C, GPIOs, and more and Booting via NFS apply for Debian 6 and Debian 8.
Debian 8 "Jessie" VMware Image
Get the virtual machine
- Get the VMware player
- Debian 8 "Jessie" VMware Image
Password for devel user: devel
Password for root user: root
Version: | File: | Changes: |
---|---|---|
v1.2 | Debian Jessie v1.2.zip | - Debian Security updates - Qt Creator + Support for imx6 modules + Demos - Update elbe to v1.0 - Add some tools / editors |
v1.1 | Debian Jessie v1.1.zip | - Compatibility VMware player 6.0 |
v1.0 | Debian Jessie v1.0.zip | - New Debian 8 VM |
Installed Toolchains
Debian Multiarch Cross Toolchain
Both armhf and armel Cross Toolchains are preinstalled. They should be used for cross development of native Linux applications. They are downloaded and installed with the Debian Package Manager.
- armhf: arm-linux-gnueabihf-
- armel: arm-linux-gnueabi-
Install directory is /usr/bin/. Please have a look at the preconfigured Examples for cross development using the Eclipse IDE.
Linaro GCC 4.9 armhf
Used for building the Linux Kernel for our ARMv7 DHCOM devices.
- armhf: arm-linux-gnueabihf-
Install directory is /opt/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/. Please refere the section "Linux Kernel" for the matching DHCOM device.
CodeSourcery GCC 4.5 armel
Used for building the Linux Kernel for our ARMv5 DHCOM devices.
- armel: arm-none-linux-gnueabi-
Install directory is /opt/CodeSourcery-2011.03-41/bin/. Please refere the section "Linux Kernel" for the matching DHCOM device.
Qt5 Development
Qt5.5.1 prebuilt and preinstalled
We provide the prebuilt Qt5.5.1 libraries including WebEngine (only QtQuick) and WebKit in /work/qt5/sysroot/. This directory contains a Debian 8 based rootfilesystem which is prepared for DHCOM i.MX6, the matching sysroot (*-dev packages), and the Qt5.5.1 libraries installed.
Qt5.7.1
We support the latest Qt5.7.1 on our DHCOM i.MX6 and DHCOM am335x. Please download and install the qmake-sysroot-mx6-crossarmhf_5.7.1-1.0 or qmake-sysroot-am33-crossarmhf_5.7.1-1.0 package to the DebianVM:
- open a terminal
- # for i.MX6: wget https://dl.dropboxusercontent.com/u/19433555/DHCOM/imx6/qmake-sysroot-mx6-crossarmhf_5.7.1-1.0_amd64.deb
- # for AM335x: wget https://dl.dropboxusercontent.com/u/19433555/DHCOM/am335x/qmake-sysroot-am33-crossarmhf_5.7.1-1.0_amd64.deb
- install the package
- # sudo dpkg -i qmake-sysroot-mx6-crossarmhf_5.7.1-1.0_amd64.deb
- now the sysroot and qmake is ready to use
- path to qmake is /work/qt5_mx6_armhf/sysroot/usr/local/qt5.7.1/bin/qmake
Build a Qt5 Application via console
- open a terminal
- navigate to your Qt5 sources
- # /work/qt5/sysroot/usr/local/qt5.5.1/bin/qmake your_own_app.pro
- # make
Qt Creator
- Start Qt Creator IDE
- Open demo project TwoLED: /work/qt5_Demos/TwoLED
- There you can find the configurations for your own project.
Booting via TFTP/NFS
Prepare the virtual machine
- Setup nfs-kernel-server
- Install thf nfs server:
$ sudo apt-get install nfs-kernel-server
- Create a nfsservice directory:
$ mkdir /work/nfsroot
- Place the root file system in the folder
$ cd /work/nfsroot; sudo tar xf jessie....tar.gz
- Remove network config from rootfs
$ rm /work/nfsroot/etc/systemd/network/wired-dhcp.network
- Check whether the line below is part of the /etc/exports file
/work/nfsroot X.X.X.0/255.255.255.0(rw,no_root_squash,no_subtree_check,insecure)
- The X must be substituted by our network settings
- Restart the nfs-server with
4 /etc/init.d/nfs-kernel-server restart
- Install thf nfs server:
- Setup tftp-hpa server
- Install a tftp server :
$ sudo apt-get install tftpd-hpa
- Create a tftp service directory:
$ mkdir /work/tftp
- Edit config:
$ sudo vi /etc/default/tftpd-hpa
- Take care that TFTP_DIRECTORY points to your tftp service directory, for example '/work/tftp'
- Copy Kernel and DeviceTree into the tftp service directory
- Restart the tftp-server with
$ /etc/init.d/tftp-hpa restart
- Install a tftp server :
Setup the DHCOM Module for TFTP/NFS Boot
This example works with static IP addresses and is tested with DHCOM i.MX6 U-Boot 2015.10 and Kernle 4.4.38. It is possible to work with DHCP, too. For further information see https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt
- Enter U-Boot console by pressing DEL/BACKSPACE on a RS232 terminal while switching on the power supply of the target
- Set IP addresses
# env set serverip 192.168.178.90 # env set ipaddr 192.168.178.91 |
- bootargs for nfs root
# env set rootfs 'root=/dev/nfs nfsroot=192.168.178.90:/work/nfsroot/ ip=192.168.178.91:192.168.178.90::255.255.255.0:dhcom:eth0:none' |
- load Linux kernel and devicetree with tftp (change filename and path to match you setup)
# tftp ${loadaddr} zImage # tftp ${fdt_addr} dtbs/imx6dl-dhcom3B-pdk2.dtb |
- set bootargs and boot
# run linuxargs # bootz ${loadaddr} - ${fdt_addr} |
- optional: save it to be permanent
# env set bootcmd 'tftp ${loadaddr} zImage; tftp ${fdt_addr} dtbs/imx6dl-dhcom3B-pdk2.dtb; run linuxargs; bootz ${loadaddr} - ${fdt_addr} # env save |
Debian 6 "Squeeze" VMware Image
Get the virtual machine
- Get the VMware player
- Debian Squeeze VMware Image (PW: dhelectronics)
Password for devel user: devel
Password for root user: root
Version: | File: | Changes: |
---|---|---|
v1.5 | Debian Squeeze v1.5pw.zip | - Update VMware Tools<br\>- DH UBI-Tools<br\>- Language: English<br\>- System updates |
v1.4 | Debian Squeeze v1.4pw.zip | - ELBE v0.3.1<br\>- ELDK 4.2<br\>- Qt Creator 2.6.1 + Qt target libs 4.7.2<br\>- System updates |
v1.3 | Debian Squeeze v1.3.zipx | - Mono 2.10<br\>- mtd-utils<br\>- System updates |
v1.2 | Debian Squeeze v1.2.zipx | - Emdebian Toolchain gcc 4.3 / g++ 4.3 (arm-linux-gnueabi-... )<br\>- TortoiseHg + TortoiseHg for Nautilus<br\>- Add Plugin "REST Client" in Iceweasel
|
v1.1 | Debian Squeeze v1.1.zipx | - Update Eclipse Indigo with CDT 8.0<br\>- Add demo project "crosshelloworld" |
v1.0 | Debian Squeeze.zipx | - First Release<br\>- CodeSourcery Toolchain (arm-none-linux-gnueabi-... )<br\>- Eclipse Helios & Indigo
|
Setting up a Eclipse Cross Executable Project:
- Use Eclipse Indigo (version 3.7.1) for your project.
- Create a new C++ Project and choose as Executable Project type Cross-Compile Project and as Toolchains Cross GCC
- Click the Button "Next" and specify under Tool command path the Toolchain path.
- CodeSourcery:
- Folder "
/opt/CodeSourcery/Sourcery_G++_Lite/bin
" - Prefix type "
arm-none-linux-gnueabi-
"
- Emdebian Toolchain:
- Folder "
/usr/bin
" - Prefix type "
arm-linux-gnueabi-
"
Use Virtualbox instead of VMware Player/Workstation
VMware Machine mit VirtualBox starten (German)
Code Examples for Userspace-Applications to Access SPI, I2C, GPIOs, and more
- The following code samples are designed to get you started quickly with the device interfaces to SPI, I2C, GPIOs and more in Linux userspace applications.
- Within Eclipse you can Import the provided projects:
- Execute ">File>Import ..."
- Navigate to ">General>Existing Projects into Workspace" within the import dialog
- Follow the dialog until you have finished.
Download Code Examples SPI, I2C, GPIOs and more
Included Demos:
- SPI
- I2C
- GPIO
- RTC
- UART
- Watchdog
- ADC (only for i.MX25)
Download C++ HAL class library for SPI, I2C, GPIO, UART and physical address space access
- For further documentation have a look at http://www.kernel.org/doc/Documentation/.