User Tools

Site Tools


getting_started:write_app:use_on_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:write_app:use_on_cb20 [2021/03/31 10:19] – [Writing EEROS Applications for cb20 Board] ursgrafgetting_started:write_app:use_on_cb20 [2023/04/12 16:04] – [Test Application] ursgraf
Line 10: Line 10:
  
 ===== Say Hello with EEROS ===== ===== Say Hello with EEROS =====
-  - 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 34: 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>
 +  - 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>
 +$ . ~/ost-devel/tdx-xmayland/5.1.0/environment-setup-armv7at2hf-neon-tdx-linux-gnueabi
 +</code> This step has to be done only once. However, you have to repeat it as soon as you open another shell.
 +  - Build the project with <code>
 +$ cmake ..
 +$ make
 +</code>
 +  - Make changes to "main.cpp", save them and rebuild with <code>
 +$ 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_cb20|]]. Continue with [[getting_started:deploy:deploy_cb20|]].
Line 71: Line 76:
  
  
-==== 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> 
-custom_application_name=cb20test 
-</code>   
-and further down 
-<code> 
-custom_application_git_remote_address=https://github.com/ntb-ch/cb20.git 
-custom_application_git_version=master 
- 
-custom_application_source_dir="$wd/$custom_application_name/Software/$custom_application_name" 
-custom_application_build_dir="$build_dir/$custom_application_name" 
-</code>   
- 
-After this you continue as given above in [[getting_started:write_app:use_on_cb20#Use Existing Project|]]. 
  
getting_started/write_app/use_on_cb20.txt · Last modified: 2024/06/13 13:54 by ursgraf