Commit 96706666 authored by Andrew Leech's avatar Andrew Leech Committed by Damien George

stm32/boards: Enable RAM_ISR feature on boards with UART REPL.

Allows mpremote file transfer to work correctly when mpremote is used over
the ST-link USB/UART REPL port.

Fixes issue #8386.
Signed-off-by: default avatarAndrew Leech <andrew.leech@planetinnovation.com.au>
parent 1f5cab9e
......@@ -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
......@@ -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 ?=
......
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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 ?=
......
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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);
......
......@@ -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
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment