forked from Archive/PX4-Autopilot
cmake generate vscode launch.json
This commit is contained in:
parent
42ca17ce77
commit
86dc4c5a00
|
@ -2,5 +2,8 @@
|
|||
.cortex-debug.registers.state.json
|
||||
compile_commands.json
|
||||
|
||||
# generated by cmake
|
||||
launch.json
|
||||
|
||||
# C/C++ extension does some local caching in this folder
|
||||
ipch/
|
||||
|
|
|
@ -2,67 +2,57 @@ CONFIG:
|
|||
default: px4_sitl_default
|
||||
choices:
|
||||
px4_sitl_default:
|
||||
short: px4_sitl
|
||||
short: px4_sitl_default
|
||||
buildType: RelWithDebInfo
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_default_Debug:
|
||||
short: px4_sitl (Debug)
|
||||
buildType: Debug
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_sitl_default_ASan:
|
||||
short: px4_sitl (Address Sanitizer)
|
||||
buildType: AddressSanitizer
|
||||
settings:
|
||||
CONFIG: px4_sitl_default
|
||||
px4_fmu-v2_default:
|
||||
short: px4_fmu-v2
|
||||
short: px4_fmu-v2_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v2_default
|
||||
px4_fmu-v3_default:
|
||||
short: px4_fmu-v3
|
||||
short: px4_fmu-v3_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v3_default
|
||||
px4_fmu-v4_default:
|
||||
short: px4_fmu-v4
|
||||
short: px4_fmu-v4_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v4_default
|
||||
px4_fmu-v4pro_default:
|
||||
short: px4_fmu-v4pro
|
||||
short: px4_fmu-v4pro_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v4pro_default
|
||||
px4_fmu-v5_default:
|
||||
short: px4_fmu-v5
|
||||
short: px4_fmu-v5_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v5_default
|
||||
px4_fmu-v5x_default:
|
||||
short: px4_fmu-v5x
|
||||
short: px4_fmu-v5x_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: px4_fmu-v5x_default
|
||||
airmind_mindpx-v2_default:
|
||||
short: airmind_mindpx-v2
|
||||
short: airmind_mindpx-v2_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: airmind_mindpx-v2_default
|
||||
av_x-v1_default:
|
||||
short: av-x
|
||||
short: av_x-v1_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: av_x-v1_default
|
||||
intel_aerofc-v1_default:
|
||||
short: intel_aerofc-v1
|
||||
short: intel_aerofc-v1_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: intel_aerofc-v1_default
|
||||
mro_ctrl-zero-f7_default:
|
||||
short: mro_ctrl-zero-f7
|
||||
short: mro_ctrl-zero-f7_default
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: mro_ctrl-zero-f7_default
|
||||
|
|
|
@ -1,260 +0,0 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Debug SITL (shell)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "shell"
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"externalConsole": true,
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Debug SITL (gazebo iris)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "iris"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "gazebo iris",
|
||||
"postDebugTask": "gazebo kill",
|
||||
"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
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"externalConsole": true,
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Debug SITL (jmavsim iris)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "iris"
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "jmavsim",
|
||||
"postDebugTask": "jmavsim kill",
|
||||
"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
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"externalConsole": true,
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Debug px4_fmu-v2/v3/v4 (jlink)",
|
||||
"device": "STM32F427VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"interface": "swd",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"preLaunchCommands": [
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/PX4",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/NuttX",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/ARMv7M",
|
||||
"set mem inaccessible-by-default off",
|
||||
"set print pretty",
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug px4_fmu-v2/v3/v4 (blackmagic)",
|
||||
"device": "STM32F427VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "bmp",
|
||||
"BMPGDBSerialPort": "/dev/ttyACM0",
|
||||
"interface": "swd",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"preLaunchCommands": [
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/PX4",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/NuttX",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/ARMv7M",
|
||||
"set mem inaccessible-by-default off",
|
||||
"set print pretty",
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug px4_fmu-v4pro (jlink)",
|
||||
"device": "STM32F469VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F469.svd",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"interface": "swd",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"preLaunchCommands": [
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/PX4",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/NuttX",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/ARMv7M",
|
||||
"set mem inaccessible-by-default off",
|
||||
"set print pretty",
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug px4_fmu-v5/v5x (jlink)",
|
||||
"device": "STM32F765VI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F7x5.svd",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"interface": "swd",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"preLaunchCommands": [
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/PX4",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/NuttX",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/ARMv7M",
|
||||
"set mem inaccessible-by-default off",
|
||||
"set print pretty",
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug av_x-v1/mro_ctrl-zero-f7 (jlink)",
|
||||
"device": "STM32F777NI",
|
||||
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F7x7.svd",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"interface": "swd",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"preLaunchCommands": [
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/PX4",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/NuttX",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/ARMv7M",
|
||||
"set mem inaccessible-by-default off",
|
||||
"set print pretty",
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debug nxp_fmuk66-v3 (jlink)",
|
||||
"device": "MK66FN2M0xxx18",
|
||||
//"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/XXXX.svd",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"interface": "swd",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"preLaunchCommands": [
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/PX4",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/NuttX",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/ARMv7M",
|
||||
"set mem inaccessible-by-default off",
|
||||
"set print pretty"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -68,7 +68,79 @@
|
|||
"PX4_SIM_SPEED_FACTOR": "1"
|
||||
}
|
||||
},
|
||||
"command": "gzserver --verbose ${workspaceRoot}/Tools/sitl_gazebo/worlds/iris.world & gzclient",
|
||||
"command": "gzserver ${workspaceRoot}/Tools/sitl_gazebo/worlds/iris.world & gzclient",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated"
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "gazebo plane",
|
||||
"type": "shell",
|
||||
"dependsOn": "gazebo build",
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}",
|
||||
"env": {
|
||||
"GAZEBO_PLUGIN_PATH": "${workspaceRoot}/build/px4_sitl_default/build_gazebo",
|
||||
"GAZEBO_MODEL_PATH": "${workspaceRoot}/Tools/sitl_gazebo/models",
|
||||
"PX4_SIM_SPEED_FACTOR": "1"
|
||||
}
|
||||
},
|
||||
"command": "gzserver ${workspaceRoot}/Tools/sitl_gazebo/worlds/plane.world & gzclient",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
"panel": "dedicated"
|
||||
},
|
||||
"problemMatcher": [
|
||||
{
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": ".",
|
||||
"file": 1,
|
||||
"location": 2,
|
||||
"message": 3
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": ".",
|
||||
"endsPattern": ".",
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "gazebo standard_vtol",
|
||||
"type": "shell",
|
||||
"dependsOn": "gazebo build",
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}",
|
||||
"env": {
|
||||
"GAZEBO_PLUGIN_PATH": "${workspaceRoot}/build/px4_sitl_default/build_gazebo",
|
||||
"GAZEBO_MODEL_PATH": "${workspaceRoot}/Tools/sitl_gazebo/models",
|
||||
"PX4_SIM_SPEED_FACTOR": "1"
|
||||
}
|
||||
},
|
||||
"command": "gzserver ${workspaceRoot}/Tools/sitl_gazebo/worlds/standard_vtol.world & gzclient",
|
||||
"isBackground": true,
|
||||
"presentation": {
|
||||
"reveal": "always",
|
||||
|
|
|
@ -166,6 +166,59 @@ add_custom_target(weak_symbols
|
|||
# debugger helpers
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/gdbinit.in ${PX4_BINARY_DIR}/.gdbinit)
|
||||
|
||||
# vscode launch.json
|
||||
# FIXME: hack to skip if px4_io-v2 because it's a build within a build
|
||||
if(NOT PX4_BUILD MATCHES "px4_io-v2")
|
||||
if(CONFIG_ARCH_CHIP_MK66FN2M0VMD18)
|
||||
set(DEBUG_DEVICE "MK66FN2M0xxx18")
|
||||
set(DEBUG_SVD_FILE "MK66F18.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F100C8)
|
||||
set(DEBUG_DEVICE "STM32F100C8")
|
||||
set(DEBUG_SVD_FILE "STM32F100xx.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F103RB)
|
||||
set(DEBUG_DEVICE "STM32F103C4")
|
||||
set(DEBUG_SVD_FILE "STM32F103xx.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F302K8)
|
||||
set(DEBUG_DEVICE "STM32F302K8")
|
||||
set(DEBUG_SVD_FILE "STM32F302.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F303CC)
|
||||
set(DEBUG_DEVICE "STM32F303CC")
|
||||
set(DEBUG_SVD_FILE "STM32F303.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F405RG)
|
||||
set(DEBUG_DEVICE "STM32F405RG")
|
||||
set(DEBUG_SVD_FILE "STM32F405.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F427V)
|
||||
set(DEBUG_DEVICE "STM32F427VI")
|
||||
set(DEBUG_SVD_FILE "STM32F427.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F429V)
|
||||
set(DEBUG_DEVICE "STM32F429VI")
|
||||
set(DEBUG_SVD_FILE "STM32F429.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F446R)
|
||||
set(DEBUG_DEVICE "STM32F446RC")
|
||||
set(DEBUG_SVD_FILE "STM32F446.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F469I)
|
||||
set(DEBUG_DEVICE "STM32F469IE")
|
||||
set(DEBUG_SVD_FILE "STM32F469.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F745VG)
|
||||
set(DEBUG_DEVICE "STM32F745VG")
|
||||
set(DEBUG_SVD_FILE "STM32F7x5.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F765II)
|
||||
set(DEBUG_DEVICE "STM32F765II")
|
||||
set(DEBUG_SVD_FILE "STM32F7x5.svd")
|
||||
elseif(CONFIG_ARCH_CHIP_STM32F777NI)
|
||||
set(DEBUG_DEVICE "STM32F777NI")
|
||||
set(DEBUG_SVD_FILE "STM32F7x7.svd")
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE DEBUG_SVD_FILE_PATH ${CMAKE_SOURCE_DIR}/../cmsis-svd/*/${DEBUG_SVD_FILE})
|
||||
if(DEBUG_SVD_FILE-NOTFOUND)
|
||||
set(DEBUG_SVD_FILE "")
|
||||
else()
|
||||
message(STATUS "Found SVD: ${DEBUG_SVD_FILE_PATH}")
|
||||
endif()
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/launch.json.in ${PX4_SOURCE_DIR}/.vscode/launch.json @ONLY)
|
||||
endif()
|
||||
|
||||
add_custom_target(debug
|
||||
COMMAND ${GDB} -iex 'set auto-load safe-path ${PX4_BINARY_DIR}' $<TARGET_FILE:px4>
|
||||
DEPENDS px4 ${PX4_BINARY_DIR}/.gdbinit
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "jlink (@PX4_BOARD@)",
|
||||
"device": "@DEBUG_DEVICE@",
|
||||
"svdFile": "@DEBUG_SVD_FILE_PATH@",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"interface": "swd",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"preLaunchCommands": [
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/PX4",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/NuttX",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/ARMv7M",
|
||||
"set mem inaccessible-by-default off",
|
||||
"set print pretty",
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "blackmagic (@PX4_BOARD@)",
|
||||
"device": "@DEBUG_DEVICE@",
|
||||
"svdFile": "@DEBUG_SVD_FILE_PATH@",
|
||||
"executable": "${command:cmake.launchTargetPath}",
|
||||
"request": "launch",
|
||||
"type": "cortex-debug",
|
||||
"servertype": "bmp",
|
||||
"BMPGDBSerialPort": "/dev/ttyACM0",
|
||||
"interface": "swd",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"preLaunchCommands": [
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/PX4",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/NuttX",
|
||||
"source ${workspaceRoot}/platforms/nuttx/Debug/ARMv7M",
|
||||
"set mem inaccessible-by-default off",
|
||||
"set print pretty",
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,246 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "SITL (gazebo iris)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "iris"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "gazebo iris",
|
||||
"postDebugTask": "gazebo kill",
|
||||
"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
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"externalConsole": true,
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SITL (gazebo plane)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "plane"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "gazebo plane",
|
||||
"postDebugTask": "gazebo kill",
|
||||
"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
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"externalConsole": true,
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SITL (gazebo standard_vtol)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "standard_vtol"
|
||||
}
|
||||
],
|
||||
"externalConsole": false,
|
||||
"preLaunchTask": "gazebo standard_vtol",
|
||||
"postDebugTask": "gazebo kill",
|
||||
"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
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"externalConsole": true,
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SITL (jmavsim iris)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "iris"
|
||||
}
|
||||
],
|
||||
"preLaunchTask": "jmavsim",
|
||||
"postDebugTask": "jmavsim kill",
|
||||
"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
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"externalConsole": true,
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SITL (shell)",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${command:cmake.launchTargetPath}",
|
||||
"args": [
|
||||
"${workspaceFolder}/ROMFS/px4fmu_common",
|
||||
"-s",
|
||||
"etc/init.d-posix/rcS",
|
||||
"-t",
|
||||
"${workspaceFolder}/test_data"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
|
||||
"environment": [
|
||||
{
|
||||
"name": "PX4_SIM_MODEL",
|
||||
"value": "shell"
|
||||
}
|
||||
],
|
||||
"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
|
||||
}
|
||||
]
|
||||
},
|
||||
"osx": {
|
||||
"MIMode": "lldb",
|
||||
"externalConsole": true,
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "pro hand -p true -s false -n false SIGCONT",
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
|
@ -104,3 +104,6 @@ add_custom_target(list_vmd_make_targets
|
|||
COMMENT "List of acceptable '${PX4_BOARD}' <viewer_model_debugger> targets:"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
# vscode launch.json
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Debug/launch.json.in ${PX4_SOURCE_DIR}/.vscode/launch.json COPYONLY)
|
||||
|
|
Loading…
Reference in New Issue