diff --git a/ports/stm32/boards/B_L475E_IOT01A/mpconfigboard.mk b/ports/stm32/boards/B_L475E_IOT01A/mpconfigboard.mk index 137b6be23d01..2649b0968201 100644 --- a/ports/stm32/boards/B_L475E_IOT01A/mpconfigboard.mk +++ b/ports/stm32/boards/B_L475E_IOT01A/mpconfigboard.mk @@ -5,3 +5,5 @@ CMSIS_MCU = STM32L475xx AF_FILE = boards/stm32l476_af.csv LD_FILES = boards/stm32l476xg.ld boards/common_basic.ld OPENOCD_CONFIG = boards/openocd_stm32l4.cfg + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_F091RC/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F091RC/mpconfigboard.mk index bb7142d1b3e2..193ed793f6fc 100644 --- a/ports/stm32/boards/NUCLEO_F091RC/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F091RC/mpconfigboard.mk @@ -6,6 +6,7 @@ LD_FILES = boards/stm32f091xc.ld boards/common_basic.ld # MicroPython settings MICROPY_VFS_FAT = 0 MICROPY_VFS_LFS1 ?= 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 # Don't include default frozen modules because MCU is tight on flash space FROZEN_MANIFEST ?= diff --git a/ports/stm32/boards/NUCLEO_F401RE/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F401RE/mpconfigboard.mk index 4c3022f54435..a9985df30258 100644 --- a/ports/stm32/boards/NUCLEO_F401RE/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F401RE/mpconfigboard.mk @@ -4,3 +4,5 @@ AF_FILE = boards/stm32f401_af.csv LD_FILES = boards/stm32f401xe.ld boards/common_ifs.ld TEXT0_ADDR = 0x08000000 TEXT1_ADDR = 0x08020000 + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_F411RE/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F411RE/mpconfigboard.mk index df9506522574..d17217e6392d 100644 --- a/ports/stm32/boards/NUCLEO_F411RE/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F411RE/mpconfigboard.mk @@ -4,3 +4,5 @@ AF_FILE = boards/stm32f411_af.csv LD_FILES = boards/stm32f411.ld boards/common_ifs.ld TEXT0_ADDR = 0x08000000 TEXT1_ADDR = 0x08020000 + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_F412ZG/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F412ZG/mpconfigboard.mk index dd671a9f9014..2fbb4ddbe2dd 100644 --- a/ports/stm32/boards/NUCLEO_F412ZG/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F412ZG/mpconfigboard.mk @@ -4,3 +4,5 @@ AF_FILE = boards/stm32f412_af.csv LD_FILES = boards/stm32f412zx.ld boards/common_ifs.ld TEXT0_ADDR = 0x08000000 TEXT1_ADDR = 0x08020000 + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_F413ZH/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F413ZH/mpconfigboard.mk index 7d8ea6bf6bbb..b1cbee9a62d2 100644 --- a/ports/stm32/boards/NUCLEO_F413ZH/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F413ZH/mpconfigboard.mk @@ -4,3 +4,5 @@ AF_FILE = boards/stm32f413_af.csv LD_FILES = boards/stm32f413xh.ld boards/common_ifs.ld TEXT0_ADDR = 0x08000000 TEXT1_ADDR = 0x08060000 + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.mk index e5fc89ab47aa..f691ad2ffc6e 100644 --- a/ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.mk @@ -9,5 +9,6 @@ TEXT1_ADDR = 0x08020000 MICROPY_PY_LWIP = 1 MICROPY_PY_SSL = 1 MICROPY_SSL_MBEDTLS = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py diff --git a/ports/stm32/boards/NUCLEO_F439ZI/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F439ZI/mpconfigboard.mk index b8666755b034..8a45794f0a3e 100644 --- a/ports/stm32/boards/NUCLEO_F439ZI/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F439ZI/mpconfigboard.mk @@ -9,5 +9,6 @@ TEXT1_ADDR = 0x08020000 MICROPY_PY_LWIP = 1 MICROPY_PY_SSL = 1 MICROPY_SSL_MBEDTLS = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py diff --git a/ports/stm32/boards/NUCLEO_F446RE/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F446RE/mpconfigboard.mk index 3a922acebfbd..6567f829a345 100644 --- a/ports/stm32/boards/NUCLEO_F446RE/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F446RE/mpconfigboard.mk @@ -4,3 +4,5 @@ AF_FILE = boards/stm32f446_af.csv LD_FILES = boards/stm32f411.ld boards/common_ifs.ld TEXT0_ADDR = 0x08000000 TEXT1_ADDR = 0x08020000 + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_F722ZE/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F722ZE/mpconfigboard.mk index 667c8e55da98..1d32f0b979ef 100644 --- a/ports/stm32/boards/NUCLEO_F722ZE/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F722ZE/mpconfigboard.mk @@ -4,3 +4,5 @@ AF_FILE = boards/stm32f722_af.csv LD_FILES = boards/stm32f722.ld boards/common_ifs.ld TEXT0_ADDR = 0x08000000 TEXT1_ADDR = 0x08020000 + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_F746ZG/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F746ZG/mpconfigboard.mk index 20acc63f160e..81c6b4629580 100644 --- a/ports/stm32/boards/NUCLEO_F746ZG/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F746ZG/mpconfigboard.mk @@ -9,5 +9,6 @@ TEXT1_ADDR = 0x08020000 MICROPY_PY_LWIP = 1 MICROPY_PY_SSL = 1 MICROPY_SSL_MBEDTLS = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py diff --git a/ports/stm32/boards/NUCLEO_F756ZG/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F756ZG/mpconfigboard.mk index ab3eada5b067..979df77e9437 100644 --- a/ports/stm32/boards/NUCLEO_F756ZG/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F756ZG/mpconfigboard.mk @@ -9,5 +9,6 @@ TEXT1_ADDR = 0x08020000 MICROPY_PY_LWIP = 1 MICROPY_PY_SSL = 1 MICROPY_SSL_MBEDTLS = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py diff --git a/ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.mk index 22c40981591c..693429241a59 100644 --- a/ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.mk @@ -10,5 +10,6 @@ TEXT1_ADDR = 0x08020000 MICROPY_PY_LWIP = 1 MICROPY_PY_SSL = 1 MICROPY_SSL_MBEDTLS = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py diff --git a/ports/stm32/boards/NUCLEO_G0B1RE/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_G0B1RE/mpconfigboard.mk index abc9b43ef036..f1c135710831 100644 --- a/ports/stm32/boards/NUCLEO_G0B1RE/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_G0B1RE/mpconfigboard.mk @@ -11,3 +11,5 @@ endif # LTO reduces final binary size, may be slower to build depending on gcc version and hardware LTO ?= 1 + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_G474RE/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_G474RE/mpconfigboard.mk index 24a06e08ec43..a72c4e03d3e0 100644 --- a/ports/stm32/boards/NUCLEO_G474RE/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_G474RE/mpconfigboard.mk @@ -4,3 +4,5 @@ CMSIS_MCU = STM32G474xx MICROPY_FLOAT_IMPL = single AF_FILE = boards/stm32g474_af.csv LD_FILES = boards/stm32g474.ld boards/common_basic.ld + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_H563ZI/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_H563ZI/mpconfigboard.mk index a55a54d1c76d..e2ce5e333302 100644 --- a/ports/stm32/boards/NUCLEO_H563ZI/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_H563ZI/mpconfigboard.mk @@ -21,3 +21,4 @@ endif MICROPY_PY_LWIP = 1 MICROPY_PY_SSL = 1 MICROPY_SSL_MBEDTLS = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_H723ZG/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_H723ZG/mpconfigboard.mk index 6d512ec0eda2..b05da481f65e 100644 --- a/ports/stm32/boards/NUCLEO_H723ZG/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_H723ZG/mpconfigboard.mk @@ -21,5 +21,6 @@ MICROPY_PY_LWIP = 1 MICROPY_PY_SSL = 1 MICROPY_SSL_MBEDTLS = 1 MICROPY_VFS_LFS2 = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py diff --git a/ports/stm32/boards/NUCLEO_H743ZI/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_H743ZI/mpconfigboard.mk index cbdf48c52a86..35e62c470ac5 100644 --- a/ports/stm32/boards/NUCLEO_H743ZI/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_H743ZI/mpconfigboard.mk @@ -21,5 +21,6 @@ MICROPY_PY_LWIP = 1 MICROPY_PY_SSL = 1 MICROPY_SSL_MBEDTLS = 1 MICROPY_VFS_LFS2 = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py diff --git a/ports/stm32/boards/NUCLEO_L152RE/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_L152RE/mpconfigboard.mk index a62a775ac8dd..c6dfeb85fd96 100644 --- a/ports/stm32/boards/NUCLEO_L152RE/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_L152RE/mpconfigboard.mk @@ -2,3 +2,5 @@ MCU_SERIES = l1 CMSIS_MCU = STM32L152xE AF_FILE = boards/stm32l152_af.csv LD_FILES = boards/stm32l152xe.ld boards/common_basic.ld + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_L432KC/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_L432KC/mpconfigboard.mk index c3fff8100251..8e816b395b0f 100644 --- a/ports/stm32/boards/NUCLEO_L432KC/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_L432KC/mpconfigboard.mk @@ -7,6 +7,7 @@ OPENOCD_CONFIG = boards/openocd_stm32l4.cfg # MicroPython settings MICROPY_VFS_FAT = 0 MICROPY_VFS_LFS1 ?= 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 # Don't include default frozen modules because MCU is tight on flash space FROZEN_MANIFEST ?= diff --git a/ports/stm32/boards/NUCLEO_L452RE/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_L452RE/mpconfigboard.mk index 25ccb45a9427..3bfeda761fcf 100644 --- a/ports/stm32/boards/NUCLEO_L452RE/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_L452RE/mpconfigboard.mk @@ -3,3 +3,5 @@ CMSIS_MCU = STM32L452xx AF_FILE = boards/stm32l452_af.csv LD_FILES = boards/stm32l452xe.ld boards/common_basic.ld OPENOCD_CONFIG = boards/openocd_stm32l4.cfg + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_L476RG/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_L476RG/mpconfigboard.mk index 10c69461c930..2a7a6f9ad10c 100644 --- a/ports/stm32/boards/NUCLEO_L476RG/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_L476RG/mpconfigboard.mk @@ -3,3 +3,5 @@ CMSIS_MCU = STM32L476xx AF_FILE = boards/stm32l476_af.csv LD_FILES = boards/stm32l476xg.ld boards/common_basic.ld OPENOCD_CONFIG = boards/openocd_stm32l4.cfg + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_L4A6ZG/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_L4A6ZG/mpconfigboard.mk index 51caeaa3a1f9..fddf0a6c352e 100644 --- a/ports/stm32/boards/NUCLEO_L4A6ZG/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_L4A6ZG/mpconfigboard.mk @@ -3,3 +3,5 @@ CMSIS_MCU = STM32L4A6xx AF_FILE = boards/stm32l496_af.csv LD_FILES = boards/stm32l496xg.ld boards/common_basic.ld OPENOCD_CONFIG = boards/openocd_stm32l4.cfg + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.mk index 2e6ce1fe8f77..4beaf9cf6cbc 100644 --- a/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_WB55/mpconfigboard.mk @@ -17,3 +17,4 @@ endif MICROPY_PY_BLUETOOTH = 1 MICROPY_BLUETOOTH_NIMBLE = 1 MICROPY_VFS_LFS2 = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/NUCLEO_WL55/mpconfigboard.mk b/ports/stm32/boards/NUCLEO_WL55/mpconfigboard.mk index ced2e7619b95..f137fccebb80 100644 --- a/ports/stm32/boards/NUCLEO_WL55/mpconfigboard.mk +++ b/ports/stm32/boards/NUCLEO_WL55/mpconfigboard.mk @@ -8,6 +8,7 @@ TEXT0_ADDR = 0x08000000 # MicroPython settings MICROPY_VFS_FAT = 0 MICROPY_VFS_LFS2 = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 # Board-specific manifest (doesn't include default modules, adds LoRa driver). FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py diff --git a/ports/stm32/boards/OLIMEX_H407/mpconfigboard.mk b/ports/stm32/boards/OLIMEX_H407/mpconfigboard.mk index b154dcfbacdc..5c74443c4c41 100644 --- a/ports/stm32/boards/OLIMEX_H407/mpconfigboard.mk +++ b/ports/stm32/boards/OLIMEX_H407/mpconfigboard.mk @@ -4,3 +4,5 @@ AF_FILE = boards/stm32f405_af.csv LD_FILES = boards/stm32f405.ld boards/common_ifs.ld TEXT0_ADDR = 0x08000000 TEXT1_ADDR = 0x08020000 + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/STM32F429DISC/mpconfigboard.mk b/ports/stm32/boards/STM32F429DISC/mpconfigboard.mk index d19a35c31629..0cff5fd2ada6 100644 --- a/ports/stm32/boards/STM32F429DISC/mpconfigboard.mk +++ b/ports/stm32/boards/STM32F429DISC/mpconfigboard.mk @@ -4,3 +4,5 @@ AF_FILE = boards/stm32f429_af.csv LD_FILES = boards/stm32f429.ld boards/common_ifs.ld TEXT0_ADDR = 0x08000000 TEXT1_ADDR = 0x08020000 + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 diff --git a/ports/stm32/boards/STM32F769DISC/f769_qspi.ld b/ports/stm32/boards/STM32F769DISC/f769_qspi.ld index cde1ef5ca66c..817422bee022 100644 --- a/ports/stm32/boards/STM32F769DISC/f769_qspi.ld +++ b/ports/stm32/boards/STM32F769DISC/f769_qspi.ld @@ -17,6 +17,7 @@ MEMORY { + FLASH_FS (r) : ORIGIN = 0x08008000, LENGTH = 96K /* sectors 1, 2, 3 (32K each) */ FLASH_APP (rx) : ORIGIN = 0x08020000, LENGTH = 1920K /* sectors 4-11 1*128K 7*256K */ FLASH_QSPI (rx) : ORIGIN = 0x90000000, LENGTH = 64M /* external QSPI flash in XIP mode */ DTCM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K /* Used for storage cache */ @@ -38,6 +39,12 @@ _ram_end = ORIGIN(RAM) + LENGTH(RAM); _heap_start = _ebss; /* heap starts just after statically allocated memory */ _heap_end = _sstack; +/* Filesystem cache in RAM, and storage in flash */ +_micropy_hw_internal_flash_storage_ram_cache_start = ORIGIN(DTCM); +_micropy_hw_internal_flash_storage_ram_cache_end = ORIGIN(DTCM) + LENGTH(DTCM); +_micropy_hw_internal_flash_storage_start = ORIGIN(FLASH_FS); +_micropy_hw_internal_flash_storage_end = ORIGIN(FLASH_FS) + LENGTH(FLASH_FS); + ENTRY(Reset_Handler) REGION_ALIAS("FLASH_ISR", FLASH_APP); diff --git a/ports/stm32/boards/STM32F7DISC/mpconfigboard.mk b/ports/stm32/boards/STM32F7DISC/mpconfigboard.mk index 20acc63f160e..81c6b4629580 100644 --- a/ports/stm32/boards/STM32F7DISC/mpconfigboard.mk +++ b/ports/stm32/boards/STM32F7DISC/mpconfigboard.mk @@ -9,5 +9,6 @@ TEXT1_ADDR = 0x08020000 MICROPY_PY_LWIP = 1 MICROPY_PY_SSL = 1 MICROPY_SSL_MBEDTLS = 1 +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1 FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py diff --git a/ports/stm32/boards/STM32L496GDISC/mpconfigboard.mk b/ports/stm32/boards/STM32L496GDISC/mpconfigboard.mk index a85635e306d9..b64229418f9a 100644 --- a/ports/stm32/boards/STM32L496GDISC/mpconfigboard.mk +++ b/ports/stm32/boards/STM32L496GDISC/mpconfigboard.mk @@ -3,3 +3,5 @@ CMSIS_MCU = STM32L496xx AF_FILE = boards/stm32l496_af.csv LD_FILES = boards/stm32l496xg.ld boards/common_basic.ld OPENOCD_CONFIG = boards/openocd_stm32l4.cfg + +MICROPY_HW_ENABLE_ISR_UART_FLASH_FUNCS_IN_RAM = 1