getting_started:write_app:use_on_cb20
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
getting_started:write_app:use_on_cb20 [2021/03/24 11:51] – created ursgraf | getting_started:write_app:use_on_cb20 [2021/03/25 16:28] – [Test Application] ursgraf | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Writing EEROS Applications for cb20 Board ====== | ====== Writing EEROS Applications for cb20 Board ====== | ||
- | Back to [[getting_started: | + | Back to [[getting_started: |
- | Edit the file '' | + | What do you want to do next? |
- | < | + | |
- | use_simulator=false | + | |
- | use_flink=true | + | |
- | use_bbblue=false | + | |
- | use_comedi=false | + | |
- | use_ros=false | + | |
- | use_can=false | + | |
- | use_custom_application=true | + | |
- | use_cross_compilation_environment=true | + | |
- | use_ros_setup_script=false | + | |
- | </ | + | |
- | The entry '' | + | |
- | | + | * [[getting_started:write_app: |
- | * installing the SDK as described in [[https:// | + | |
- | Edit the file '' | + | ===== Say Hello with EEROS ===== |
- | < | + | - Edit the file '' |
- | environment_setup_script=/ | + | custom_application=hello |
</ | </ | ||
- | This will guide your make script to use the SDK. Make sure that the above path matches your installation path. | + | - Create a project directory and change into it with < |
+ | $ mkdir hello | ||
+ | $ cd hello | ||
+ | </ | ||
+ | - Create a text file "main.cpp" and copy the following code into it <code cpp> | ||
+ | #include < | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | int main() { | ||
+ | using namespace eeros:: | ||
+ | |||
+ | Logger:: | ||
+ | Logger log = Logger:: | ||
+ | |||
+ | log.info() << " | ||
- | If you want to use CAN, choose | + | return 0; |
- | < | + | } |
- | use_can=true | + | |
</ | </ | ||
+ | - Create a text file " | ||
+ | cmake_minimum_required(VERSION 3.5.1) | ||
+ | project(helloworld) | ||
- | Setting the entry '' | + | set(CMAKE_CXX_STANDARD 14) |
- | Now you can run the '' | + | |
- | < | + | find_package(EEROS REQUIRED) |
+ | include_directories(${EEROS_INCLUDE_DIR}) | ||
+ | link_directories(${EEROS_LIB_DIR}) | ||
+ | |||
+ | add_executable(helloworld main.cpp) | ||
+ | target_link_libraries(helloworld eeros ucl ${CMAKE_DL_LIBS}) | ||
+ | </code> | ||
+ | - Change back into your parent directory and build the project with < | ||
+ | $ cd .. | ||
+ | $ ./make.sh | ||
+ | </ | ||
+ | |||
+ | Continue with [[getting_started:deploy: | ||
+ | |||
+ | ===== Use Existing Project ===== | ||
+ | As an example we use the [[getting_started: | ||
+ | - Edit the file '' | ||
+ | custom_application=simple-motor-control | ||
+ | </code> | ||
+ | - Fetch the code of the application with < | ||
$ ./clone.sh | $ ./clone.sh | ||
</ | </ | ||
+ | - Build the project with < | ||
+ | $ ./make.sh | ||
+ | </ | ||
+ | |||
+ | Continue with [[getting_started: | ||
+ | |||
+ | |||
- | After this you can continue with [[getting_started: | ||
Line 43: | Line 73: | ||
There is a test application for the cb20 board in [[https:// | There is a test application for the cb20 board in [[https:// | ||
< | < | ||
- | use_custom_application=true | ||
custom_application_name=cb20test | custom_application_name=cb20test | ||
</ | </ | ||
Line 55: | Line 84: | ||
</ | </ | ||
- | Now you can run the '' | + | After this you continue |
- | < | + | |
- | $ ./ | + | |
- | </ | + | |
- | + | ||
- | After this you can continue | + | |
getting_started/write_app/use_on_cb20.txt · Last modified: 2024/06/13 13:54 by ursgraf