forked from Archive/PX4-Autopilot
vscode add navio2 variant and native debug launch
This commit is contained in:
parent
1965cd38ba
commit
38fbb452da
|
@ -86,6 +86,11 @@ CONFIG:
|
|||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: cubepilot_cubeyellow_default
|
||||
emlid_navio2_default:
|
||||
short: emlid_navio2
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: emlid_navio2_default
|
||||
holybro_durandal-v1_default:
|
||||
short: holybro_durandal-v1
|
||||
buildType: MinSizeRel
|
||||
|
|
|
@ -115,8 +115,18 @@ if("${PX4_BOARD}" MATCHES "beaglebone_blue")
|
|||
elseif("${PX4_BOARD}" MATCHES "emlid_navio2")
|
||||
target_link_libraries(px4 PRIVATE atomic)
|
||||
|
||||
# vscode launch.json
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/launch_rpi.json.in ${PX4_SOURCE_DIR}/.vscode/launch.json COPYONLY)
|
||||
|
||||
elseif("${PX4_BOARD}" MATCHES "sitl")
|
||||
|
||||
# vscode launch.json
|
||||
if(${PX4_BOARD_LABEL} MATCHES "replay")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/launch_replay.json.in ${PX4_SOURCE_DIR}/.vscode/launch.json COPYONLY)
|
||||
else()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/launch_sim.json.in ${PX4_SOURCE_DIR}/.vscode/launch.json COPYONLY)
|
||||
endif()
|
||||
|
||||
include(sitl_target)
|
||||
if(BUILD_TESTING)
|
||||
include(sitl_tests)
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "PX4 posix-configs/rpi/px4.config",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"-s", "../../posix-configs/rpi/px4.config"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${command:cmake.buildDirectory}",
|
||||
"externalConsole": false,
|
||||
"linux": {
|
||||
"MIMode": "gdb",
|
||||
"externalConsole": false,
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "PX4 ignore wq signals",
|
||||
"text": "handle SIGCONT nostop noprint nopass",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
|
@ -288,10 +288,3 @@ add_custom_target(list_vmd_make_targets
|
|||
COMMENT "List of acceptable '${PX4_BOARD}' <viewer_model_debugger> targets:"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# vscode launch.json
|
||||
if(${PX4_BOARD_LABEL} MATCHES "replay")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/launch_replay.json.in ${PX4_SOURCE_DIR}/.vscode/launch.json COPYONLY)
|
||||
else()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/launch_sim.json.in ${PX4_SOURCE_DIR}/.vscode/launch.json COPYONLY)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue