I’m trying to get the led blink example from here to run, I can compile it, upload it but it doesn’t run.
The equivalent mbed example works fine, the project I’m doing requires control for 16x fast pwm in a tightly coupled manner, so I doubt mbed will do.
According to pinout diagrams the LED on the bluepill boards is either on B13 or C13
So I tried setting the LED pin to
I know it’s a late answer, but I just bought the BluePill and this is my first try.
Today I stumbled across the same error, trying to run the stm32cube HAL blink example.
I checked the differences in linker scripts for F103C8 and F103CB boards, and both of them against script generated by the STM32CubeMX.
There is an error in default linker script for the STM32F103C8 chip.
In the STM32F103C8_DEFAULT.ld file the line for stack has a missing “0”
_estack = 0x2005000; /* end of RAM */
and the correct value is
_estack = 0x20005000; /* end of RAM */
After change and recompilation, the BluePill started to blink.
Then I made a custom STM32F103C8_FLASH.ld script using the CB version as a template, because the only difference is the flash size: