mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 01:17:51 +08:00
NuttX cmake small debug helper improvements
This commit is contained in:
@@ -14,6 +14,8 @@ set print pretty
|
||||
set pagination off
|
||||
|
||||
set history save on
|
||||
set history filename ~/.gdb_history
|
||||
set history size unlimited
|
||||
set history expansion on
|
||||
|
||||
set logging on
|
||||
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
@JLinkGDBServerExe_PATH@ -device @DEBUG_DEVICE@ -select usb -endian little -if SWD -speed auto -ir -LocalhostOnly 1 -strict -vd -singlerun &
|
||||
|
||||
cd @PX4_BINARY_DIR@ && @CMAKE_GDB@ -silent -nh \
|
||||
-iex "set auto-load safe-path @PX4_BINARY_DIR@" \
|
||||
-ex "target remote localhost:2331" \
|
||||
-ex "monitor reset 0" \
|
||||
-ex "load" \
|
||||
-ex "monitor reset 0" \
|
||||
-ex "continue" \
|
||||
@PX4_CONFIG@.elf
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
@Ozone_PATH@ -device @DEBUG_DEVICE@ -if SWD -speed auto -select usb -programfile @PX4_BINARY_DIR@/@PX4_CONFIG@.elf
|
||||
@@ -1,7 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
killall JLinkGDBServerCLExe
|
||||
|
||||
# TODO: set device from nuttx config
|
||||
# eg CONFIG_ARCH_CHIP_STM32F427V or CONFIG_STM32_STM32F427
|
||||
JLinkGDBServerCLExe -device STM32F427II -select usb -silent -endian little -if SWD -speed auto -ir -LocalhostOnly 1 -strict -vd -singlerun &
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
set -o xtrace
|
||||
|
||||
killall JLinkGDBServerCLExe
|
||||
|
||||
JLinkGDBServerCLExe -silent -device @DEBUG_DEVICE@ -select usb -if SWD -speed auto -LocalhostOnly 1 -strict -vd -singlerun &
|
||||
@@ -10,6 +10,7 @@
|
||||
"type": "cortex-debug",
|
||||
"servertype": "jlink",
|
||||
"interface": "swd",
|
||||
//"ipAddress": "server:19020",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"preLaunchCommands": [
|
||||
|
||||
+6
-4
@@ -1,12 +1,14 @@
|
||||
#! /bin/sh
|
||||
|
||||
gdb-multiarch -nx -batch \
|
||||
set -o xtrace
|
||||
|
||||
gdb-multiarch -silent -nx -batch \
|
||||
-ex "target remote localhost:2331" \
|
||||
-ex "monitor reset 0" \
|
||||
-ex "load" \
|
||||
-ex "compare-sections" \
|
||||
-ex "monitor reset 0" \
|
||||
-ex "monitor sleep 1000" \
|
||||
-ex "monitor go" \
|
||||
-ex "kill" \
|
||||
-ex "monitor sleep 3000" \
|
||||
-ex "disconnect" \
|
||||
-ex "quit" \
|
||||
${1}
|
||||
Reference in New Issue
Block a user