mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 09:03:34 +08:00
You can now add `DYNAMIC` as an option to `px4_add_module`, which will
cause that module to no longer be compiled into the px4 executable, but
instead produce a separate shared library file, which can be loaded and
executed with the new `dyn` command:
pxh> dyn ./hello.px4mod start
This will load the shared object file `hello.px4mod` if it wasn't
already loaded, and execute its main function with the given arguments.
9 lines
119 B
CMake
9 lines
119 B
CMake
px4_add_module(
|
|
MODULE systemcmds__dyn
|
|
MAIN dyn
|
|
SRCS
|
|
dyn.cpp
|
|
)
|
|
|
|
target_link_libraries(systemcmds__dyn PUBLIC dl)
|