Initial Linux support including execution shell
Uncomment the following line in setup.mk and comment out the line above
to enable the Linux build.
export PX4_TARGET_OS = linux
The build uses the clang compiler by default. The final bundled executable
is mainapp located in:
Build/linux_default.build/mainapp
When you run mainapp it will provide a list of the built-in apps. You can
type in the commands to run such as:
hello_main start
Because the Linux build is threaded and does not support tasks or processes,
it cannot call errx, exit() _exit(), etc. It also requires unique scoped
variables to test if a thread is running or if an application should exit.
The px4::AppMgr class was added in px4_app.h for this purpose. The
hello sample app demonstrates how this is used.
Signed-off-by:
Mark Charlebois <charlebm@gmail.com>
Showing
- Tools/linux_apps.py 84 additions, 0 deletionsTools/linux_apps.py
- makefiles/linux/config_linux_default.mk 15 additions, 20 deletionsmakefiles/linux/config_linux_default.mk
- makefiles/module.mk 1 addition, 0 deletionsmakefiles/module.mk
- makefiles/setup.mk 2 additions, 2 deletionsmakefiles/setup.mk
- src/platforms/linux/hello/hello_example.cpp 61 additions, 0 deletionssrc/platforms/linux/hello/hello_example.cpp
- src/platforms/linux/hello/hello_example.h 53 additions, 0 deletionssrc/platforms/linux/hello/hello_example.h
- src/platforms/linux/hello/hello_main.cpp 55 additions, 0 deletionssrc/platforms/linux/hello/hello_main.cpp
- src/platforms/linux/hello/hello_start_linux.cpp 100 additions, 0 deletionssrc/platforms/linux/hello/hello_start_linux.cpp
- src/platforms/linux/hello/module.mk 43 additions, 0 deletionssrc/platforms/linux/hello/module.mk
- src/platforms/linux/include/arch/board/board.h 0 additions, 0 deletionssrc/platforms/linux/include/arch/board/board.h
- src/platforms/linux/include/board_config.h 1 addition, 0 deletionssrc/platforms/linux/include/board_config.h
- src/platforms/linux/main.cpp 98 additions, 0 deletionssrc/platforms/linux/main.cpp
- src/platforms/linux/px4_layer/module.mk 42 additions, 0 deletionssrc/platforms/linux/px4_layer/module.mk
- src/platforms/linux/px4_layer/px4_linux_impl.cpp 51 additions, 0 deletionssrc/platforms/linux/px4_layer/px4_linux_impl.cpp
- src/platforms/linux/px4_layer/px4_linux_tasks.c 186 additions, 0 deletionssrc/platforms/linux/px4_layer/px4_linux_tasks.c
- src/platforms/nuttx/px4_layer/module.mk 40 additions, 0 deletionssrc/platforms/nuttx/px4_layer/module.mk
- src/platforms/nuttx/px4_layer/px4_nuttx_tasks.c 118 additions, 0 deletionssrc/platforms/nuttx/px4_layer/px4_nuttx_tasks.c
- src/platforms/px4_app.h 83 additions, 0 deletionssrc/platforms/px4_app.h
- src/platforms/px4_includes.h 33 additions, 1 deletionsrc/platforms/px4_includes.h
- src/platforms/px4_middleware.h 5 additions, 1 deletionsrc/platforms/px4_middleware.h
Loading
Please register or sign in to comment