-
-
Notifications
You must be signed in to change notification settings - Fork 842
Description
Goal:
Build a debug probe to embed into prototype projects using the smallest possible footprint. Of the supported platforms f072/f3 seem to offer the smallest chips using WLCSP49 packages. I went for the f072 platform for simplicity and lower price.
Setup:
I have 2 Bluepill clones at hand: One with a genuine STM32F103C8T running Black Magic Firmware v1.9.0 compiled for swlink platform and one with a STM32F072C8U running Black Magic Firmware v1.9.0 compiled for f072 platform. Firmware is precompiled from here. The target is a nRF52840 on an Arduino Nano 33 BLE. PC side is GDB command line or VS Code with Cortex-Debug extension on Windows.
Issue:
When using the f072 probe in VS Code and trying to restart or reset the target, the probe crashes. It becomes unresponsive and all LEDs turn off. Resetting the probe lights up the LED but only replugging USB makes it connectable again. Everything else works: stepping and breaking in VS Code works, using GDB command line start and run works and using the F103 probe also fully works in VS Code. The last output of the debug console in VS Code is as follows
64-interpreter-exec console "SoftwareReset"
-> =cmd-param-changed,param="language",value="c"
I can reproduce the exact same behaviour and output by typing SoftwareReset in the debug console.
Workaround:
Only when gathering all the details for this issue, I discovered that I can type start and run into the debug console in VS Code. This gives the desired result of restarting the target with and without break at main.
So what does this SoftwareReset do and how does the firmware handled it differently depending on the platform? It seems to be an issue of the firmware and not the VS Code debug extension as the swlink firmware can handle this command correctly. Is there any documentation on f072/f3 platform available? Does anyone even have experience with this firmware any anyone ever built this? I am in the process of setting up the toolchain on Linux so I can compile the firmware myself. Reason being my intention to modify pinout for easier fanout and possibly even omit the crystal for further footprint reduction, as those chips support crystal-less USB. Any help is much appreciated, thank you for supporting this awesome project!