Is it possible to view RTT console outputs in vscode during a debug session?
I would like to see RTT console outputs right from the start, e.g. from bootloader, preferably in a terminal inside vscode.
It works with JLinkRTTViewer but not when a GDBserver already launched from vscode.
00> *** Booting Zephyr OS build v3.1.99-ncs1 *** 00> I: Starting bootloader 00> I: Swap type: none 00> I: Bootloader chainload address offset: 0x14000 00> I: Jumping to the first image slot
I was not able to use an existing session in JLinkRTTViewer.
Also is it possible to avoid resetting the device when attaching gdb (worked when I use pyocd)?
vscode starts GDB server with these arguments:
JLinkGDBServerCLExe -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF5340_xxAA_APP -speed 15000
{ "type": "cortex-debug", "request": "attach", "name": "Attach mcuboot nRF5340_xxAA_APP (jlink)", "servertype": "jlink", "interface": "swd", "device": "nRF5340_xxAA_APP", "serverpath": "/opt/SEGGER/JLink/JLinkGDBServerCLExe", "cwd": "${workspaceRoot}", "executable": ".build/mcuboot/zephyr/zephyr.elf", "showDevDebugOutput": "none", "breakAfterReset": true, "serialNumber": "", "serverArgs": [ "-speed", "15000" ], "svdFile": "${workspaceRoot}/src/external/mbed-os/targets/TARGET_NORDIC/TARGET_NRF5x/nrfx/mdk/nrf5340_network.svd", "presentation": { "hidden": false, "group": "mcuboot", "order": 1 } }
Command line: -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF5340_xxAA_APP -speed 15000 -----GDB Server start settings----- GDBInit file: none GDB Server Listening port: 50000 SWO raw output listening port: 50001 Terminal I/O port: 50002 Accept remote connection: yes Generate logfile: off Verify download: off Init regs on start: off Silent mode: off Single run mode: on Target connection timeout: 0 ms ------J-Link related settings------ J-Link Host interface: USB J-Link script: none J-Link settings file: none ------Target related settings------ Target device: nRF5340_xxAA_APP Target device parameters: none Target interface: SWD Target interface speed: 15000kHz Target endian: little Connecting to J-Link... J-Link is connected. Firmware: J-Link V11 compiled Nov 14 2022 17:38:39 Hardware: V11.00 S/N: 821009594 Feature(s): GDB Checking target voltage... Target voltage: 3.24 V Listening on TCP/IP port 50000 Connecting to target... Connected to target Waiting for GDB connection...Connected to 127.0.0.1