From 909fe30dfd32da71ac962f004d7626beb3c693d0 Mon Sep 17 00:00:00 2001 From: robert-hh Date: Fri, 9 Jun 2023 12:40:39 +0200 Subject: [PATCH] samd: Set the LFS type in mpconfigmcu.mk instead of mpconfigboard.mk. SAMD21: set the filesystem type to LFS1. SAMD51: the type is already set to LFS2, support is now dropped for LFS1. It has not been used and dropping it saves 10 k of flash. Signed-off-by: robert-hh --- .../samd/boards/ADAFRUIT_FEATHER_M0_EXPRESS/mpconfigboard.mk | 1 - .../samd/boards/ADAFRUIT_FEATHER_M4_EXPRESS/mpconfigboard.mk | 1 - .../boards/ADAFRUIT_ITSYBITSY_M0_EXPRESS/mpconfigboard.mk | 1 - .../boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS/mpconfigboard.mk | 1 - ports/samd/boards/ADAFRUIT_METRO_M4_EXPRESS/mpconfigboard.mk | 2 -- ports/samd/boards/ADAFRUIT_TRINKET_M0/mpconfigboard.mk | 4 ---- ports/samd/boards/MINISAM_M4/mpconfigboard.mk | 1 - ports/samd/boards/SAMD21_XPLAINED_PRO/mpconfigboard.mk | 4 ---- ports/samd/boards/SEEED_WIO_TERMINAL/mpconfigboard.mk | 1 - ports/samd/boards/SEEED_XIAO_SAMD21/mpconfigboard.mk | 5 ----- .../samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.mk | 1 - ports/samd/mcu/samd21/mpconfigmcu.mk | 2 ++ 12 files changed, 2 insertions(+), 22 deletions(-) diff --git a/ports/samd/boards/ADAFRUIT_FEATHER_M0_EXPRESS/mpconfigboard.mk b/ports/samd/boards/ADAFRUIT_FEATHER_M0_EXPRESS/mpconfigboard.mk index aa3fbd35da..e2895c7c0c 100644 --- a/ports/samd/boards/ADAFRUIT_FEATHER_M0_EXPRESS/mpconfigboard.mk +++ b/ports/samd/boards/ADAFRUIT_FEATHER_M0_EXPRESS/mpconfigboard.mk @@ -5,5 +5,4 @@ TEXT0 = 0x2000 # The ?='s allow overriding in mpconfigboard.mk. # MicroPython settings -MICROPY_VFS_LFS1 ?= 1 MICROPY_HW_CODESIZE ?= 248K diff --git a/ports/samd/boards/ADAFRUIT_FEATHER_M4_EXPRESS/mpconfigboard.mk b/ports/samd/boards/ADAFRUIT_FEATHER_M4_EXPRESS/mpconfigboard.mk index 70d73ee6fa..6ec2d43ded 100644 --- a/ports/samd/boards/ADAFRUIT_FEATHER_M4_EXPRESS/mpconfigboard.mk +++ b/ports/samd/boards/ADAFRUIT_FEATHER_M4_EXPRESS/mpconfigboard.mk @@ -5,5 +5,4 @@ TEXT0 = 0x4000 # The ?='s allow overriding in mpconfigboard.mk. # MicroPython settings -MICROPY_VFS_LFS1 ?= 1 MICROPY_HW_CODESIZE ?= 496K diff --git a/ports/samd/boards/ADAFRUIT_ITSYBITSY_M0_EXPRESS/mpconfigboard.mk b/ports/samd/boards/ADAFRUIT_ITSYBITSY_M0_EXPRESS/mpconfigboard.mk index aa3fbd35da..e2895c7c0c 100644 --- a/ports/samd/boards/ADAFRUIT_ITSYBITSY_M0_EXPRESS/mpconfigboard.mk +++ b/ports/samd/boards/ADAFRUIT_ITSYBITSY_M0_EXPRESS/mpconfigboard.mk @@ -5,5 +5,4 @@ TEXT0 = 0x2000 # The ?='s allow overriding in mpconfigboard.mk. # MicroPython settings -MICROPY_VFS_LFS1 ?= 1 MICROPY_HW_CODESIZE ?= 248K diff --git a/ports/samd/boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS/mpconfigboard.mk b/ports/samd/boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS/mpconfigboard.mk index 7ef411431d..740154a6d6 100644 --- a/ports/samd/boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS/mpconfigboard.mk +++ b/ports/samd/boards/ADAFRUIT_ITSYBITSY_M4_EXPRESS/mpconfigboard.mk @@ -5,5 +5,4 @@ TEXT0 = 0x4000 # The ?='s allow overriding in mpconfigboard.mk. # MicroPython settings -MICROPY_VFS_LFS1 ?= 1 MICROPY_HW_CODESIZE ?= 496K diff --git a/ports/samd/boards/ADAFRUIT_METRO_M4_EXPRESS/mpconfigboard.mk b/ports/samd/boards/ADAFRUIT_METRO_M4_EXPRESS/mpconfigboard.mk index a196612539..1a2635f7af 100644 --- a/ports/samd/boards/ADAFRUIT_METRO_M4_EXPRESS/mpconfigboard.mk +++ b/ports/samd/boards/ADAFRUIT_METRO_M4_EXPRESS/mpconfigboard.mk @@ -4,8 +4,6 @@ LD_FILES = boards/samd51x19a.ld sections.ld TEXT0 = 0x4000 # MicroPython settings -MICROPY_VFS_LFS1 ?= 1 - MICROPY_PY_NETWORK ?= 1 MICROPY_PY_NETWORK_NINAW10 ?= 1 diff --git a/ports/samd/boards/ADAFRUIT_TRINKET_M0/mpconfigboard.mk b/ports/samd/boards/ADAFRUIT_TRINKET_M0/mpconfigboard.mk index 448da296f4..5b4d0b63e7 100644 --- a/ports/samd/boards/ADAFRUIT_TRINKET_M0/mpconfigboard.mk +++ b/ports/samd/boards/ADAFRUIT_TRINKET_M0/mpconfigboard.mk @@ -2,7 +2,3 @@ MCU_SERIES = SAMD21 CMSIS_MCU = SAMD21E18A LD_FILES = boards/samd21x18a.ld sections.ld TEXT0 = 0x2000 - -# The ?='s allow overriding in mpconfigboard.mk. -# MicroPython settings -MICROPY_VFS_LFS1 ?= 1 diff --git a/ports/samd/boards/MINISAM_M4/mpconfigboard.mk b/ports/samd/boards/MINISAM_M4/mpconfigboard.mk index 4ccbf92c7e..54948627d2 100644 --- a/ports/samd/boards/MINISAM_M4/mpconfigboard.mk +++ b/ports/samd/boards/MINISAM_M4/mpconfigboard.mk @@ -6,5 +6,4 @@ TEXT0 = 0x4000 # The ?='s allow overriding in mpconfigboard.mk. # MicroPython settings -MICROPY_VFS_LFS1 ?= 1 MICROPY_HW_CODESIZE ?= 496K diff --git a/ports/samd/boards/SAMD21_XPLAINED_PRO/mpconfigboard.mk b/ports/samd/boards/SAMD21_XPLAINED_PRO/mpconfigboard.mk index b298c9d7fc..f95c654938 100644 --- a/ports/samd/boards/SAMD21_XPLAINED_PRO/mpconfigboard.mk +++ b/ports/samd/boards/SAMD21_XPLAINED_PRO/mpconfigboard.mk @@ -2,7 +2,3 @@ MCU_SERIES = SAMD21 CMSIS_MCU = SAMD21J18A LD_FILES = boards/samd21x18a.ld sections.ld TEXT0 = 0x2000 - -# The ?='s allow overriding in mpconfigboard.mk. -# MicroPython settings -MICROPY_VFS_LFS1 ?= 1 \ No newline at end of file diff --git a/ports/samd/boards/SEEED_WIO_TERMINAL/mpconfigboard.mk b/ports/samd/boards/SEEED_WIO_TERMINAL/mpconfigboard.mk index 03f97e138c..7bf70ac669 100644 --- a/ports/samd/boards/SEEED_WIO_TERMINAL/mpconfigboard.mk +++ b/ports/samd/boards/SEEED_WIO_TERMINAL/mpconfigboard.mk @@ -5,5 +5,4 @@ TEXT0 = 0x4000 # The ?='s allow overriding in mpconfigboard.mk. # MicroPython settings -MICROPY_VFS_LFS1 ?= 1 MICROPY_HW_CODESIZE ?= 496K diff --git a/ports/samd/boards/SEEED_XIAO_SAMD21/mpconfigboard.mk b/ports/samd/boards/SEEED_XIAO_SAMD21/mpconfigboard.mk index eb4d4d045e..8696c966bc 100644 --- a/ports/samd/boards/SEEED_XIAO_SAMD21/mpconfigboard.mk +++ b/ports/samd/boards/SEEED_XIAO_SAMD21/mpconfigboard.mk @@ -2,8 +2,3 @@ MCU_SERIES = SAMD21 CMSIS_MCU = SAMD21G18A LD_FILES = boards/samd21x18a.ld sections.ld TEXT0 = 0x2000 - -# The ?='s allow overriding in mpconfigboard.mk. -# MicroPython settings -MICROPY_VFS_LFS1 ?= 1 - diff --git a/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.mk b/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.mk index 65b1ba7a33..263e582694 100644 --- a/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.mk +++ b/ports/samd/boards/SPARKFUN_SAMD51_THING_PLUS/mpconfigboard.mk @@ -5,5 +5,4 @@ TEXT0 = 0x4000 # The ?='s allow overriding in mpconfigboard.mk. # MicroPython settings -MICROPY_VFS_LFS1 ?= 1 MICROPY_HW_CODESIZE ?= 1008K diff --git a/ports/samd/mcu/samd21/mpconfigmcu.mk b/ports/samd/mcu/samd21/mpconfigmcu.mk index 2e16d12a2d..cce8f0e04e 100644 --- a/ports/samd/mcu/samd21/mpconfigmcu.mk +++ b/ports/samd/mcu/samd21/mpconfigmcu.mk @@ -4,6 +4,8 @@ MPY_CROSS_MCU_ARCH = armv6m MICROPY_HW_CODESIZE ?= 184K +MICROPY_VFS_LFS1 ?= 1 + SRC_S += shared/runtime/gchelper_thumb1.s LIBM_SRC_C += $(addprefix lib/libm/,\