Open pfeerick opened 5 years ago
The change to reset_config works for uploading, but unfortunately breaks debugging (even when not in low power mode). It would be great if there were a way to support both uploading and debugging in low power mode (and run mode).
Here's the error I get when trying to debug:
Info : clock speed 300 kHz
Info : STLINK V2J29M18 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.282540
Info : stm32l0.cpu: hardware has 4 breakpoints, 2 watchpoints
Info : accepting 'gdb' connection from pipe
Info : Halt timed out, wake up GDB.
Error: timed out while waiting for target halted
Warn : Cannot identify target as a STM32L family.
Error: auto_probe failed
Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.
Error: attempted 'gdb' connection rejected
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Reported by
solenoid
on the PIO forum.With a Nucleo L031K6 w/ on-board ST-Link (but possibly applies to other STM32 setups), with default configuration, flashing the board fails if the STM32 is in a low power mode (both sleep and stop modes). Changing the following line in stm32l0.cfg fixes the problem:
I would have posted a PR against the openocd settings file but AFAIK it's only on bintray?
Forum ref: https://community.platformio.org/t/flashing-stm32-in-low-power-mode/8423