Armadillo240 is a compact CPU board that can be mounted on Linux with ARM, which is sold from At Mark Techno. Three development tools from Atmark Techno, Inc., ATDE2 (Atmark Techno Development Environment), GNU cross development tool, AtmarkDist are provided, which makes cross development easy.
In this example, we will cross-develop the executable file of the RT component that can be executed by Armadillo. After that, after starting Armadillo, create an image file (romfs: root file system) that the RT component automatically starts up.
Create an executable file of RT component that can be executed by Armadillo by cross-compiling. The development environment of Armadillo series is distributed from Atmark Techno, Inc. as a VM image, and necessary tools for cross development environment are pre-installed.
Unzip ATDE2-20071018.zip, double click on ATDE2.vmx in the folder you unzipped, or select ATDE2.vmx from ATDE2-20071018 in the folder extracted from file > Open of VMware.
ATDE2 already has a cross-compiling environment, but it is necessary to prepare an environment that allows cross-development of RT component of OpenRTM. On the started ATDE2 download the following source and shell script and place it in the appropriate working directory under the home directory.
deb http://downloads.pylone.jp/cross-toolchain/deb ./ deb http://www.openrtm.org/pub/Linux/debian/ etch main
# apt-get update # apt-get install python-yaml (Please enter yes or Y to complete the installation.)
# sh arm-cross-install.sh (Please enter yes or Y to complete the installation.)
# apt-get install gdm (Please enter yes or Y to complete the installation.) # /etc/init.d/gdm start
Deploy the OpenRTM-aist-0.4.2 source code to a suitable directory such as home directory. After deployment, go to the created directory.
# tar zxvf OpenRTM-aist-0.4.2.tar.gz # cd OpenRTM-aist-0.4.2
# cp ../config.sh ./ # sh config.sh/usr/arm-linux-gnu
# make
OpenRTM-aist-0.4.2/rtm OpenRTM-aist-0.4.2/rtm/idl OpenRTM-aist-0.4.2/utils/rtm-config OpenRTM-aist-0.4.2/utils/rtm-naming OpenRTM-aist-0.4.2/utils/rtc-template
# make install
With this, the environment for cross development of the RT component is in place. Here, as an example, try cross-compiling using the source of SeqOutComp included in the sample.
> export PATH=/usr/arm-linux-gnu/bin:$PATH
Create a suitable directory to create the sample and copy the following files contained in the OpenRTM sample SeqOut source into it.
SeqOutComp.cpp SeqOut.h SeqOut.cpp Makefile.SeqOut
> mkdir test > cp (installation directory)/OpenRTM-aist-0.4.2/examples/SeqIO/SeqOutComp.cpp ./test/
We create a component called SeqOutComp with eight OutPorts.
Please check the contents of the generated Makefile.SeqOut. If there is no line beginning with CXX =, you need to specify the cross compiler for the compiler as follows.
Set environment variable and make make
> CXX=arm-linux-gnu-g++ make -f Makefile.SeqOut
> export CXX=arm-linux-gnu-g++ > make -f Makefile.SeqOut
When make completes normally, SeqOutComp executable file is generated.
Copy cross-developed executable files, libraries, etc. to USB memory and start up on Armadillo240.
Copy and generate the files necessary for executing the RT component on the Armadillo240 to the USB memory.
In this example, we use SeqOutComp that we cross-compiled earlier. Copy SeqOutComp to the appropriate location (such as the root directory) of the USB memory.
Of the libraries in this directory, copy the following to the USB memory. Create a directory lib to place the library in the USB memory.
>mkdir lib or For the GUI, right click to create a folder
When copying the library of /usr/arm-linux-gnu/lib, change the name as follows.
Library name | After changing library name |
libomniDynamic4.so.0.6 | libomniDynamic4.so.0 |
libomniORB4.so.0.6 | libomniORB4.so.0 |
libomnithread.so.3.1 | libomnithread.so.3 |
libRTC - 0.4.2 .so.0.0.4 | libRTC - 0.4.2.so.0 |
librt.so.1 | librt.so.1 (no change) |
libACE.so.5.4.7 | libACE.so.5.4.7 (no change) |
Library name | After changing library name |
libm -2.3.6.so | libm.so.6 |
libomiDynamic4.so.0.6 | libomniDynamic4.so.0 |
libomnithread.so.3.1 | libomnithread.so.3 |
librt.so.1 | librt.so.1 (no change) |
libRTC - 1.0.0 .so.0.0.4 | libRTC - 1.0.0.so.0 |
libstdc ++. so.6.0.8 | libstdc ++. so.6 |
libuuid.so.1.2 | libuuid.so.1 |
Since Armadillo does not start the name server, please start the name server on another PC. For the option of corba.nameservers in rtc.conf, specify the address of the PC that started the name server.
corba.nameservers: 192.168.100.1 (Enter the IP address of your name server) naming.formats:% n.rtc
If it is not mounted automatically, use the su command on VMware (ATDE2) terminal to become root and mount again.
> su # mkdir /mnt/(suitable directory) # mount - t vfat/dev/sdb1/mnt/(directory created above)
If the USB memory icon is displayed on the Desktop, right click> unmount it. &br; Or you can unmount it with the command from the console. &br; # umount /mnt/(the directory created above)
After preparing the USB memory, the USB memory has the directory structure as shown below.
USB memory -+- lib --+- libomniDynamic4.so.0 | +- libomniORB4.so.0 | +- libomnithread.so.3 | +- libRTC-0.4.2.so.0 | +- librt.so.1 | +- libACE.so.5.4.7 | +- SeqOutComp | +- rtc.conf
USB memory -+- lib --+- libm.so.6 | +- libomniDynamic4.so.0 | +- ibomnithread.so.3 | +- librt.so.1 | +- libRTC-1.0.0.so.0 | +- libstdc++.so.6 | +- libuuid.so.1 | +- SeqOutComp | +- rtc.conf
Change the USB memory mount setting and library PATH setting, and move the executable file. You can operate Linux on Armadillo by connecting the PC and Armadillo with a serial cable and logging in from Linux serial console on Armadillo. Please proceed with the following easy method.
From ATDE2, operate with terminal emulator program minicom. Connect the serial port of the PC and the serial port of Armadillo with a serial cable. For a PC without a serial port, you need to use a USB-serial conversion cable or the like. Refer to the Armadillo manual for how to connect the Armadillo serial cable.
Configure the VMware virtual machine's device as follows.
Menu bar > VM > Settings > Hardware tag
Please check the connection check.
Check the device status and check the port using Connection> Physical Serial Port. Start the terminal emulator minicom from the terminal of ATDE2.
> minicom
You can also connect to Armadillo's serial console from Windows using a terminal emulator such as TeraTerm. TeraTerm can be downloaded for free from here. Please start with the following setting.
When starting with the above setting, the login screen of Armadillo240 will be displayed. If it is not displayed, press Enter. Please proceed to the common operation after that.
Please plug the USB memory into Armadillo. Please log in as root (password: root) on Armadillo login screen. The default mount is an option (umous=111), which permission setting any user can not execute.
Once unmounted, it will be remounted with the -o rw option that can be written and executed.
# umount/dev/sda1 # mount - t vfat - o rw /dev/sda1/home/www-data/storage/
# su guest > cd /home/www-data/storage
> export LD_LIBRARY_PATH = $ {LD_LIBRARY_PATH}:/home/www-data/storage/ > ./SeqOutComp (executable file was executed)
You can also check from RtcLink.
In this method, you have to modify the setting every time you start Armadillo. In the next chapter, after Armadillo starts, it creates an image file that the RT component automatically starts and downloads it to Armadillo.
With the previous method, it is necessary to change the setting with the terminal emulator every time Armadillo starts up. In this case, use atmark-dist provided by AtmarkTechno, Inc, create an image file that RT component automatically starts after Armadillo240 start up, and download it to Armadillo.
Use the environment of ATDE2 cross-compiled RT component as it is. Please download the following items on ATDE2.
Here, we will create an image file of userland of Armadillo. By using the image file created here, you can start RT Component that was previously installed in USB memory automatically.
#!bin/sh . /etc/default/openrtm.conf export LD_LIBRARY_PATH=$LIBPATH:/home/openrtm/lib/ /home/openrtm/SeqOutComp(Execution file name) -f /home/openrtm/rtc.conf
Please download atmark-dist and linux kernel, openrtm.patch on ATDE2 and expand it.
> tar zxvf atmark-dist - 20090318.tar.gz > tar zxvf linux - 2.6.12.3 - a9 - 15. tar.gz
> ln -s ../linux-2.6.12.3-a9-15 ./linux-2.6.x
> make config Select the Vendor you wish to target: Atmarktechno (input) Select the product you wish to target: Armadillo-240.Recover (input) Kernel is linux - 2.6.x: default (even with enter) defined CONFIG_DEFAULTS_CROSSDEV_DEFAULT: none (also OK) Default all settings: y (input) Customize Kernel Settings: n (even enter) Customize Vendor / User Settings: n (even enter) Update Default Vendor Settings: n (also OK, end)
Copy openrtm.patch and apply the patch as follows.
> cp openrtm.patch /atmark-dist-YYYYMMDD/vendor/AtmarkTechno/Armadillo-240.Recover/openrtm.patch > cd /atmark-dist-YYYYMMDD/vendor/AtmarkTechno/Armadillo-240.Recover/ > patch -p1 <openrtm_new.patch (Patch finished)
> cd ../../../ > make dep all
/bin/sh: extensions/.dccp-test: No permission /bin/sh: extensions/.layer 7-test: No permission /bin/sh: extensions/.statistic-test: No permission make[2]: Enter directory `/home/atmark/Desktop/foratde/forkernel/atmark-dist-200807 17/user/iptables' romfs-inst.sh /bin/iptables romfs-inst.sh -l /bin/iptables/bin/iptables-save Accessing ln: `/bin/iptables': No such file or directory romfs-inst.sh -l /bin/iptables/bin/iptables-restore Accessing ln: `/bin/iptables': No such file or directory
> ls images linux.bin linux.bin.gz romfs.img romfs.img.gz
Download the generated userland image file romfs.img.gz to Armadillo240. Armadillo short the jumper pin (2), please turn on the power (Armadillo Hardware Manual please refer to p.16)
You can download from either VMware (ATDE2) or Windows.
Here to configure the device of VMware virtual machine before proceeding.
> hermit download - i images/romfs.img.gz - r userland - port/dev/ttyUSB 0 (or /dev/ttyS0)
serial: completed 0x004455fd (4478461) bytes. (Completed)
Please put downloader > win32 > Hermit.zip of CD-ROM bundled with Armadillo240 on Widows.
Start RTCLink and confirm start of RT component.
> su # /etc/init.d/omniorb4-nameserver start
Combined with Armadillo and Hokuyo Electric URG sensor, it is a unit to easily construct a distributed sensor system. The URG sensor RT component works on Armadillo. (RTC starts automatically at the same time as Armadillo power is turned on.) By using Armadillo compatible with PoE (Power over Ether), communication and power supply are possible only with the LAN cable. The URG sensor also operates with power supply from PoE. Sensor arrangement is possible with only one cable, so you can easily construct a distributed sensor system.