diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 3a8ad4acc8..1df782dab1 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -111,12 +111,18 @@ else # -finline-limit can shrink the image size. # -finline-limit=80 or so is similar to not having it on. # There is no simple default value, though. - ifeq ($(INTERNAL_FLASH_FILESYSTEM),1) - CFLAGS += -finline-limit=50 + + # Do a default shrink for small builds. + ifndef CFLAGS_INLINE_LIMIT + ifeq ($(CIRCUITPY_SMALL_BUILD),1) + CFLAGS_INLINE_LIMIT = 50 + endif endif + ifdef CFLAGS_INLINE_LIMIT CFLAGS += -finline-limit=$(CFLAGS_INLINE_LIMIT) endif + CFLAGS += -flto endif diff --git a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk index e7171181b7..a543468e52 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk @@ -4,14 +4,10 @@ USB_PID = 0x8053 USB_PRODUCT = "Arduino MKR1300" USB_MANUFACTURER = "Arduino" -INTERNAL_FLASH_FILESYSTEM = 1 -LONGINT_IMPL = NONE -CIRCUITPY_SMALL_BUILD = 1 - CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE +CIRCUITPY_SMALL_BUILD = 1 +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk index 49436a0b30..5612eb88d7 100644 --- a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0x8050 USB_PRODUCT = "Arduino MKRZero" USB_MANUFACTURER = "Arduino" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk index 9b4de5688a..cbbf15a3ef 100644 --- a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0x824D USB_PRODUCT = "Arduino Zero" USB_MANUFACTURER = "Arduino" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.mk b/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.mk index 0e9bf7b450..08e42aa4ef 100644 --- a/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.mk @@ -4,9 +4,9 @@ USB_PID = 0xBAB3 USB_PRODUCT = "Bast Pro Mini M0" USB_MANUFACTURER = "Electronic Cats" +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 - -CHIP_VARIANT = SAMD21E18A -CHIP_FAMILY = samd21 diff --git a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk index 88a059dcf5..97c8eb8632 100644 --- a/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk +++ b/ports/atmel-samd/boards/capablerobot_usbhub/mpconfigboard.mk @@ -4,6 +4,9 @@ USB_PID = 0xEDB3 USB_PRODUCT = "Programmable USB Hub" USB_MANUFACTURER = "Capable Robot Components" +CHIP_VARIANT = SAMD51G19A +CHIP_FAMILY = samd51 + QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C @@ -13,6 +16,3 @@ LONGINT_IMPL = MPZ CIRCUITPY_AUDIOBUSIO = 0 # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 - -CHIP_VARIANT = SAMD51G19A -CHIP_FAMILY = samd51 diff --git a/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.mk b/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.mk index 9cdfca5b1a..2399aad5c5 100644 --- a/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.mk +++ b/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.mk @@ -4,9 +4,9 @@ USB_PID = 0xBAB2 USB_PRODUCT = "CatWAN USBStick" USB_MANUFACTURER = "Electronic Cats" +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 - -CHIP_VARIANT = SAMD21E18A -CHIP_FAMILY = samd21 diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk index 1d0f196b45..6d2bece5d4 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk @@ -4,6 +4,9 @@ USB_PID = 0x8019 USB_PRODUCT = "CircuitPlayground Express" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" @@ -13,9 +16,7 @@ LONGINT_IMPL = MPZ CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CSLAVE = 0 - -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 +SUPEROPT_GC = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice @@ -24,11 +25,3 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor - -# Tweak inlining depending on language. -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -else -CFLAGS_INLINE_LIMIT = 35 -endif diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index 5dd0c3f10c..b80142b014 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -4,27 +4,20 @@ USB_PID = 0x8019 USB_PRODUCT = "CircuitPlayground Express with Crickit libraries" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" -# Turn off longints for Crickit build to make room for additional frozen libs. -LONGINT_IMPL = NONE +# Turn off features and optimizations for Crickit build to make room for additional frozen libs. +LONGINT_IMPL = NONE CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_PIXELBUF = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CSLAVE = 0 - -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -# Tweak inlining depending on language. -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -else -CFLAGS_INLINE_LIMIT = 35 -endif +SUPEROPT_GC = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk index c566795c41..72a191044a 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk @@ -4,16 +4,15 @@ USB_PID = 0x8021 USB_PRODUCT = "CP32-M4" USB_MANUFACTURER = "Nadda-Reel Company LLC" +CHIP_VARIANT = SAMD51J20A +CHIP_FAMILY = samd51 + QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q128JV_PM" -# No I2S on SAMD51G -CIRCUITPY_AUDIOBUSIO = 0 -# No touch on SAMD51 yet -CIRCUITPY_TOUCHIO = 0 - -CHIP_VARIANT = SAMD51J20A -CHIP_FAMILY = samd51 - CIRCUITPY_PS2IO = 1 +# No I2S on SAMD51G. +CIRCUITPY_AUDIOBUSIO = 0 +# No touch on SAMD51 yet. +CIRCUITPY_TOUCHIO = 0 diff --git a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk index af1037c384..794920fe33 100644 --- a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk @@ -4,19 +4,16 @@ USB_PID = 0x0001 USB_PRODUCT = "Datalore IP M4" USB_MANUFACTURER = "TG-Boards" -QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 -EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ, W25Q16JV_IM" - -LONGINT_IMPL = MPZ - CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 -# No touch on SAMD51 yet -CIRCUITPY_TOUCHIO = 0 +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 3 +EXTERNAL_FLASH_DEVICES = "GD25Q16C, W25Q16JV_IQ, W25Q16JV_IM" +LONGINT_IMPL = MPZ CIRCUITPY_NETWORK = 1 MICROPY_PY_WIZNET5K = 5500 - CIRCUITPY_PS2IO = 1 +# No touch on SAMD51 yet +CIRCUITPY_TOUCHIO = 0 diff --git a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk index 8d28011490..a2c182e683 100644 --- a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk +++ b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0xBAB6 USB_PRODUCT = "Escornabot Makech" USB_MANUFACTURER = "Electronic Cats" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk index b21fd85891..a88dbd563e 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0x8015 USB_PRODUCT = "Feather M0 Adalogger" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk index 4002862289..076f1f8ff0 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0x8015 USB_PRODUCT = "Feather M0" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk index 64d81c64cc..5e321bd3d9 100644 --- a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk @@ -4,16 +4,12 @@ USB_PID = 0x8023 USB_PRODUCT = "Feather M0 Express" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -# Tweak inlining depending on language. -ifeq ($(TRANSLATION), zh_Latn_pinyin) CFLAGS_INLINE_LIMIT = 60 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk index 620a0d5052..5793d82e55 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk @@ -4,6 +4,9 @@ USB_PID = 0x8023 USB_PRODUCT = "Feather M0 Express" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" @@ -14,13 +17,8 @@ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CSLAVE = 0 - -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -CFLAGS_INLINE_LIMIT = 50 - CIRCUITPY_GAMEPAD = 0 +CFLAGS_INLINE_LIMIT = 50 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk index edf850a3ad..83d794d047 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0x8015 USB_PRODUCT = "Feather M0 RFM69" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk index 0ea5d9a468..a84e14f55f 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0x8015 USB_PRODUCT = "Feather M0 RFM9x" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk index 4bae6ffa72..33229044b7 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk @@ -4,10 +4,10 @@ USB_PID = 0x8023 USB_PRODUCT = "Feather M0 Supersized" USB_MANUFACTURER = "Dave Astels" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "S25FL064L" LONGINT_IMPL = MPZ - -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 diff --git a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk index 5972b5e467..8169345f56 100644 --- a/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m4_express/mpconfigboard.mk @@ -4,19 +4,16 @@ USB_PID = 0x8026 USB_PRODUCT = "Feather M4 Express" USB_MANUFACTURER = "Adafruit Industries LLC" -QSPI_FLASH_FILESYSTEM = 1 +CHIP_VARIANT = SAMD51J19A +CHIP_FAMILY = samd51 +QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ -# No touch on SAMD51 yet -CIRCUITPY_TOUCHIO = 0 - -CHIP_VARIANT = SAMD51J19A -CHIP_FAMILY = samd51 - CIRCUITPY_NETWORK = 1 MICROPY_PY_WIZNET5K = 5500 - CIRCUITPY_PS2IO = 1 +# No touch on SAMD51 yet +CIRCUITPY_TOUCHIO = 0 diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk index d9350ea22b..c4a3a5a19e 100755 --- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk @@ -4,6 +4,9 @@ USB_PID = 0x8023 USB_PRODUCT = "Feather RadioFruit Zigbee" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMR21G18A +CHIP_FAMILY = samd21 + SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" @@ -13,6 +16,3 @@ LONGINT_IMPL = MPZ CIRCUITPY_AUDIOBUSIO = 0 # No DAC on SAMR21G CIRCUITPY_AUDIOIO = 0 - -CHIP_VARIANT = SAMR21G18A -CHIP_FAMILY = samd21 diff --git a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk index 68ed9a937a..6f44a22f84 100644 --- a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0x801D USB_PRODUCT = "Gemma M0" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21E18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk index 0ae23bdef6..13631a7362 100644 --- a/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/grandcentral_m4_express/mpconfigboard.mk @@ -4,16 +4,14 @@ USB_PID = 0x8032 USB_PRODUCT = "Grand Central M4 Express" USB_MANUFACTURER = "Adafruit Industries LLC" -QSPI_FLASH_FILESYSTEM = 1 +CHIP_VARIANT = SAMD51P20A +CHIP_FAMILY = samd51 +QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ +CIRCUITPY_PS2IO = 1 # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 - -CHIP_VARIANT = SAMD51P20A -CHIP_FAMILY = samd51 - -CIRCUITPY_PS2IO = 1 diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk index 1df82ff442..8dfc741e5a 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk @@ -4,6 +4,9 @@ USB_PID = 0xD1ED USB_PRODUCT = "HalloWing M0 Express" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" @@ -13,11 +16,7 @@ LONGINT_IMPL = MPZ CIRCUITPY_I2CSLAVE = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_AUDIOBUSIO = 0 - -CFLAGS_INLINE_LIMIT = 50 - -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 +SUPEROPT_GC = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk index 1b2a039b86..bcf3ff6557 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk @@ -4,18 +4,12 @@ USB_PID = 0x8012 USB_PRODUCT = "ItsyBitsy M0 Express" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q16FW, GD25Q16C" LONGINT_IMPL = MPZ -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -# Tweak inlining depending on language. -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 45 -RELEASE_NEEDS_CLEAN_BUILD = 1 -else -CFLAGS_INLINE_LIMIT = 70 -endif +CFLAGS_INLINE_LIMIT = 60 diff --git a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk index 176935c387..31bb38e201 100644 --- a/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m4_express/mpconfigboard.mk @@ -4,17 +4,16 @@ USB_PID = 0x802C USB_PRODUCT = "ItsyBitsy M4 Express" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD51G19A +CHIP_FAMILY = samd51 + QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ +CIRCUITPY_PS2IO = 1 # No I2S on SAMD51G CIRCUITPY_AUDIOBUSIO = 0 # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 - -CHIP_VARIANT = SAMD51G19A -CHIP_FAMILY = samd51 - -CIRCUITPY_PS2IO = 1 diff --git a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk index e97a701055..5871cca2aa 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk @@ -4,14 +4,15 @@ USB_PID = 0xED94 USB_PRODUCT = "kicksat-sprite" USB_MANUFACTURER = "maholli" +CHIP_VARIANT = SAMD51G19A +CHIP_FAMILY = samd51 + QSPI_FLASH_FILESYSTEM = 0 INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = MPZ # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 +# Not needed. CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_DISPLAYIO = 0 - -CHIP_VARIANT = SAMD51G19A -CHIP_FAMILY = samd51 \ No newline at end of file diff --git a/ports/atmel-samd/boards/meowmeow/mpconfigboard.mk b/ports/atmel-samd/boards/meowmeow/mpconfigboard.mk index dc9c3c7a48..894e19a6bb 100644 --- a/ports/atmel-samd/boards/meowmeow/mpconfigboard.mk +++ b/ports/atmel-samd/boards/meowmeow/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0xBAB1 USB_PRODUCT = "Meow Meow" USB_MANUFACTURER = "Electronic Cats" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk index ff5284aabc..cedee7ef07 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk @@ -4,17 +4,12 @@ USB_PID = 0x8014 USB_PRODUCT = "Metro M0 Express" USB_MANUFACTURER = "Adafruit Industries LLC" -SPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 2 -EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" - -LONGINT_IMPL = MPZ - CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 -# Tweak inlining depending on language. -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 50 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 2 +EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" +LONGINT_IMPL = MPZ + +CFLAGS_INLINE_LIMIT = 60 diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk index 2a6191b368..d7d0c1d6ed 100644 --- a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk @@ -4,19 +4,16 @@ USB_PID = 0x8038 USB_PRODUCT = "Metro M4 Airlift Lite" USB_MANUFACTURER = "Adafruit Industries LLC" -QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 -EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" - -LONGINT_IMPL = MPZ - -# No touch on SAMD51 yet -CIRCUITPY_TOUCHIO = 0 - CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 3 +EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" +LONGINT_IMPL = MPZ + CIRCUITPY_NETWORK = 1 MICROPY_PY_WIZNET5K = 5500 - CIRCUITPY_PS2IO = 1 +# No touch on SAMD51 yet +CIRCUITPY_TOUCHIO = 0 diff --git a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk index 32e623e67e..829bf749f0 100644 --- a/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk @@ -4,19 +4,16 @@ USB_PID = 0x8021 USB_PRODUCT = "Metro M4 Express" USB_MANUFACTURER = "Adafruit Industries LLC" -QSPI_FLASH_FILESYSTEM = 1 -EXTERNAL_FLASH_DEVICE_COUNT = 3 -EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" - -LONGINT_IMPL = MPZ - -# No touch on SAMD51 yet -CIRCUITPY_TOUCHIO = 0 - CHIP_VARIANT = SAMD51J19A CHIP_FAMILY = samd51 +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 3 +EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C" +LONGINT_IMPL = MPZ + CIRCUITPY_NETWORK = 1 MICROPY_PY_WIZNET5K = 5500 - CIRCUITPY_PS2IO = 1 +# No touch on SAMD51 yet +CIRCUITPY_TOUCHIO = 0 diff --git a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk index 5f744dfd28..a8f47dced1 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk @@ -4,18 +4,16 @@ USB_PID = 0x2017 USB_PRODUCT = "Mini SAM M4" USB_MANUFACTURER = "Benjamin Shockley" +CHIP_VARIANT = SAMD51G19A +CHIP_FAMILY = samd51 + QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q16JV_IM" - LONGINT_IMPL = MPZ +CIRCUITPY_PS2IO = 1 # No I2S on SAMD51G CIRCUITPY_AUDIOBUSIO = 0 # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 - -CHIP_VARIANT = SAMD51G19A -CHIP_FAMILY = samd51 - -CIRCUITPY_PS2IO = 1 diff --git a/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk b/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk index f9d1dbf58d..e24a290519 100644 --- a/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk @@ -4,13 +4,12 @@ USB_PID = 0x801D USB_PRODUCT = "PewPew 10.2" USB_MANUFACTURER = "Radomir Dopieralski" -INTERNAL_FLASH_FILESYSTEM = 1 -LONGINT_IMPL = NONE - CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 -FROZEN_MPY_DIRS += $(TOP)/frozen/pew-pewpew-standalone-10.x +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE +CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_PEW = 1 CIRCUITPY_ANALOGIO = 1 @@ -20,12 +19,7 @@ CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 CIRCUITPY_SAMD = 0 CIRCUITPY_USB_MIDI = 0 -CIRCUITPY_SMALL_BUILD = 1 -# Tweak inlining depending on language. -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -else -CFLAGS_INLINE_LIMIT = 35 -endif +SUPEROPT_GC = 0 + +FROZEN_MPY_DIRS += $(TOP)/frozen/pew-pewpew-standalone-10.x diff --git a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk index c3f6b3f1e4..686c9099fc 100644 --- a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk @@ -4,6 +4,9 @@ USB_PID = 0x8028 USB_PRODUCT = "pIRKey M0" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE @@ -19,11 +22,8 @@ CIRCUITPY_SAMD = 0 CIRCUITPY_USB_MIDI = 1 CIRCUITPY_TOUCHIO = 0 CIRCUITPY_SMALL_BUILD = 1 - -CHIP_VARIANT = SAMD21E18A -CHIP_FAMILY = samd21 - -CFLAGS_INLINE_LIMIT = 23 +# Make more room. +SUPEROPT_GC = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar diff --git a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk index bac85b57f3..b8d10387b2 100644 --- a/ports/atmel-samd/boards/pybadge/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pybadge/mpconfigboard.mk @@ -4,22 +4,20 @@ USB_PID = 0x8034 USB_PRODUCT = "PyBadge" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD51J19A +CHIP_FAMILY = samd51 + QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q16C LONGINT_IMPL = MPZ +CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_GAMEPAD = 1 +CIRCUITPY_GAMEPADSHIFT = 1 +CIRCUITPY_STAGE = 1 # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 -CIRCUITPY_GAMEPADSHIFT = 1 - -CHIP_VARIANT = SAMD51J19A -CHIP_FAMILY = samd51 - -CIRCUITPY_STAGE = 1 -CIRCUITPY_GAMEPAD = 1 -CIRCUITPY_DISPLAYIO = 1 -CIRCUITPY_AUDIOIO = 1 - FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pybadge diff --git a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk index 179b75a9ea..a1ff907475 100644 --- a/ports/atmel-samd/boards/pygamer/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pygamer/mpconfigboard.mk @@ -4,22 +4,20 @@ USB_PID = 0x803E USB_PRODUCT = "PyGamer" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD51J19A +CHIP_FAMILY = samd51 + QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = GD25Q64C LONGINT_IMPL = MPZ +CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_GAMEPAD = 1 +CIRCUITPY_GAMEPADSHIFT = 1 +CIRCUITPY_STAGE = 1 # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 -CIRCUITPY_GAMEPADSHIFT = 1 - -CHIP_VARIANT = SAMD51J19A -CHIP_FAMILY = samd51 - -CIRCUITPY_STAGE = 1 -CIRCUITPY_GAMEPAD = 1 -CIRCUITPY_DISPLAYIO = 1 -CIRCUITPY_AUDIOIO = 1 - FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pybadge diff --git a/ports/atmel-samd/boards/pyportal/mpconfigboard.mk b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk index 21332eb3a4..996b17b3b3 100644 --- a/ports/atmel-samd/boards/pyportal/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.mk @@ -4,14 +4,13 @@ USB_PID = 0x8036 USB_PRODUCT = "PyPortal" USB_MANUFACTURER = "Adafruit Industries LLC" -QSPI_FLASH_FILESYSTEM = 1 +CHIP_VARIANT = SAMD51J20A +CHIP_FAMILY = samd51 +QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 - -CHIP_VARIANT = SAMD51J20A -CHIP_FAMILY = samd51 diff --git a/ports/atmel-samd/boards/robohatmm1/mpconfigboard.mk b/ports/atmel-samd/boards/robohatmm1/mpconfigboard.mk index da7da27611..9523984b77 100644 --- a/ports/atmel-samd/boards/robohatmm1/mpconfigboard.mk +++ b/ports/atmel-samd/boards/robohatmm1/mpconfigboard.mk @@ -4,23 +4,25 @@ USB_PID = 0x4D43 USB_PRODUCT = "Robo HAT MM1" USB_MANUFACTURER = "Robotics Masters" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + # Non-Flash Edition #INTERNAL_FLASH_FILESYSTEM = 1 #LONGINT_IMPL = NONE +#SUPEROPT_GC = 0 # SPI-Flash Edition SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ" LONGINT_IMPL = MPZ - -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - # Make room for frozen Libraries CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FREQUENCYIO = 0 +CFLAGS_INLINE_LIMIT = 55 + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice #FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_INA219 @@ -29,6 +31,3 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel #FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Crickit #FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Motor #FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_seesaw - -#Adding per @danh to reduce memory usage and get the latest changes in -CFLAGS_INLINE_LIMIT = 55 diff --git a/ports/atmel-samd/boards/sam32/mpconfigboard.mk b/ports/atmel-samd/boards/sam32/mpconfigboard.mk index d76696b39d..ca1e11f011 100644 --- a/ports/atmel-samd/boards/sam32/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sam32/mpconfigboard.mk @@ -4,11 +4,11 @@ USB_PID = 0xEDBE USB_PRODUCT = "SAM32" USB_MANUFACTURER = "maholli" +CHIP_VARIANT = SAMD51J20A +CHIP_FAMILY = samd51 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = MPZ # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 - -CHIP_VARIANT = SAMD51J20A -CHIP_FAMILY = samd51 diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk index 4da42c02dc..9d0ef1c040 100755 --- a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk @@ -4,16 +4,15 @@ USB_PID = 0x0017 USB_PRODUCT = "LUMIDrive Board" USB_MANUFACTURER = "SparkFun Electronics" -SPI_FLASH_FILESYSTEM = 1 -LONGINT_IMPL = MPZ - CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 +SPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "W25Q32FV" +LONGINT_IMPL = MPZ + CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOBUSIO = 0 -EXTERNAL_FLASH_DEVICE_COUNT = 1 -EXTERNAL_FLASH_DEVICES = "W25Q32FV" - FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk index 57400d6a79..ef6cf89246 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk @@ -4,17 +4,12 @@ USB_PID = 0x0015 USB_PRODUCT = "RedBoard Turbo Board" USB_MANUFACTURER = "SparkFun Electronics" -SPI_FLASH_FILESYSTEM = 1 -LONGINT_IMPL = MPZ - CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 +SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32FV" +LONGINT_IMPL = MPZ -# Tweak inlining depending on language. -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 50 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +CFLAGS_INLINE_LIMIT = 60 diff --git a/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk index 4afc74540f..c9d0baf11f 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0x8D23 USB_PRODUCT = "SparkFun SAMD21 Dev Breakout" USB_MANUFACTURER = "SparkFun" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk index e1ba163f18..a6e216575e 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0x8D22 USB_PRODUCT = "SparkFun SAMD21 Mini Breakout" USB_MANUFACTURER = "SparkFun" +CHIP_VARIANT = SAMD21G18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk index bfcada0d77..6d108e649e 100644 --- a/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trellis_m4_express/mpconfigboard.mk @@ -4,17 +4,16 @@ USB_PID = 0x8030 USB_PRODUCT = "Trellis M4 Express" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD51G19A +CHIP_FAMILY = samd51 + QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" LONGINT_IMPL = MPZ +CIRCUITPY_PS2IO = 1 # No I2S on SAMD51G CIRCUITPY_AUDIOBUSIO = 0 # No touch on SAMD51 yet CIRCUITPY_TOUCHIO = 0 - -CHIP_VARIANT = SAMD51G19A -CHIP_FAMILY = samd51 - -CIRCUITPY_PS2IO = 1 diff --git a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk index 00f02911b6..b4a00b654a 100644 --- a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk @@ -4,14 +4,11 @@ USB_PID = 0x801F USB_PRODUCT = "Trinket M0" USB_MANUFACTURER = "Adafruit Industries LLC" +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 -CHIP_VARIANT = SAMD21E18A -CHIP_FAMILY = samd21 - -ifeq ($(TRANSLATION), zh_Latn_pinyin) -CFLAGS_INLINE_LIMIT = 23 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk index c9c196da7b..b9d36a7418 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk @@ -4,10 +4,10 @@ USB_PID = 0x801F USB_PRODUCT="Trinket M0 Haxpress" USB_MANUFACTURER="Radomir Dopieralski" +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q32BV LONGINT_IMPL = MPZ - -CHIP_VARIANT = SAMD21E18A -CHIP_FAMILY = samd21 diff --git a/ports/atmel-samd/boards/uchip/mpconfigboard.mk b/ports/atmel-samd/boards/uchip/mpconfigboard.mk index b6710af6df..109492b764 100644 --- a/ports/atmel-samd/boards/uchip/mpconfigboard.mk +++ b/ports/atmel-samd/boards/uchip/mpconfigboard.mk @@ -4,9 +4,9 @@ USB_PID = 0xED5F USB_PRODUCT = "uChip CircuitPython" USB_MANUFACTURER = "Itaca Innovation" +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE CIRCUITPY_SMALL_BUILD = 1 - -CHIP_VARIANT = SAMD21E18A -CHIP_FAMILY = samd21 diff --git a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk index cafd84b214..a27ca88748 100644 --- a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk +++ b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk @@ -4,14 +4,14 @@ USB_PID = 0x801F USB_PRODUCT = "uGame10" USB_MANUFACTURER = "Radomir Dopieralski" +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = S25FL216K LONGINT_IMPL = MPZ -CHIP_VARIANT = SAMD21E18A -CHIP_FAMILY = samd21 - CIRCUITPY_STAGE = 1 CIRCUITPY_MATH = 1 CIRCUITPY_AUDIOIO = 1 diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index ed9b9f4618..47303a73a7 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -32,13 +32,13 @@ # CIRCUITPY_FULL_BUILD = 0 ifndef CIRCUITPY_FULL_BUILD -ifeq ($(CIRCUITPY_SMALL_BUILD),1) -CIRCUITPY_FULL_BUILD = 0 -CFLAGS += -DCIRCUITPY_FULL_BUILD=0 -else -CIRCUITPY_FULL_BUILD = 1 -CFLAGS += -DCIRCUITPY_FULL_BUILD=1 -endif + ifeq ($(CIRCUITPY_SMALL_BUILD),1) + CIRCUITPY_FULL_BUILD = 0 + CFLAGS += -DCIRCUITPY_FULL_BUILD=0 + else + CIRCUITPY_FULL_BUILD = 1 + CFLAGS += -DCIRCUITPY_FULL_BUILD=1 + endif endif # All builtin modules are listed below, with default values (0 for off, 1 for on) diff --git a/py/py.mk b/py/py.mk index a69243b019..b4f1f00eff 100644 --- a/py/py.mk +++ b/py/py.mk @@ -107,9 +107,9 @@ endif # External modules written in C. ifneq ($(USER_C_MODULES),) -# pre-define USERMOD variables as expanded so that variables are immediate +# pre-define USERMOD variables as expanded so that variables are immediate # expanded as they're added to them -SRC_USERMOD := +SRC_USERMOD := CFLAGS_USERMOD := LDFLAGS_USERMOD := $(foreach module, $(wildcard $(USER_C_MODULES)/*/micropython.mk), \ @@ -343,10 +343,23 @@ $(PY_BUILD)/qstr.o: $(HEADER_BUILD)/qstrdefs.generated.h $(PY_BUILD)/nlr%.o: CFLAGS += -Os # optimising gc for speed; 5ms down to 4ms on pybv2 +ifndef SUPEROPT_GC + SUPEROPT_GC = 1 +endif + +ifeq ($(SUPEROPT_GC),1) $(PY_BUILD)/gc.o: CFLAGS += $(CSUPEROPT) +endif # optimising vm for speed, adds only a small amount to code size but makes a huge difference to speed (20% faster) -$(PY_BUILD)/vm.o: CFLAGS += $(CSUPEROPT) +ifndef SUPEROPT_VM + SUPEROPT_VM = 1 +endif + +ifeq ($(SUPEROPT_VM),1) +#$(PY_BUILD)/vm.o: CFLAGS += $(CSUPEROPT) +endif + # Optimizing vm.o for modern deeply pipelined CPUs with branch predictors # may require disabling tail jump optimization. This will make sure that # each opcode has its own dispatching jump which will improve branch