Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (43 sloc) 2 KB
Announced versus available Flash size on F103
============================================
Up to Stlink V2, the CPU soldered on the board was a F103C8 with 64 kiByte
flash. Up to about version 280 of BMP, this limit was not hit when linked
against nanolib.
StlinkV2-1 has a STM32F103CB, like a genuine BMP.
However with more and more devices supported, BMP at about version 282 hit
this limit. There are two ways to work around:
- Branch STlink V2-1 as separate platform and and care for the original STlink
platform by restricting/ommitting features.
- Rely on uncertain upper flash on F103C8
The first option needs more care as an additional platform is introduced and
will restrict usage of older STlinks as BMPs.
However F103C8 and F103CB have the same chip and upper flash exists on F103C8.
This flash may have been tested bad, or not have been tested at all,
or, in the best case, was tested good but market requirements made STM sell
it as F103C8.
Ignoring the chip marking and using an F103C8 blindly as a F103Cb is done
already with few problems on many china boards (e.g. blue pill). Probably
this second approach will work for many of the older STLinks.
dfu-util cares for the size and refuses to programm above the announced size:
> dfu-util -S E4D078EA -s 0x08002000:leave -D blackmagic.bin
dfu-util 0.9
...
dfu-util: Last page at 0x0801093f is not writeable
Flash above the announced size with recent bootloader/BMP:
==========================================================
script/stm32_mem.py does not care for the announced size:
> ../scripts/stm32_mem.py blackmagic.bin
...
USB Device Firmware Upgrade - Host Utility -- version 1.2
...
Programming memory at 0x08010800
All operations complete!
Get length of binary
> ls -l blackmagic.bin
-rwxr-xr-x 1 bon users 59712 21. Sep 22:47 blackmagic.bin
Actual file size may differ!
Upload binary from flash with the exact size
> dfu-util -s 0x08002000:leave:force:59712 -U blackmagic.bin.1
Compare
> diff blackmagic.bin*
No differences should get reported!
You can’t perform that action at this time.