mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-19 04:11:35 +08:00
Improvements to SITL to make paths more flexible. (#5181)
This commit is contained in:
@@ -10,7 +10,7 @@ add_executable(firmware_nuttx
|
||||
builtin_commands.c)
|
||||
|
||||
|
||||
set(nuttx_export_dir ${CMAKE_BINARY_DIR}/${BOARD}/NuttX/nuttx-export)
|
||||
set(nuttx_export_dir ${PX4_BINARY_DIR}/${BOARD}/NuttX/nuttx-export)
|
||||
|
||||
set(link_libs
|
||||
romfs apps nuttx m gcc
|
||||
@@ -20,7 +20,7 @@ if(NOT ${BOARD} STREQUAL "sim")
|
||||
list(APPEND link_libs nosys)
|
||||
set(main_link_flags
|
||||
"-T${nuttx_export_dir}/build/ld.script"
|
||||
"-Wl,-Map=${CMAKE_BINARY_DIR}/${BOARD}/main.map"
|
||||
"-Wl,-Map=${PX4_BINARY_DIR}/${BOARD}/main.map"
|
||||
)
|
||||
px4_join(OUT main_link_flags LIST ${main_link_flags} GLUE " ")
|
||||
set_target_properties(firmware_nuttx PROPERTIES LINK_FLAGS ${main_link_flags})
|
||||
@@ -43,12 +43,12 @@ add_custom_target(check_weak
|
||||
if(NOT ${BOARD} STREQUAL "sim")
|
||||
|
||||
if (config_io_board)
|
||||
set(extras "${CMAKE_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}.bin")
|
||||
set(extras "${PX4_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}.bin")
|
||||
endif()
|
||||
|
||||
set(romfs_dir "ROMFS/px4fmu_common")
|
||||
if (${BOARD} STREQUAL "tap-v1")
|
||||
set(romfs_dir "ROMFS/tap_common")
|
||||
set(romfs_dir "ROMFS/tap_common")
|
||||
endif()
|
||||
if (${BOARD} STREQUAL "px4fmu-v2" AND ${LABEL} STREQUAL "test")
|
||||
set(romfs_dir "ROMFS/px4fmu_test")
|
||||
@@ -68,8 +68,8 @@ if(NOT ${BOARD} STREQUAL "sim")
|
||||
px4_nuttx_add_firmware(OUT ${fw_file}
|
||||
BOARD ${BOARD}
|
||||
EXE ${CMAKE_CURRENT_BINARY_DIR}/firmware_nuttx
|
||||
PARAM_XML ${CMAKE_BINARY_DIR}/parameters.xml
|
||||
AIRFRAMES_XML ${CMAKE_BINARY_DIR}/airframes.xml
|
||||
PARAM_XML ${PX4_BINARY_DIR}/parameters.xml
|
||||
AIRFRAMES_XML ${PX4_BINARY_DIR}/airframes.xml
|
||||
)
|
||||
|
||||
configure_file(gdbinit.in .gdbinit)
|
||||
@@ -94,21 +94,21 @@ if(NOT ${BOARD} STREQUAL "sim")
|
||||
|
||||
add_custom_target(debug_io
|
||||
COMMAND ${GDB}
|
||||
${CMAKE_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}
|
||||
${PX4_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}
|
||||
DEPENDS firmware_nuttx
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
|
||||
)
|
||||
|
||||
add_custom_target(debug_io_tui
|
||||
COMMAND ${GDBTUI}
|
||||
${CMAKE_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}
|
||||
${PX4_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}
|
||||
DEPENDS firmware_nuttx
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
|
||||
)
|
||||
|
||||
add_custom_target(debug_io_ddd
|
||||
COMMAND ${DDD} --debugger ${GDB}
|
||||
${CMAKE_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}
|
||||
${PX4_BINARY_DIR}/src/modules/px4iofirmware/${config_io_board}
|
||||
DEPENDS firmware_nuttx
|
||||
${CMAKE_CURRENT_BINARY_DIR}/.gdbinit
|
||||
)
|
||||
|
||||
@@ -4,4 +4,4 @@ attach 1
|
||||
monitor vector_catch disable hard
|
||||
set mem inaccessible-by-default off
|
||||
set print pretty
|
||||
source ${CMAKE_SOURCE_DIR}/Debug/PX4
|
||||
source ${PX4_SOURCE_DIR}/Debug/PX4
|
||||
|
||||
Reference in New Issue
Block a user