CloningΒΆ

This page details cloning a Mecrisp-Stellaris image from a existing STM32F MCU or Board, complete with the Dictionary and Kernel so as to reproduce the same bootable system on another STM32F MCU or Board simply by flashing the image to it.
  1. Download the cloning file. It’s named “f051-clone.fs” as I tested it on a STM32F051 Discovery Board.

Download f051-clone.fs

  1. Set up something to capture the iHex file that will be generated by f051-clone.fs (I used e4thcom)
e4thcom -t mecrisp -d ttyUSB0 -b B115200  | tee e4thcom.log
  1. Load f051-clone.fs onto your chip/board and run ‘clone’, you should see something like this:-
clone

:100000008C030020754800000547000005470000EC
:1000100000000000000000000000000000000000E0
:100020000000000000000000000000002F4700005A
... lots more of the same
:108DF00000000270720000B5FBF72EFAF9F758FC7C
:108E0000043E2E732000F9F7F8FCF9F7EAFB00BDE9
:108E1000FFFFFFFF60080570722E66737047000049
:00000001FF
  1. Remove any log preamble and postamble then save it as clone.hex
  2. Create a binary file from the iHex file
arm-none-eabi-objcopy -I ihex -O binary clone.hex clone.bin
  1. Flash the binary to your STM32F chip/board
st-flash write clone.bin 0x08000000
  1. Test the Clone
  2. Optional; make a MD5SUM of your Clone binary, as it may come in handy later
md5sum clone.bin > clone.bin.md5sum

Finished!

Previous topic

Serial Terminal: Hardware Flow Control

Next topic

Interactive Assembly

This Page