User Tools

Site Tools


getting_started:install_and_setup_development_environment:use_with_cb20

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
getting_started:install_and_setup_development_environment:use_with_cb20 [2019/10/11 15:52] grafgetting_started:install_and_setup_development_environment:use_with_cb20 [2021/02/26 11:39] ursgraf
Line 1: Line 1:
 ====== Use on a cb20 Board ====== ====== Use on a cb20 Board ======
-The following is a step-by-step procedure to get started using EEROS on the [[https://wiki.ntb.ch/infoportal/embedded_systems/imx6/cb#cb20_board|cb20 Board]]. It describes how to set up the cross development tool chain. The application is developed on a Linux host machine and can then be deployed to the board+The following is a step-by-step procedure to get started using EEROS on the [[https://wiki.ntb.ch/infoportal/embedded_systems/imx6/cb#cb20_board|cb20 Board]]. It describes how to set up the SDK. The application is developed on a Linux host machine and can then be deployed to the board.
- +
-As cross tool chain, the **arm-linux-gnueabihf-gcc-4.9** is needed. It is recommended to use a Ubuntu 16.04 as host operating system, since this packet is available in the default repositories. +
-If a Linux host is used in a virtual machine, a [[https://lubuntu.net/downloads/|lightweight Ubuntu distribution]] is recommended. In case you are using a newer Ubuntu version, you have to add //xenial// to your sources list, see [[https://askubuntu.com/questions/1036108/install-gcc-4-9-at-ubuntu-18-04]].+
  
 +  - Get an suitable image for your target platform from [[https://wiki.bu.ost.ch/infoportal/software/linux/images/start|Linux Images]] and install it on your target system, see [[https://wiki.bu.ost.ch/infoportal/software/linux/toradex/toradex-easy-installer]].
 +  - Get the associated SDK from [[https://wiki.bu.ost.ch/infoportal/software/linux/images/start|Linux Images]]
 +  - Unpack it on your host system with <code>$ tar -vxJf ntb-dev-image-bblue-2020.02.21-sdk.tar.xz</code>
 +  - Change into the sdk directory and execute the script therein with <code>$ cd sdk
 +$ ./tdx-xwayland-glibc-x86_64-ntb-ros-image-melodic-armv7at2hf-neon-cb20-toolchain-5.0.0.sh</code> 
 Fetch the [[https://github.com/eeros-project/eeros-build-scripts.git|EEROS scripts]] on your cross development system with Fetch the [[https://github.com/eeros-project/eeros-build-scripts.git|EEROS scripts]] on your cross development system with
 <code> <code>
-$ git clone https://github.com/eeros-project/eeros-build-scripts.git eeros-project +$ git clone https://github.com/eeros-project/eeros-build-scripts.git cb20 
-$ cd eeros-project+$ cd cb20
 </code> </code>
 Edit the file ''config.sh.in'' as follows Edit the file ''config.sh.in'' as follows
 <code> <code>
 use_simulator=false use_simulator=false
-use_flink=false +use_flink=true 
-use_bbblue=true+use_bbblue=false
 use_comedi=false use_comedi=false
 use_ros=false use_ros=false
 +use_can=false
 use_custom_application=true use_custom_application=true
-</code> +use_cross_compilation_environment=true 
-Now you can run the ''clone'' script  +use_ros_setup_script=false
-<code> +
-$ ./clone.sh+
 </code> </code>
  
-The library for the roboticscape must be compiled manuallyThough the library is already on the target, we must also have it on the host, in order to be able to link an application.  +The entry ''use_cross_compilation_environment'' ensures that you compile using an SDK built for the target platformMake sure to install the SDK by 
-At the time of writing, the BeagleBone Blue Boards are shipped with an image that has the robotics cape library version 0.3.4 installedTherefore, it is highly recommended to use this version. The bbblue-eeros wrapper library was implemented to work with the robotics cape library v0.3.4. Newer version were not tested yet. The right version is checked out by the clone script+  * downloading the SDK from [[https://wiki.bu.ost.ch/infoportal/software/linux/images/start|Linux Images]]  
 +  * installing the SDK as described in [[https://wiki.bu.ost.ch/infoportal/software/linux/toradex/toradex-sdk]]
  
-To compile the library, change into:+Edit the file ''config.sh.in'' as follows
 <code> <code>
-$ cd robotics_cape_installer/libraries+environment_setup_script=/opt/tdx-xwayland/5.0.0/environment-setup-armv7at2hf-neon-tdx-linux-gnueabi
 </code> </code>
-and edit the ''Makefile'' thereinChange the following to lines from  +This will guide your make script to use the SDKMake sure that the above path matches your installation path.
-<code> +
-CC := gcc +
-LINKER := gcc +
-</code> +
-to +
-<code> +
-CC := arm-linux-gnueabihf-gcc-4.9 +
-LINKER := arm-linux-gnueabihf-gcc-4.9 +
-</code> +
-This change is necessary because the library must be compiled with the cross compiler.+
  
-Nowthe cross tool chain is installed on the host machine with the following command. +If you want to use CANchoose 
-<code> +
-$ sudo apt-get install g++-4.9-arm-linux-gnueabihf +
-</code> +
-Then, the roboticscape library is compiled using make.+
 <code> <code>
-$ make+use_can=true
 </code> </code>
  
-Change back into your project directory and start the compilation of EEROS, the hardware wrapper library, and the demo application with+Setting the entry ''use_custom_application'' to //true// will fetch an existing application from a git repository. Per default this will will be [[https://github.com/eeros-project/simple-motor-control.git]]. Howeveryou could choose another repository in ''config.sh.in''. Or you could set the entry to //false// if you want to develop your own application. \\ 
 +Now you can run the ''clone'' script 
 <code> <code>
-$ ./make.sh+$ ./clone.sh
 </code> </code>
  
-Finally, load the executable onto the target (see notes below if you are doing this on a brand new board) with+After this you can continue with [[getting_started:compile_eeros|]]. 
 + 
 + 
 +==== Test Application ==== 
 + 
 +There is a test application for the cb20 board in [[https://github.com/ntb-ch/cb20.git]] under the directory ///Software//. If you wish to use this you can alter ''config.sh.in'' as follows
 <code> <code>
-$ ./deploy.sh +use_custom_application=true 
-</code> +custom_application_name=cb20test 
-The default password on the BeagleBone Blue Board is "temppwd". Edit the ''deploy.txt'' file to define which files are downloaded. \\ +</code>   
-Use ssh to get on the target and change into ''/opt/eeros/bin''+and further down
-Start the demo application with +
 <code> <code>
-$ sudo ./demo -c HwConfigBBBlue.json +custom_application_git_remote_address=https://github.com/ntb-ch/cb20.git 
-</code>+custom_application_git_version=master
  
-Now, everything is ready. The development can be started in the **BeagleBoneBlue/demoApp/** folder.+custom_application_source_dir="$wd/$custom_application_name/Software/$custom_application_name" 
 +custom_application_build_dir="$build_dir/$custom_application_name" 
 +</code>  
  
-==== Notes ==== +Now you can run the ''clone'' script 
-When the BeagleBone Blue Board is used the first time (never used with EEROS before or a brand new BeagleBone Blue / Image), some initial setup steps are needed. The script **deploy.sh** will copy the executable and libraries to **/opt/eeros**. Therefore, this folder must be present on the target or the copy fails. To create the folder, execute the following on the BeagleBone:+
 <code> <code>
-debian@beaglebone:sudo mkdir /opt/eeros +./clone.sh
-debian@beaglebone:$ sudo chown debian:debian /opt/eeros/+
 </code> </code>
  
-Also, some links must be created. The system must find the eeros libraries to dynamically load them. The following symbolic links are needed: +After this you can continue with [[getting_started:compile_eeros|]]
-<code> +
-debian@beaglebone:$ cd /usr/lib/ +
-debian@beaglebone:$ sudo ln -s /opt/eeros/lib/libbbblueeeros.so.1.0.0.0 libbbblueeeros.so.1.0.0.0 +
-debian@beaglebone:$ sudo ln -s libbbblueeeros.so.1.0.0.0 libbbblueeeros.so +
-debian@beaglebone:$ sudo ln -s /opt/eeros/lib/libeeros.so.1.0.0.0 libeeros.so.1.0.0.0 +
-debian@beaglebone:$ sudo ln -s libeeros.so.1.0.0.0 libeeros.so +
-</code> +
-Make sure the version information (....so.1.0.0.0) is not outdated! This can be checked by browsing the **BeagleBoneBlue/install-armhf/lib/** folder.+