I trying to configure a custom debug environment that launches gdb-multiarch on the host which then connects to a remote target running on a teensy41 arm cortex m7 board.
This is my platformio.ini
platform = teensy
board = teensy41
framework = arduino
lib_deps = symlink:///home/roger/TeensyDebug
build_flags = -DUSB_DUAL_SERIAL -DGDB_DUAL_SERIAL
[env:myrelease]
[env:mydebug]
build_type = debug
monitor_port = /dev/serial/by-id/usb-Teensyduino_Dual_Serial_13251740-if00
debug_port = /dev/serial/by-id/usb-Teensyduino_Dual_Serial_13251740-if02
debug_speed = 115200
debug_tool = custom
debug_load_mode = manual
debug_server =
/usr/bin/gdb-multiarch
debug_init_break =
debug_init_cmds = $DEBUG_PORT
shell wait-for-debug-port $DEBUG_PORT
target extended-remote $DEBUG_PORT
$INIT_BREAK
define pio_reset_run_target
interrupt
tbreak loop
continue
end
define pio_restart_target
echo Reset is undefined
end
When I run this with pio debug -e mydebug platformio pesists in trying launch arm-none-eabi-gdb from the teensy toolchain not gdb-multiarch.
What am I doing wrong.