mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 04:13:34 +08:00
Makefile/cmake/Tools: add easy Snapdragon upload
This adds a a target `make eagle_default` to build both the POSIX and the QURT side in one command. Also, it adds an upload target for both to push the files over adb to the device. This doesn't just push the executables and lib files, but also the startup config files.
This commit is contained in:
@@ -25,6 +25,15 @@ if ("${BOARD}" STREQUAL "eagle")
|
||||
pthread m rt
|
||||
-Wl,--end-group
|
||||
)
|
||||
|
||||
px4_add_adb_push(OUT upload
|
||||
OS ${OS}
|
||||
BOARD ${BOARD}
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/mainapp
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/mainapp.config
|
||||
DEPENDS build_mainapp_apps
|
||||
DEST /home/linaro)
|
||||
|
||||
else()
|
||||
add_executable(mainapp
|
||||
${CMAKE_SOURCE_DIR}/src/platforms/posix/main.cpp
|
||||
|
||||
@@ -15,7 +15,7 @@ if ("${QURT_ENABLE_STUBS}" STREQUAL "1")
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${FASTRPC_DSP_INCLUDES}
|
||||
)
|
||||
add_executable(mainapp
|
||||
add_executable(mainapp
|
||||
${CMAKE_BINARY_DIR}/src/firmware/qurt/px4muorb_skel.c
|
||||
${CMAKE_BINARY_DIR}/apps.h)
|
||||
|
||||
@@ -44,6 +44,15 @@ else()
|
||||
${df_driver_libs}
|
||||
m
|
||||
)
|
||||
|
||||
px4_add_adb_push(OUT upload
|
||||
OS ${OS}
|
||||
BOARD ${BOARD}
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/libmainapp.so
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libpx4muorb_skel.so
|
||||
${CMAKE_SOURCE_DIR}/posix-configs/eagle/flight/px4.config
|
||||
DEPENDS build_mainapp_dsp build_mainapp_dsp
|
||||
DEST /usr/share/data/adsp)
|
||||
endif()
|
||||
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
||||
Reference in New Issue
Block a user