User Tools

Site Tools


application

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
application [2019/04/03 09:12] finkapplication [2019/07/09 14:56] (current) – removed graf
Line 1: Line 1:
-======== Write your own application ======== 
-As descriped in [[http://hw.eeros.org/eeduro/setup#import_a_eeros_project|Setup your environment -> Import an EEROS project]] you can create your own applications. \\ 
-  - Start KDevelop  
-  - Project -> Open/Import project 
-  - Navigate to the BeagleBoneBlue/myApp folder and choose the CMakeLists.txt file 
  
-Now you have the main.cpp, CMakeLists.txt and the HwConfigBBBlue.json file in your project solution. \\ 
-Copy the following code into main.cpp 
-<code> 
-#include <iostream> 
-#include <eeros/logger/Logger.hpp> 
-#include <eeros/logger/StreamLogWriter.hpp> 
-   
-int main() { 
-using namespace eeros::logger; 
-  
-   StreamLogWriter w(std::cout); 
-   Logger log; 
-   log.set(w); 
-   
-   log.info() << "Hello, EEROS"; 
-   
-   return 0; 
-} 
-</code> 
- 
-Open CMakeLists.txt file, and copy the following code 
-<code> 
-cmake_minimum_required(VERSION 2.8) 
-   
-project(test-project) 
- 
-find_package(EEROS REQUIRED) 
-include_directories(${EEROS_INCLUDE_DIR};${EEROS_LIBUCL_INCLUDE_DIR}) 
-link_directories(${EEROS_LIB_DIR};${EEROS_LIBUCL_LINK_DIR}) 
-  
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 
-  
-add_executable(test-project main.cpp) 
- 
-target_link_libraries(test-project eeros ucl ${CMAKE_DL_LIBS}) 
-</code> 
- 
-Build the project by clicking the build-button in the top left corner. \\ 
-Change the deploy.txt file to match your project- and application-name 
-<code> 
-//remove comments when copy paste 
-Install-armhf/lib/libeeros.so.0.0.0.0      // the eeros library for the target 
-Install-armhf/lib/libbbblueeeros.so    // the beagle bone blue wrapper forh the eeros library 
-myApp/HwConfigBBBlue.json    // the hardware configuration file 
-build-armhf/myApp/test-project             // the application 
-</code> 
-Deploy your application with the deploy.sh shellscript and run the application on the target. 
application.1554275560.txt.gz · Last modified: 2019/04/03 09:12 by fink