Hi,
I'm new to MicroPython.
I have flashed MicroPython on to Nucleo-F401RE board using ST-Link using ELF file which was available from below forum page.
MicroPython is working now in Nucleo-F401RE board.
viewtopic.php?t=3709
2 questions -
1) What is the best way to convert Nucleo-F401RE board's latest .dfu file into .bin/.out/.hex/.elf?
2) ST-Link is not working Nucleo-F401RE now. How to revert back to original Nucleo-F401RE firmware?
Flashing MicroPython on to Nucleo-F401RE board using ST-Link
-
- Posts: 1
- Joined: Tue Dec 01, 2020 4:41 pm
Re: Flashing MicroPython on to Nucleo-F401RE board using ST-Link
For the second question just do
on your terminal
Code: Select all
st-flash erase
Re: Flashing MicroPython on to Nucleo-F401RE board using ST-Link
You can use the dfu.py tool (found in the micropython/tools directory) to convert a .dfu file into 2 .bin files: You can then use st-flash to flash each .bin file:
Code: Select all
$ ./tools/dfu.py --dump firmware.dfu
File: "firmware.dfu"
DfuSe v1, image size: 299941, targets: 1
Target 0, alt setting: 0, name: "ST...", size: 299656, elements: 2
0, address: 0x08000000, size: 14800
DUMPED IMAGE TO "firmware.dfu.target0.image0.bin"
1, address: 0x08020000, size: 284840
DUMPED IMAGE TO "firmware.dfu.target0.image1.bin"
usb: 0483:df11, device: 0x0000, dfu: 0x011a, UFD, 16, 0x8d9c418b
Code: Select all
st-flash write firmware.dfu.target0.image0.bin 0x08000000
st-flash write firmware.dfu.target0.image1.bin 0x08020000