User Tools

Site Tools


getting_started:write_app:use_on_bbb

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
Last revisionBoth sides next revision
getting_started:write_app:use_on_bbb [2021/03/31 09:42] – [Say Hello with EEROS] ursgrafgetting_started:write_app:use_on_bbb [2023/04/12 15:44] – [Say Hello with EEROS] ursgraf
Line 1: Line 1:
 ====== Writing EEROS Applications for Beaglebone Blue Board ====== ====== Writing EEROS Applications for Beaglebone Blue Board ======
 Back to [[getting_started:install:use_on_bbb|]]. Back to [[getting_started:install:use_on_bbb|]].
 +
 +You will use C++ to develop your EEROS applications. For this you need at least some knowledge of the basic language features. A good starting point might be [[https://www.cplusplus.com/doc/tutorial/]]. Minimal help can also be found under [[tools:cplusplus|]].
  
 What do you want to do next? What do you want to do next?
Line 9: Line 11:
 ===== Say Hello with EEROS ===== ===== Say Hello with EEROS =====
  
-  - Fetch the [[https://github.com/eeros-project/eeros-build-scripts.git|EEROS scripts]] on your host and checkout the branch for the Beaglebone Blue <code> 
-$ git clone https://github.com/eeros-project/eeros-build-scripts.git eeros-project 
-$ cd eeros-project 
-$ git checkout sdk_bbb 
-</code> 
-  - Edit the file ''config.sh.in'' as follows <code> 
-custom_application=hello 
-</code> 
   - Create a project directory and change into it with <code>   - Create a project directory and change into it with <code>
 $ mkdir hello $ mkdir hello
Line 38: Line 32:
 </code> </code>
   - Create a text file "CMakeLists.txt" and copy the following text into it: <code cpp>   - Create a text file "CMakeLists.txt" and copy the following text into it: <code cpp>
-cmake_minimum_required(VERSION 3.5.1)+cmake_minimum_required(VERSION 3.10)
 project(helloworld) project(helloworld)
  
 set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
- 
 find_package(EEROS REQUIRED) find_package(EEROS REQUIRED)
-include_directories(${EEROS_INCLUDE_DIR}) 
-link_directories(${EEROS_LIB_DIR}) 
  
 add_executable(helloworld main.cpp) add_executable(helloworld main.cpp)
-target_link_libraries(helloworld eeros ucl ${CMAKE_DL_LIBS})+target_link_libraries(helloworld PRIVATE eeros)
 </code>  </code> 
-  - Change back into your parent directory and build the project with <code> +  - Create a build directory and change into it with <code> 
-cd .. +mkdir build-armhf 
-./make.sh+cd build-armhf 
 </code> </code>
-  - Make changes to "main.cpp"save them and rebuild with <code> +  - Source the script for the SDK which has been installed in [[getting_started:install:use_on_bbb#Install_SDK_on_the_Host|Install SDK on the Host]] with <code> 
-$ ./make.sh+$ . ~/ost-devel/1.0/environment-setup-cortexa8hf-neon-poky-linux-gnueabi 
 +</code> This step has to be done only onceHoweveryou have to repeat it as soon as you open another shell. 
 +  - Build the project with <code> 
 +cmake .. 
 +$ make
 </code> </code>
- +  - Make changes to "main.cpp", save them and rebuild with <code> 
-In order to be able to write your own EEROS programs, you could use any text editor. However, we recommend to use an integrated development environment, see [[getting_started:kdevelop|]].+$ make 
 +</code> In order to be able to write your own EEROS programs, you could use any text editor. However, we recommend to use an integrated development environment, see [[getting_started:kdevelop|]].
  
 Continue with [[getting_started:deploy:deploy_bbb|]]. Continue with [[getting_started:deploy:deploy_bbb|]].
Line 64: Line 60:
 ===== Use Existing Project ===== ===== Use Existing Project =====
 As an example we use the [[getting_started:tutorials:oneaxis|]] demo program. As an example we use the [[getting_started:tutorials:oneaxis|]] demo program.
-  - Edit the file ''config.sh.in'' as follows <code> +  - Clone the code for the project and change into the directory <code> 
-custom_application=simple-motor-control+$ git clone https://github.com/eeros-project/simple-motor-control.git 
 +$ cd simple-motor-control
 </code> </code>
-  - Fetch the code of the application with <code> +  - Create a build directory and change into it with <code> 
-./clone.sh+mkdir build-armhf 
 +$ cd build-armhf 
 </code> </code>
   - Build the project with <code>   - Build the project with <code>
-$ ./make.sh+cmake -DUSE_BBBLUE=TRUE .. 
 +$ make
 </code> </code>
  
 Continue with [[getting_started:deploy:deploy_bbb|]]. Continue with [[getting_started:deploy:deploy_bbb|]].
getting_started/write_app/use_on_bbb.txt · Last modified: 2023/04/12 15:45 by ursgraf