We try out MicroPython on STM32F429 Discovery kit. We pull the MicroPython v1.25.0 source code from github.
First `make -C mpy-cross` to build MicroPython cross compiler.
Then in ports/stm32, `make BOARD=STM32F429DISC submodules` to pull in libhydrogen, micropython-lib and stm32lib.
We need the GNU compiler arm-none-eabi-gcc; we use GCC version 13.3.1 from STM32CubeIDE 1.18.1. `make BOARD=STM32F429DISC` to build. The size of the firmware is about 320KB. STM32F429 has 2MB Flash.
We use stlink to flash; we build stlink v1.8.0 from the source. We need to specify the USB device ID, `export STLINK_DEVICE="0483:374b"` and `make BOARD=STM32F429DISC deploy-stlink` to download. openocd can also be used.
Connect to the STLINK USB serial port with minicom -D /dev/ttyACM0
>>> MicroPython v1.25.0 on 2025-04-24; F429I-DISCO with STM32F429
Type "help()" for more information.
No comments:
Post a Comment