Closed zerog2k closed 4 years ago
ok this might be related https://github.com/platformio/platformio-core/issues/3516
ok confirming that this works using the workarounds on https://github.com/platformio/platform-ststm32/issues/272 specifically, running separate openocd (can be run via tasks in one of the pio terminal windows as discussed in the issue), and using this config:
[env:genericSTM32F103C8]
platform = ststm32
board = genericSTM32F103C8
framework = arduino
lib_deps =
STM32duino-Semihosting
upload_protocol = stlink
debug_extra_cmds =
monitor arm semihosting enable
;debug_tool = stlink
debug_tool = custom
debug_port = :3333
Glad to hear it works.
I created a very simple and easy to use pre-configured project to make semihosting work for an STM32 bluepill board. Please have a look https://github.com/mohalsa/STM32_BluePill_Semihosting
On Tue, 27 Apr 2021 15:57:57 -0700 Mohammed Alsada @.***> wrote:
I created a very simple and easy to use pre-configured project to make semihosting work for an STM32 bluepill board. Please have a look https://github.com/mohalsa/STM32_BluePill_Semihosting
Thanks. Maybe add a picture that shows how the connections between STLink and blue pill are?
best,
koen
This is the wiring diagram. Just ignore the optional "Enable hardware reset mode" line! Also, I noticed that sometimes the debugging session becomes unreliable, glitchy and might not even work, In such cases try to connect the 5V power line from the Stlink debugger to the 5V Vcc of the bluepill and don't use the 3.3V Vcc to power the bluepill. I don't know what might be the reason, probably insufficient power or ripples etc. please do not connect them both at once, It might damage your board!
(Image credits: https://www.onetransistor.eu/2020/01/stm32-bluepill-arduino-support.html)
On Fri, 07 May 2021 01:29:52 -0700 Mohammed Alsada @.***> wrote:
This is the wiring diagram. Just ignore the optional "Enable hardware reset mode" line!
Good. You use openocd? https://github.com/phryniszak/strtt
I can get swd debugging working (I think it's though openocd?) in vscode + platformio, using an st-link adapter.
I'm using
in my platformio.ini along with the example blink sketch in this repo. I'm not sure if there are other steps required here to get this working. Wondering if anyone has ideas or pointers?