It looks like it worked!
et-laptop-mock:FSMotionController hackmodford$ /Users/hackmodford/.platformio/packages/tool-openocd/bin/openocd -d2 -s /Users/hackmodford/.platformio/packages/tool-openocd/scripts -f interface/cmsis-dap.cfg -c "set CHIPNAME at91sam3X8E" -c "source [find target/at91sam3ax_8x.cfg]" -c "telnet_port disabled; program {/Users/hackmodford/Code/PlatformIO/FSMotionController/.pio/build/due/firmware.elf} verify reset; shutdown;"
xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-15:21)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
at91sam3X8E
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: FW Version = 01.27.0082
Info : CMSIS-DAP: Serial# = J41800107410
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 500 kHz
Info : SWD DPIDR 0x2ba01477
Info : at91sam3X8E.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000864b8 msp: 0x20088000
** Programming Started **
Info : sam3 auto-erases while programming (request ignored)
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked
So the question now is how to invoke the modified command when I press the upload button. And then to figure out why debugging doesn’t seem to work.
Here’s the output I get when debugging.
It seems to work, but none of my breakpoints nor the default “main” breakpoint gets hit.
Reading symbols from /Users/hackmodford/Code/PlatformIO/FSMotionController/.pio/build/due/firmware.elf…
done.
PlatformIO Unified Debugger → Redirecting...
PlatformIO: debug_tool = atmel-ice
PlatformIO: Initializing remote target…
xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-15:21)
Licensed under GNU GPL v2
For bug reports, read
at91sam3X8E
Info : auto-selecting first available session transport “swd”. To override use ‘transport select ’.
cortex_m reset_config sysresetreq
Info : tcl server disabled
Info : telnet server disabled
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: FW Version = 01.27.0082
Info : CMSIS-DAP: Serial# = J41800107410
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 1 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 500 kHz
Info : SWD DPIDR 0x2ba01477
Info : at91sam3X8E.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting ‘gdb’ connection from pipe
target halted due to debug-request, current mode: Thread
xPSR: 0xa1000000 pc: 0x00082d3c msp: 0x20087f78
0x00082d3c in loadConfiguration () at src/main.cpp:160
160 }
Temporary breakpoint 1 at 0x88096: file /Users/hackmodford/.platformio/packages/framework-arduinosam/cores/sam/main.cpp, line 45.
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000864b8 msp: 0x20088000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000864b8 msp: 0x20088000
Loading section .text, size 0xe6a8 lma 0x80000
Loading section .ARM.exidx, size 0x8 lma 0x8e6a8
Loading section .relocate, size 0xa70 lma 0x8e6b0