I want to porting MicroPython on STM32L552, is it possible?
I know this series doesn't supported by MicroPython, so I try to download the MicroPython source code and modify some files.
In addition, I have added a new STM32L5 HAL Driver, but when compiling, there are a lot of problems, so I don't know if this is the right way, do you have any suggestions, thanks!
board.json
Code: Select all
{
"deploy": [
"../deploy.md"
],
"docs": "",
"features": [],
"images": [
"nucleo_l552rc.jpg"
],
"mcu": "stm32l5",
"product": "Nucleo L552VE",
"thumbnail": "",
"url": "",
"vendor": "ST Microelectronics"
}
Code: Select all
#define MICROPY_HW_BOARD_NAME "NUCLEO-L552VE"
#define MICROPY_HW_MCU_NAME "STM32L552VE"
Code: Select all
MCU_SERIES = l5
CMSIS_MCU = STM32L552xx
AF_FILE = boards/stm32l552_af.csv
LD_FILES = boards/stm32l552.ld boards/common_basic.ld
# OPENOCD_CONFIG = boards/openocd_stm32l4.cfg
# MicroPython settings
# MICROPY_VFS_FAT = 0
# MICROPY_VFS_LFS1 ?= 1
MICROPY_VFS_FAT = 1
# Don't include default frozen modules because MCU is tight on flash space
FROZEN_MANIFEST ?=
# LTO reduces final binary size, may be slower to build depending on gcc version and hardware
LTO ?= 1
Code: Select all
#ifndef MICROPY_INCLUDED_STM32L5XX_HAL_CONF_H
#define MICROPY_INCLUDED_STM32L5XX_HAL_CONF_H
#include "boards/stm32l5xx_hal_conf_base.h"
// Oscillator values in Hz
#define HSE_VALUE (8000000)
#define LSE_VALUE (32768)
#define EXTERNAL_SAI1_CLOCK_VALUE (48000)
#define EXTERNAL_SAI2_CLOCK_VALUE (48000)
// Oscillator timeouts in ms
#define HSE_STARTUP_TIMEOUT (100)
#define LSE_STARTUP_TIMEOUT (5000)
#endif // MICROPY_INCLUDED_STM32L4XX_HAL_CONF_H