Hey !
I guess it is pretty obvious but as i have hard time to find the info i m still asking - what is the best way to upload a .bin file to a stm32f103 ?
I ve read some people use the command prompt to upload the file but i did not found a clear instruction. I m using a FTDI programmer so i would prefer a solution which uses it !
Thanks !
Uploading hex files to stm32f103
Re: Uploading hex files to stm32f103
You can use STM32CubeProgrammer
-
- Posts: 633
- Joined: Thu Dec 19, 2019 1:23 am
Re: Uploading hex files to stm32f103
STLink:
https://stm32duinoforum.com/forum/viewt ... _3645.html
Other:
https://github.com/rogerclarkmelbourne/ ... /Uploading

2) Powered by USB-Serial 3.3V output:

Command line binary (write/overwrite bootloader):
https://github.com/rogerclarkmelbourne/ ... ws-command
More:
https://stm32duinoforum.com/forum/viewt ... tml#p45479
https://stm32duinoforum.com/forum/viewt ... _3645.html
Other:
https://github.com/rogerclarkmelbourne/ ... /Uploading
1) Powered separately w/ common PC ground:Generic / unbranded STM32F103 boards
The easiest way to upload to these board is to use a USB to Serial adapter connected to Hardware Serial 1 (Pins PA9 and PA10).
Additionally to enter serial bootloader mode, these boards, need to be configured so that Boot0 is HIGH and Boot1 is LOW. On most boards these pins are either connected to jump links or to switches.
To upload the board must be reset (with Boot0 HIGH and Boot1 LOW), so that the board enters serial bootloader mode. Once the upload is complete, the bootloader is instructed to run the code that has just been uploaded.
Note. If the board is reset again, the code will not run if Boot0 is still HIGH etc, so once development is complete, both Boot0 and Boot1 need to be set to LOW so that the code is run immediately after power on or restart.
The additional benefit of using a USB to Serial converter, is that for debugging, Serial.print() etc are sent to the same serial port that is use for uploading, and the whole build and debugging process is very much like using an Arduino Pro Mini board.
2) Powered by USB-Serial 3.3V output:
Command line binary (write/overwrite bootloader):
https://github.com/rogerclarkmelbourne/ ... ws-command
More:
https://stm32duinoforum.com/forum/viewt ... tml#p45479
Re: Uploading hex files to stm32f103
Thanks everyone !!! That s really helpfull 

Re: Uploading hex files to stm32f103
So dowmload it ready to upload but ... Which adress should i write the bin file to ? I m wondering if 0#08000000 is the adress for the bootloader and if my bin file should start at a further adress.
Thank you !
Re: Uploading hex files to stm32f103
Edit : just checked with my arduino IDE - adress is 0#08000000FGS wrote: Thu Nov 12, 2020 5:11 pmSo dowmload it ready to upload but ... Which adress should i write the bin file to ? I m wondering if 0#08000000 is the address for the bootloader and if my bin file should start at a further adress.
Thank you !

Re: Uploading hex files to stm32f103
If you're using usb<->ttl programmer you don't need additional bootloader so you can upload program at the beginning of flash memory.FGS wrote: Thu Nov 12, 2020 5:11 pm So dowmload it ready to upload but ... Which adress should i write the bin file to ? I m wondering if 0#08000000 is the adress for the bootloader and if my bin file should start at a further adress.
Thank you !