platformio / platform-ststm32

ST STM32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/ststm32
Apache License 2.0
405 stars 312 forks source link

Upload using openocd and stlinkv2 #16

Closed bfabricio closed 8 years ago

bfabricio commented 8 years ago

I upload the .bin(.pioenvs/stm32f103c8t6/firmware.bin) using openocd and stlink and now I can't re-flash the board. The swd is disable during the build?

Code: https://github.com/fabriciopk/SEA_Firmware

ivankravets commented 8 years ago

@ubis, please help us.

ubis commented 8 years ago

I'm not really familiar with SWD and stuff, maybe you used some different flags? Could you try to reflash firmware with ROM bootloader?

bfabricio commented 8 years ago

I upload the code using openocd with the same script that I use for others binaries, and it always work. But when I flash with the binaries that I build using platformio, the stlink not recognize the microcontroler any more. It's possible to use platformio to upload the binaries using stlink? I was reading about adding in the platformio.ini

UPLOAD_PROTOCOL = stlink

ivankravets commented 8 years ago

@fabriciopk please re-test the latest dev build:

pio platform uninstall ststm32
pio platform install https://github.com/platformio/platform-ststm32/archive/develop.zip

Does it work?

ivankravets commented 8 years ago

@fabriciopk do you have any news?

ivankravets commented 8 years ago

Please reopen if you still have problems