-
Notifications
You must be signed in to change notification settings - Fork 6
Flashing
/!\ If you have a clone with a CH32F103, use the CH32 flash setup /!\
There are 2 executables to flash through SWD / Serial:
- The bootloader
- The main App
The bootloader is also able to do DFU update IF you have the usb setup.
You'll have to replace /dev/XXXX by the port the blackmagic is connected to
First step is to erase the whole flash and remove rdp.
For that one it may be better to NOT power the DSO as usual and just connect GND+SWDIO/SWDCLK+VCC to the blackmagic (the MCU will be powered by the MCU)
arm-none-eabi-gdb -ex "target extended-remote /dev/XXXXX" -ex "monitor swdp_scan" -ex "attach 1" -ex "mon option erase"
Power cycle.
Now you can power it anyway you want
Flash the bootloader code
arm-none-eabi-gdb -ex "target extended-remote /dev/XXXXX" -ex "monitor swdp_scan" -ex "attach 1" -ex "load bootloader.elf" -ex "compare-sections" -ex "set confirm off" -ex "file bootloader.elf"
arm-none-eabi-gdb -ex "target extended-remote /dev/XXXXX" -ex "monitor swdp_scan" -ex "attach 1" -ex "load Dso150.elf" -ex "compare-sections" -ex "set confirm off" -ex "file Dso150.elf"
Reboot, you should see the splash screen
Download the stlink utilities ( as of now https://github.com/stlink-org/stlink/releases/tag/v1.6.1 ) Take the stlink-1.6.1-x86_64-w64-mingw32.zip version if you are running a recent windows (64 bits).
Fetch the 2 binaries for you (probably stm32f1 bootloader and app) then :
st-flash write bootloader.bin 0x8000000
st-flash write dso.bin 0x8002000
Download firmware from jyetech and unzip it
Power the board through SWD, or power it on normally without 3.3v on the SWD interface, not both!
st-flash --format ihex write 113-15001-064.hex
(replace the xxxx.hex by the correct name)
You shouldnt have issue with serial number as we dont modify the e2prom, but i'm not 100% sure