mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-01 14:50:35 +08:00
Improvements to make support, added debug target.
This commit is contained in:
@@ -31,11 +31,24 @@ target_link_libraries(firmware_nuttx
|
||||
|
||||
set(fw_file ${CMAKE_CURRENT_BINARY_DIR}/${OS}-${BOARD}-${LABEL}.px4)
|
||||
|
||||
add_custom_target(check_weak
|
||||
COMMAND ${NM} firmware_nuttx | grep " w "
|
||||
DEPENDS firmware_nuttx
|
||||
)
|
||||
|
||||
px4_nuttx_add_firmware(OUT ${fw_file}
|
||||
EXE ${CMAKE_CURRENT_BINARY_DIR}/firmware_nuttx
|
||||
EXE firmware_nuttx
|
||||
${config_firmware_options}
|
||||
)
|
||||
|
||||
configure_file(gdbinit.in .gdbinit)
|
||||
|
||||
add_custom_target(debug
|
||||
COMMAND ${GDB} ${CMAKE_CURRENT_BINARY_DIR}/firmware_nuttx
|
||||
DEPENDS firmware_nuttx
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
|
||||
)
|
||||
|
||||
px4_add_upload(OUT upload OS ${OS} BOARD ${BOARD}
|
||||
BUNDLE ${fw_file})
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
target extended ${DEBUG_PORT}
|
||||
monitor swdp_scan
|
||||
attach 1
|
||||
monitor vector_catch disable hard
|
||||
set mem inaccessible-by-default off
|
||||
set print pretty
|
||||
source Debug/PX4
|
||||
Reference in New Issue
Block a user