PX4-Autopilot/platforms/nuttx/Debug/jlink_debug_gdb.sh.in
Daniel Agar fcf0d3536f
NuttX debug jlink scripts minor improvements
- script return non-zero exit if there's a failure
 - upload script look for both gdb-multiarch and arm-none-eabi-gdb
2021-07-15 17:07:51 -04:00

16 lines
436 B
Bash
Executable File

#! /bin/sh
@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
# exit with status of last command
exit $?