Port for MicroPython language on STM32 developed for Fusion for ARM v8.
You are required to init submodules and install required compilers. Required compilers are GCC/G++ (GNU SDK) for ARM.
Submodule initialization:
git submodule update --init lib/micropython
cd lib/micropython
git submodule update --init lib/stm32lib lib/mbedtls lib/lwip lib/micropython-lib
Compiling required cross compiler for MP:
make -C lib/micropython/mpy-cross
To build a firmware for choosen development board, you need to do following. The firmware will be located at boards/<dev_board>/build/firmware.hex
.
cd boards/<dev_board>
make -j$(nproc) LTO=1 DEBUG=0 LOWMEM=1
LTO
(Link Time Optimisation) usually shrinks .hex file for 2-3%. Not recommended in usage when MbedTLS is enabled.
DEBUG
stands to enable debugging symbols for GDB.
LOWMEM
is used to build a firmware for Low Memory MCU or normal (> 1024KB flash size).
Differences are explained in LATEST.md.
To generate a Alternate Function file (stm32*_af.csv
), and later use it for specific MCU port, please execute following Python script:
python3 make-af-csv.py <stm32_mcu_name>
This script is not included in this repo. To get the script, click here (make-af-csv.py
).
Port currently DOES NOT support TFT SSD19603 controller.
However, plans are to add LVGL support.
This MPY port supports following STM32 families (some of them are ported):
- F0
- F4
- F7
- G0*
- G4*
- H7!
- L0*
- L4*
- WB!
(*) With minimal possible usage beacuse of memory limit & other things
(!) May not all alternate functions (LAN, BLE, Wi-Fi) usable or developed
projectWrite
The ports are automatically built by GitHub Actions on every new commit. Check the latest release to find a HEX file for your MCU.
MicroPython is licensed under MIT license by Damien P. George Copyright (c) 2021 Damien P. George
This port is licensed under CC BY-3.0 license under Uglješa Lukešević.
Full support written for MikroE MCU cards.
On every file that uses this port, please add this header:
/* Port written by Uglješa Lukešević (@ukicomputers) *
* MicroPython licensed with MIT license under Damien P. George */
"""
Port written by Uglješa Lukešević (@ukicomputers)
MicroPython licensed with MIT license under Damien P. George
"""
It is also required when calling help()
in MicroPython firmware to output show that port is written by me. That is already set up.
If use this port in NECTO, also in About section, define that port is written by me, exactly like this:
Uglješa Lukešević