Perhaps this is normal, but when running that command through the terminal doesn’t show the debugging breakpoint toolbar at the top like starting debugging from the debug menu does. Also seems like it doesn’t cause the same timeout error, it just doesn’t do anything after the command finishes.
Output from terminal: (I had to add spaces in links to allow me to post this)
PS C:\Users\bw\Documents\PlatformIO\Projects\testing> pio debug -v
Processing lpc1768 (platform: nxplpc; debug_port: COM2; board: lpc1768; debug_load_cmd: preload; framework: mbed)
CONFIGURATION: https ://docs.platformio.org/page/boards/nxplpc/lpc1768.html
PLATFORM: NXP LPC > NXP mbed LPC1768
HARDWARE: LPC1768 96MHz 64KB RAM (512KB Flash)
DEBUG: CURRENT(cmsis-dap) ON-BOARD(cmsis-dap) EXTERNAL(blackmagic, jlink)
Library Dependency Finder -> http ://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 25 compatible libraries
Scanning dependencies…
Dependency Graph
|-- (C:\Users\bw.platformio\packages\framework-mbed\features\mbedtls)
MethodWrapper([“checkprogsize”], [".pioenvs\lpc1768\firmware.elf"])
Memory Usage -> http ://bit.ly/pio-memory-usage
DATA: [ ] 4.7% (used 3105 bytes from 65536 bytes)
PROGRAM: [ ] 2.5% (used 13324 bytes from 524288 bytes)
.pioenvs\lpc1768\firmware.elf :
section size addr
.text 10920 0
.ARM.exidx 8 10920
.data 2396 268435656
.bss 709 268438056
.heap 2048 268438768
.stack_dummy 3072 268438768
.ARM.attributes 41 0
.comment 126 0
.debug_info 152763 0
.debug_abbrev 20096 0
.debug_loc 27596 0
.debug_aranges 3192 0
.debug_ranges 3856 0
.debug_macro 25990 0
.debug_line 52354 0
.debug_str 125503 0
.debug_frame 10040 0
Total 440710
============================== [SUCCESS] Took 4.18 seconds ==============================
And here’s the output from the Debug Console, from a debug starting from the Debug Menu, and shows the error:
Processing lpc1768 (platform: nxplpc; board: lpc1768; framework: mbed)
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: https ://docs.platformio.org/page/boards/nxplpc/lpc1768.html
PLATFORM: NXP LPC > NXP mbed LPC1768
HARDWARE: LPC1768 96MHz 64KB RAM (512KB Flash)
DEBUG: CURRENT(cmsis-dap) ON-BOARD(cmsis-dap) EXTERNAL(blackmagic, jlink)
Library Dependency Finder -> http ://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 25 compatible libraries
Scanning dependencies…
Dependency Graph
|--
Checking size .pioenvslpc1768irmware.elf
Memory Usage -> http ://bit.ly/pio-memory-usage
DATA: [ ] 4.7% (used 3105 bytes from 65536 bytes)
PROGRAM: [ ] 2.5% (used 13324 bytes from 524288 bytes)
Configuring upload protocol…
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed
CURRENT: upload_protocol = mbed
Looking for upload disk…
Auto-detected: D:\n
Uploading .pioenvslpc1768irmware.bin
Firmware has been successfully uploaded.
(Some boards may require manual hard reset)
[SUCCESS] Took 4.27 seconds
Reading symbols from c:/Users/bw/Documents/PlatformIO/Projects/testing/.pioenvs/lpc1768/firmware.elf…
done.
PlatformIO Unified Debugger > http ://bit.ly/pio-debug
PlatformIO: Initializing remote target…
Ignoring packet error, continuing…
warning: unrecognized item “timeout” in “qSupported” response
Ignoring packet error, continuing…
.pioinit:10: Error in sourced command file:
Remote replied unexpectedly to ‘vMustReplyEmpty’: timeout
pio_reset_target
And this is my launch.json configuration:
{
“type”: “platformio-debug”,
“request”: “launch”,
“name”: “PIO Debug”,
“executable”: “c:/Users/boydw/Documents/PlatformIO/Projects/testing/.pioenvs/lpc1768/firmware.elf”,
“toolchainBinDir”: “C:/Users/boydw/.platformio/packages/toolchain-gccarmnoneeabi/bin”,
“svdPath”: “C:/Users/boydw/.platformio/platforms/nxplpc/misc/svd/LPC176x5x_v0.2.svd”,
“preLaunchTask”: {
“type”: “PlatformIO”,
“task”: “Pre-Debug”
},
“internalConsoleOptions”: “openOnSessionStart”
}
formatting didn’t go too well on that one.