Hi all
Has anyone sucesfully used the particle debugger with the Photon 2.
I'we updated firmware in the debugger to v0254.2.
When toggling reset, i can connect to the device, with following log
/Users/au263437/.particle/toolchains/openocd/0.11.0-particle.4/bin/openocd -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s /Users/au263437/.particle/toolchains/openocd/0.11.0-particle.4/share/openocd/scripts -f /Users/au263437/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f interface/cmsis-dap.cfg -f target/rtl872x_km4_debug.cfg
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2022-03-25-19:34)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDLiveWatchSetup
Info : Listening on port 50001 for tcl connections
Info : Listening on port 50002 for telnet connections
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: FW Version = 0254.2
Info : CMSIS-DAP: Serial# = 310436023138a9461239333437353533a5a5a5a597969908
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x6ba02477
Info : [rtl872x.cpu] Cortex-M55 r1p0 processor detected
Info : [rtl872x.cpu] target has 2 breakpoints, 1 watchpoints
Info : [rtl872x.cpu] external reset detected
Info : starting gdb server for rtl872x.cpu on 50000
Info : Listening on port 50000 for gdb connections
Info : accepting 'gdb' connection on tcp/50000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x1010aa94 msp: 0x10004d84
> KM4: reset-assert-post event
0x480003f8: 02000201
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x10100100 msp: 0x1007effc
Info : SWD DPIDR 0x6ba02477
Error: Failed to read memory at 0x00000100
I use the suggested debug configuration in VSCode, and have experimented with disabling rtos
, alternating between attach
and launch.
I cannot capture execution at any breakpoints
"configurations": [
{
"type": "cortex-debug",
"request": "attach",
// "request": "launch",
"servertype": "openocd",
"name": "Particle Debugger",
"cwd": "${workspaceRoot}",
// "rtos": "FreeRTOS",
"armToolchainPath": "${command:particle.getDebuggerCompilerDir}",
"executable": "${command:particle.getDebuggerExecutable}",
"serverpath": "${command:particle.getDebuggerOpenocdPath}",
// "preLaunchTask": "Particle: Flash application for debug (local)",
"showDevDebugOutput": "raw",
"searchDir": [
"${command:particle.getDebuggerSearchDir}"
],
"configFiles": [
"${command:particle.getDebuggerConfigFiles}"
],
"postAttachCommands": [
"${command:particle.getDebuggerPostAttachCommands}"
],
"particle": {
"version": "1.0.1",
"debugger": "particle-debugger"
}
},