Skip to content

Commit

Permalink
stm32/boards: Enable RAM_ISR feature on uart repl boards.
Browse files Browse the repository at this point in the history
mpconfigboard.mk: MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1
Fixes file transfer on the stlink usb / uart repl port.

Signed-off-by: Andrew Leech <[email protected]>
  • Loading branch information
pi-anl committed Oct 12, 2023
1 parent 3dffe26 commit 48f1471
Show file tree
Hide file tree
Showing 37 changed files with 65 additions and 1 deletion.
1 change: 1 addition & 0 deletions ports/stm32/boards/ARDUINO_GIGA/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_NETWORK_CYW43 = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
MBEDTLS_CONFIG_FILE = '"$(BOARD_DIR)/mbedtls_config_board.h"'
1 change: 1 addition & 0 deletions ports/stm32/boards/ARDUINO_PORTENTA_H7/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_NETWORK_CYW43 = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
MBEDTLS_CONFIG_FILE = '"$(BOARD_DIR)/mbedtls_config_board.h"'
1 change: 1 addition & 0 deletions ports/stm32/boards/B_L072Z_LRWAN1/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ LD_FILES = boards/stm32l072xz.ld boards/common_basic.ld

# MicroPython settings
MICROPY_VFS_FAT = 0
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

# Don't include default frozen modules because MCU is tight on flash space
FROZEN_MANIFEST ?=
Expand Down
2 changes: 2 additions & 0 deletions ports/stm32/boards/B_L475E_IOT01A/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_F091RC/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ LD_FILES = boards/stm32f091xc.ld boards/common_basic.ld
# MicroPython settings
MICROPY_VFS_FAT = 0
MICROPY_VFS_LFS1 ?= 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

# Don't include default frozen modules because MCU is tight on flash space
FROZEN_MANIFEST ?=
Expand Down
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F401RE/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F411RE/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F412ZG/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F413ZH/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_F429ZI/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_F439ZI/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F446RE/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_F722ZE/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_F746ZG/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_F756ZG/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_G0B1RE/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ endif

# LTO reduces final binary size, may be slower to build depending on gcc version and hardware
LTO ?= 1

MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_G474RE/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_H723ZG/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_VFS_LFS2 = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_H743ZI/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_VFS_LFS2 = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_L073RZ/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ LD_FILES = boards/stm32l072xz.ld boards/common_basic.ld

# MicroPython settings
MICROPY_VFS_FAT = 0
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

# Don't include default frozen modules because MCU is tight on flash space
FROZEN_MANIFEST ?=
Expand Down
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_L152RE/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_L432KC/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ OPENOCD_CONFIG = boards/openocd_stm32l4.cfg
# MicroPython settings
MICROPY_VFS_FAT = 0
MICROPY_VFS_LFS1 ?= 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

# Don't include default frozen modules because MCU is tight on flash space
FROZEN_MANIFEST ?=
Expand Down
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_L452RE/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_L476RG/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/NUCLEO_L4A6ZG/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_WB55/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ endif
MICROPY_PY_BLUETOOTH = 1
MICROPY_BLUETOOTH_NIMBLE = 1
MICROPY_VFS_LFS2 = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1
1 change: 1 addition & 0 deletions ports/stm32/boards/NUCLEO_WL55/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ TEXT0_ADDR = 0x08000000
# MicroPython settings
MICROPY_VFS_FAT = 0
MICROPY_VFS_LFS2 = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

# Don't include default frozen modules because MCU is tight on flash space
FROZEN_MANIFEST ?=
2 changes: 2 additions & 0 deletions ports/stm32/boards/OLIMEX_H407/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/STM32F429DISC/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
11 changes: 10 additions & 1 deletion ports/stm32/boards/STM32F769DISC/f769_qspi.ld
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -38,8 +39,16 @@ _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);
REGION_ALIAS("FLASH_COMMON", FLASH_APP);

SECTIONS
Expand All @@ -52,7 +61,7 @@ SECTIONS
. = ALIGN(4);
} >FLASH_QSPI

INCLUDE common_isr.ld
INCLUDE common_isr_gen.ld
INCLUDE common_text.ld
INCLUDE common_extratext_data_in_flash.ld
INCLUDE common_bss_heap_stack.ld
Expand Down
1 change: 1 addition & 0 deletions ports/stm32/boards/STM32F769DISC/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ endif
MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
1 change: 1 addition & 0 deletions ports/stm32/boards/STM32F7DISC/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ TEXT1_ADDR = 0x08020000
MICROPY_PY_LWIP = 1
MICROPY_PY_SSL = 1
MICROPY_SSL_MBEDTLS = 1
MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1

FROZEN_MANIFEST = $(BOARD_DIR)/manifest.py
2 changes: 2 additions & 0 deletions ports/stm32/boards/STM32H573I_DK/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ else
LD_FILES = boards/stm32h573xi.ld boards/common_basic.ld
TEXT0_ADDR = 0x08000000
endif

MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/STM32H7B3I_DK/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ LD_FILES = boards/stm32h7b3.ld boards/common_ifs.ld
TEXT0_ADDR = 0x08000000
TEXT1_ADDR = 0x08040000
endif

MICROPY_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/STM32L476DISC/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1
2 changes: 2 additions & 0 deletions ports/stm32/boards/STM32L496GDISC/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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_USE_RAM_ISR_UART_FLASH_FN = 1

0 comments on commit 48f1471

Please sign in to comment.