mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
vscode add navio2 variant and native debug launch
This commit is contained in:
5
.vscode/cmake-variants.yaml
vendored
5
.vscode/cmake-variants.yaml
vendored
@@ -86,6 +86,11 @@ CONFIG:
|
|||||||
buildType: MinSizeRel
|
buildType: MinSizeRel
|
||||||
settings:
|
settings:
|
||||||
CONFIG: cubepilot_cubeyellow_default
|
CONFIG: cubepilot_cubeyellow_default
|
||||||
|
emlid_navio2_default:
|
||||||
|
short: emlid_navio2
|
||||||
|
buildType: MinSizeRel
|
||||||
|
settings:
|
||||||
|
CONFIG: emlid_navio2_default
|
||||||
holybro_durandal-v1_default:
|
holybro_durandal-v1_default:
|
||||||
short: holybro_durandal-v1
|
short: holybro_durandal-v1
|
||||||
buildType: MinSizeRel
|
buildType: MinSizeRel
|
||||||
|
|||||||
@@ -115,8 +115,18 @@ if("${PX4_BOARD}" MATCHES "beaglebone_blue")
|
|||||||
elseif("${PX4_BOARD}" MATCHES "emlid_navio2")
|
elseif("${PX4_BOARD}" MATCHES "emlid_navio2")
|
||||||
target_link_libraries(px4 PRIVATE atomic)
|
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")
|
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)
|
include(sitl_target)
|
||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
include(sitl_tests)
|
include(sitl_tests)
|
||||||
|
|||||||
33
platforms/posix/Debug/launch_rpi.json.in
Normal file
33
platforms/posix/Debug/launch_rpi.json.in
Normal file
@@ -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:"
|
COMMENT "List of acceptable '${PX4_BOARD}' <viewer_model_debugger> targets:"
|
||||||
VERBATIM
|
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()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user