[NUCLEO-F401RE] procedure to upload the MicroPython image

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
rino
Posts: 1
Joined: Sat Nov 03, 2018 8:54 am

Re: [NUCLEO-F401RE] procedure to upload the MicroPython image

Post by rino » Sat Nov 03, 2018 9:05 am

I just wrote an article about how to flash a Nucleo-64 STM32F401 board starting from the .dfu binary and using the ST morpho pins:

http://www.perlatecnica.it/tutorial/stm ... stm32f401/

Sorry it's in Italian

User avatar
boochow
Posts: 23
Joined: Sat Dec 16, 2017 9:36 am

Re: [NUCLEO-F401RE] procedure to upload the MicroPython image

Post by boochow » Mon Dec 03, 2018 1:26 pm

The easiest way to deploy MicroPython to Mbed-ready boards is to drag and drop a firmware binary onto Mbed filesystem folder.
I made an archive page which has firmware binaries built on December 1, 2018 from MicroPython mainline source code.

https://blog.boochow.com/micropython-fi ... bed-boards
(I have tested only 3 boards: 401RE, L432KC, and IOT01A.)

They are zipped files so you should download the file for your board then unzip it to get the binary file.
Drag and drop the binary file onto the folder which would open when you connect the board to your PC with USB.

These binary files are simply converted from ELF files using objdump like this:

Code: Select all

arm-none-eabi-objcopy -O binary build-STM32F769DISC/firmware.elf upy-f746disco.bin
What this method is inferior to the official deploy method is that this method will erase all of the internal files saved in flash memory area.
This is unavoidable because the internal filesystem block is placed between ISR and TEXT area and the format of raw binary file provides no means to skip writing the specific memory area.

nilo
Posts: 2
Joined: Tue Jan 08, 2019 12:13 am

Re: [NUCLEO-F401RE] procedure to upload the MicroPython image

Post by nilo » Tue Jan 08, 2019 7:28 pm

boochow,
thanks for creating the "bin" file for the iot1a, you make life easier.
I got the REPL working. since I just downloaded your binary files
I do not have the "boot.py" and "main.py". how do I run a script?
like writing a script inside main.py, reset the board to run the script.
any comments will be highly appreciated, sorry for bothering you I'm a newbie.

User avatar
boochow
Posts: 23
Joined: Sat Dec 16, 2017 9:36 am

Re: [NUCLEO-F401RE] procedure to upload the MicroPython image

Post by boochow » Wed Jan 09, 2019 11:55 am

@nilo the IoT1A board has two USB ports, USB-STLink on the top right corner and USB-OTG on the top center.
You can access the files through USB-OTG port only. USB-STLink port is dedicated to Mbed.

Please note that ( i ) you always have to connect the USB-STLink port to power your board and ( ii ) the USB-OTG port is a micro USB connector which is soldered in upside-down position.

nilo
Posts: 2
Joined: Tue Jan 08, 2019 12:13 am

Re: [NUCLEO-F401RE] procedure to upload the MicroPython image

Post by nilo » Mon Jan 14, 2019 6:15 pm

@boochow,
thanks a lot, everything is working now (using 2 microUSB's). This is the quickest MicroPython implementation on the IOT1A.
now I just have have to find drivers for all the sensors on this board. I got the VL53L0X drivers from desiphu working too.

Post Reply