-
Notifications
You must be signed in to change notification settings - Fork 258
Closed
Description
I'm trying to setup a embedded Rust development environment with VS Code. I'm using the following tools:
- MacOS
- A micro:bit board (v2.20)
- OpenOCD (v0.11.0+dev-00698-gcc8b49185)
- Cortex-Debug (v1.4.4)
- For RTT, I'm using the rtt-target crate (v0.3.1)
The project is available in this repository.
My launch configuration is the following:
{
"version": "0.2.0",
"showDevDebugOutput": true,
"configurations": [
{
"name": "Debug (Blinky)",
"type": "cortex-debug",
"preLaunchTask": "build",
"request": "launch",
"servertype": "openocd",
"interface": "swd",
"cwd": "${workspaceRoot}",
"executable": "${workspaceRoot}/target/thumbv7em-none-eabihf/debug/blink-led",
"device": "nrf52833_01AA",
"svdFile": "${workspaceRoot}/nrf52833.svd",
"configFiles": [
"interface/cmsis-dap.cfg",
"target/nrf52.cfg"
],
"rttConfig": {
"enabled": true,
"address": "auto",
"clearSearch": false,
"decoders": [
{
"port": 0,
"type": "console"
}
]
},
"runToEntryPoint": "main",
},
]
}
The debugging works great. I can set break points and analyze all the variables etc. However, it is not able to open the RTT communication for logging. The output of the gdb server is the following:
Open On-Chip Debugger 0.11.0+dev-00698-gcc8b49185 (2022-06-03-14:19)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDRTOSConfigure
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
Info : Listening on port 50004 for tcl connections
Info : Listening on port 50005 for telnet connections
Info : Using CMSIS-DAPv2 interface with VID:PID=0x0d28:0x0204, serial=99053602000528336a7989d907e3befb000000006e052820
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.1.0
Info : CMSIS-DAP: Serial# = 99053602000528336a7989d907e3befb000000006e052820
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 0
Info : CMSIS-DAP: Interface ready
Info : clock speed 1000 kHz
Info : SWD DPIDR 0x2ba01477
Info : [nrf52.cpu] Cortex-M4 r0p1 processor detected
Info : [nrf52.cpu] target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for nrf52.cpu on 50003
Info : Listening on port 50003 for gdb connections
Info : accepting 'gdb' connection on tcp/50003
Info : nRF52833-xxAA(build code: A0) 512kB Flash, 128kB RAM
undefined debug reason 8 - target needs reset
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000100 msp: 0x20004000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000100 msp: 0x20004000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000100 msp: 0x20004000
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000100 msp: 0x20004000
Info : Listening on port 60000 for rtt connections
Info : rtt: Searching for control block 'SEGGER RTT'
Info : rtt: No control block found
Info : accepting 'rtt' connection on tcp/60000
In the last 4 lines, it seems that OpenOCD is not able to open the RTT channel. Does anyone know what I'm missing?
Metadata
Metadata
Assignees
Labels
No labels