I am trying to upload “Hello world” to STM32F103RE. The tricky part is that the chip has preinstalled bootloader so i need to apply an offset:
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K - 40
FLASH (rx) : ORIGIN = 0x08007000, LENGTH = 512K - 28K
}
I have success with CUBEMX but i fail with PlatFormIO. The program compiles without errors but nothing seems to work in the case of PlatFormIO.
Double check the programmer’s invocation with project task Advanced → Verbose Upload. Is the upload offset contained there with the .bin file or is it using the .elf file?
Also if it uploaded it once to the 0x0 offset the bootloader is gone, you must reflash it.
so the .bin file should be fine and also be based on that start address.
There might be additional things going wrong in the firmware that cause it to not boot. In the CubeMX source you’re using the CubeMX / STM32HAL, in PlatformIO you are using the Arduino framework.