PlatformIO Community

STM32F1 Blue Pill stuck in DFU mode after upload


#21

The core and generic stuff is basically fine as that’s just a configuration value.

The ‘hack’ to the board is something I’ll chase up as an issue -> PR on the relevant github repo (I’ll link the issue later tonight when I make it)… then hopefully I can also find out why the way I thought I could do it properly and do a PR to include it doesn’t work…

So it does actually work (i.e. the board is running code fine)? I don’t have an STM32F103 handy so haven’t gone further than a compile/concept test. That was really all I was waiting on before opening an issue/PR.


#22

Yes, as far as I can tell, all of the functionality is present. I haven’t been able to test it with a program above the 64K size limit, but that shouldn’t be an issue, right?


#23

Fingers crossed, no… but I reserve the right to be proven wrong! :stuck_out_tongue:

The issue is here, let’s see where this rabbit hole leads…


#24

This seems to be another way to do a hacky linker script redirect, but it is still a band-aid fix as this particular case is a bug in my view.


#25

Sure, but as Max said, that thread is a bit hard to comprehend. At first glance it looks like that fix doesn’t make changes to the same files that we did, but I’m not sure which it is.


#26

It’s just a different way to tackle the linker script change… instead of altering the file used by platformio by default, you specify the path to a custom version of the file via the pre_extra_script, and in this instance, it was included in the platformio project directory. That particular issue was about having a custom linker script for a different board, hence the difference in file name, but the theory of operation should still work. And would survive updates to the platform, as your linker script is actually local to your project.