User Tools

Site Tools


getting_started:deploy:deploy_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
getting_started:deploy:deploy_cb20 [2021/03/24 11:47] ursgrafgetting_started:deploy:deploy_cb20 [2023/04/13 11:21] (current) – [Deploying] ursgraf
Line 2: Line 2:
 Back to [[getting_started:write_app:use_on_cb20|]]. Back to [[getting_started:write_app:use_on_cb20|]].
  
-The file ''config.sh.in'' contains entries for the destination of deploying. Set these entries to +===== Preparations ===== 
-<code> + 
-target_IP_address=es140.ntb.ch      // use appropriate ip number or name +Fetch the [[https://github.com/eeros-project/eeros-build-scripts.git|EEROS scripts]] in your project root directory on your host and checkout the branch for the cb20 board <code> 
-target_username=ost                 // use appropriate user name +$ git clone https://github.com/eeros-project/eeros-build-scripts.git 
-target_application_folder=/opt/eeros+$ cd eeros-build-scripts 
 +$ git checkout sdk_cb20
 </code> </code>
-Now, make sure that the directory /opt/eeros/ exists on the targetIf not, ssh into the board, mount the read-only file system as read-write, create the directory, and set its ownership to user //toradex// with + 
 +The file ''config.sh.in'' contains entries for the destination of deploying.
 <code> <code>
-$ sudo mount -o remount,rw +target_IP_address=146.136.100.8      // use appropriate ip number or name 
-$ sudo mkdir /opt/eeros +target_username=ost       
-$ sudo chown ost:ost /opt/eeros+target_application_folder=/home/ost
-</code>  +</code>
-Next, edit ''deploy.txt'' in your project directory and enter all the programs and libraries you have to transfer. +
-<code> +
-install-armhf/lib/libeeros.so.1.2.0.0 +
-install-armhf/lib/libflinkeeros.so.1.0.0.0 +
-install-armhf/lib/libflink.so+
  
-build-armhf/simple-motor-control/HwConfigFlink.json +===== Deploying =====
-build-armhf/simple-motor-control/simpleMotorControl+
  
-build-armhf/flinklib/utils/flinkanalogoutput +Next, edit ''deploy.txt'' on the host in your project directory and enter the application program you want to transfer together with the necessary hardware configuration file, e.g. 
-build-armhf/flinklib/utils/flinkdio +<code> 
-build-armhf/flinklib/utils/flinkcounter+../simple-motor-control/build-armhf/simpleMotorControl 
 +../simple-motor-control/build-armhf/HwConfigBBBlue.json
 </code> </code>
-The flink utilities are only used for testing the experimental setup as given in [[getting_started:tutorials:oneaxis_cb20|]]. \\ +If you wrote your own [[getting_started:write_app:use_on_cb20#Say Hello with EEROS|]] the file would look like
-If you did not include the application [[https://github.com/eeros-project/simple-motor-control.git]] you have to alter the middle two lines and set the entries according to your needs. E.g. if you wrote your own [[getting_started:say_hello|]] the file would look like+
 <code> <code>
-install-armhf/lib/libeeros.so.1.2.0.0 +../hello/build-armhf/helloworld
- +
-build-armhf/helloworld+
 </code> </code>
-Obviously, this application does not make use of a hardware configuration file. 
  
 Finally, load them onto the target with Finally, load them onto the target with
Line 41: Line 34:
 </code> </code>
  
-===== CANopen ===== +===== Running your Application===== 
-If you have configured you EEROS project with CANopen, the library will have been fetched and compiled automaticallyIt will have been statically linked to your appplication and there is no need to transfer is to the target.+ssh into the board with <code> 
 +$ ssh ost@es140.ntb.ch 
 +</code> 
 +For credentials see [[https://wiki.bu.ost.ch/infoportal/software/linux/yocto/cb20#Accessing_the_cb20|cb20]]
  
 +Change into your target application folder and run the example <code>
 +$ cd bin
 +$ ./helloworld
 +or
 +$ sudo ./simpleMotorControl -c HwConfigBBBlue.json
 +</code>
  
-===== Set Library Links ===== +===== Running your Application which is a ROS Node =====
-The system must find the eeros and hardware wrapper libraries to dynamically load them. The following symbolic links must be created once.+
  
-<code> +Be sure to setup your network settings according to [[getting_started:ros_run#network_setup|Network Setup]]. Set the environment variable ''ROS_MASTER_URI'' in your shell with <code> 
-ntb@cb20:$ cd /usr/lib/ +export ROS_MASTER_URI=http://192.168.7.3:11311
-ntb@cb20:$ sudo ln -s /opt/eeros/lib/libflink.so libflink.so +
-ntb@cb20:$ sudo ln -s /opt/eeros/lib/libflinkeeros.so.1.0.0.0 libflinkeeros.so.1.0.0.0 +
-ntb@cb20:$ sudo ln -s libflinkeeros.so.1.0.0.0 libflinkeeros.so +
-ntb@cb20:$ sudo ln -s /opt/eeros/lib/libeeros.so.1.2.0.0 libeeros.so.1.2.0.0 +
-ntb@cb20:$ sudo ln -s libeeros.so.1.2.0.0 libeeros.so+
 </code> </code>
-IMPORTANT Make sure the version information (....so.1.2.0.0) is not outdated! If you use newer versions of the libraries as given in ''deploy.txt'' you must adapt the links accordingly.+Add the following line to your ''/etc/hosts'' file (under Ubuntu) <code> 
 +192.168.7.2  cb20 
 +</code> 
 + 
 +Run your application with <code> 
 +$ sudo -E ./application 
 +</code> 
 + 
 +===== Running the Built-in Examples of EEROS ===== 
 + 
 +Running the built-in examples of EEROS as given in the tutorial pages in [[getting_started:tutorials:start|]] is quite simple, e.g. <code> 
 +$ sudo /usr/examples/rtTest/rtTest 
 +</code> 
 + 
 + 
 +===== flink ===== 
 + 
 +The flink utilities can be used for testing the experimental setup as given in [[getting_started:tutorials:oneaxis_cb20|]]. \\ 
 + 
 +===== CANopen ===== 
 +Make sure to fetch the CANopen library, see [[https://github.com/eeros-project/eeros-build-scripts]]. The library has to be compiled and linked statically to your application. There is no need to transfer is to the target separately. 
  
  
getting_started/deploy/deploy_cb20.1616582861.txt.gz · Last modified: 2021/03/24 11:47 by ursgraf