mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 23:33:34 +08:00
Add Parrot Bebop as build target (#4698)
* Add parrot bebop build structure * Add upload functionality to bebop build * Add modules and commands to bebop build
This commit is contained in:
committed by
Lorenz Meier
parent
292b35d06d
commit
d9422e0296
@@ -61,7 +61,42 @@ elseif ("${BOARD}" STREQUAL "rpi2")
|
||||
DEPENDS mainapp
|
||||
DEST /home/pi)
|
||||
|
||||
elseif ("${BOARD}" STREQUAL "bebop")
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static")
|
||||
|
||||
add_executable(mainapp
|
||||
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
||||
apps.h
|
||||
)
|
||||
|
||||
if (NOT APPLE)
|
||||
target_link_libraries(mainapp
|
||||
-Wl,--start-group
|
||||
${module_libraries}
|
||||
${df_driver_libs}
|
||||
pthread m rt
|
||||
-Wl,--end-group
|
||||
)
|
||||
else()
|
||||
target_link_libraries(mainapp
|
||||
${module_libraries}
|
||||
${df_driver_libs}
|
||||
pthread m
|
||||
)
|
||||
endif()
|
||||
|
||||
px4_add_adb_push_to_bebop(OUT upload
|
||||
OS ${OS}
|
||||
BOARD ${BOARD}
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/bebop/mainapp.config
|
||||
DEPENDS mainapp
|
||||
DEST /usr/bin)
|
||||
|
||||
else()
|
||||
|
||||
add_executable(mainapp
|
||||
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
||||
apps.h
|
||||
|
||||
@@ -61,6 +61,8 @@ __END_DECLS
|
||||
# define HW_ARCH "LINUXTEST"
|
||||
#elif defined(CONFIG_ARCH_BOARD_RPI2)
|
||||
# define HW_ARCH "LINUXTEST"
|
||||
#elif defined(CONFIG_ARCH_BOARD_BEBOP)
|
||||
# define HW_ARCH "LINUXTEST"
|
||||
#else
|
||||
#define HW_ARCH (board_name())
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user