diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 3a8ad4acc8e9..1df782dab138 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 bafb8a96cae9..a543468e5220 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk @@ -4,9 +4,10 @@ USB_PID = 0x8053 USB_PRODUCT = "Arduino MKR1300" 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 +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk index 3b54fb4d63b1..5612eb88d73c 100644 --- a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk @@ -4,9 +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 +SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk index af953e8c2d83..cbbf15a3ef82 100644 --- a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk @@ -4,9 +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 +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 0e9bf7b4506a..08e42aa4ef31 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 88a059dcf54b..97c8eb86327f 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 9cdfca5b1a17..2399aad5c5ea 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 3b9eba7be215..3c43776f5bde 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" @@ -14,8 +17,8 @@ CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CSLAVE = 0 -CHIP_VARIANT = SAMD21G18A -CHIP_FAMILY = samd21 +SUPEROPT_GC = 0 +CFLAGS_INLINE_LIMIT = 55 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice @@ -24,11 +27,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 = 25 -RELEASE_NEEDS_CLEAN_BUILD = 1 -else -CFLAGS_INLINE_LIMIT = 55 -endif diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index 0a8ac37b84a1..f456515f9a3a 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -4,27 +4,23 @@ 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 +SUPEROPT_GC = 0 CFLAGS_INLINE_LIMIT = 55 -endif + # 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 c566795c4170..72a191044a18 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_PS2IO = 1 +# No I2S on SAMD51G. CIRCUITPY_AUDIOBUSIO = 0 -# No touch on SAMD51 yet +# No touch on SAMD51 yet. CIRCUITPY_TOUCHIO = 0 - -CHIP_VARIANT = SAMD51J20A -CHIP_FAMILY = samd51 - -CIRCUITPY_PS2IO = 1 diff --git a/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk b/ports/atmel-samd/boards/datalore_ip_m4/mpconfigboard.mk index af1037c38494..794920fe3309 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" +CHIP_VARIANT = SAMD51J19A +CHIP_FAMILY = samd51 + 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 - 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 4d464950677b..a2c182e6837e 100644 --- a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk +++ b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk @@ -4,9 +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 +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 26e3b7d4d0b6..a88dbd563ece 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk @@ -4,9 +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 +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 102cb656f209..076f1f8ff090 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk @@ -4,9 +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 +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 64d81c64cc0d..5e321bd3d919 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 620a0d505205..5793d82e5594 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 ce3f8668c704..83d794d04778 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk @@ -4,9 +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 +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 282977338c7f..a84e14f55fde 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk @@ -4,9 +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 +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 4bae6ffa720d..33229044b7c6 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 5972b5e4674d..8169345f56b9 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 d9350ea22b06..c4a3a5a19eb9 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 9f4a9fe8358b..6f44a22f8424 100644 --- a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk @@ -4,9 +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 +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 0ae23bdef6c3..13631a7362f6 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 1df82ff44272..8dfc741e5a48 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 1b2a039b8640..bcf3ff6557aa 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 176935c387ea..31bb38e20141 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 e97a701055d4..5871cca2aa8d 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 3f9601d32472..894e19a6bb65 100644 --- a/ports/atmel-samd/boards/meowmeow/mpconfigboard.mk +++ b/ports/atmel-samd/boards/meowmeow/mpconfigboard.mk @@ -4,9 +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 +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 ff5284aabc1a..cedee7ef0715 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" +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 = 50 -RELEASE_NEEDS_CLEAN_BUILD = 1 -endif +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 2a6191b36869..d7d0c1d6ed86 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" +CHIP_VARIANT = SAMD51J19A +CHIP_FAMILY = samd51 + 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 - 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 32e623e67e4f..829bf749f05d 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" +CHIP_VARIANT = SAMD51J19A +CHIP_FAMILY = samd51 + 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 - 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 5f744dfd28ec..a8f47dced176 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 ef0f8faa7fbc..e24a290519d4 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,10 +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 = 40 -RELEASE_NEEDS_CLEAN_BUILD = 1 -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 4405b7a354ae..686c9099fc9a 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 = 25 +# 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 bac85b57f3c9..b8d10387b229 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 -# No touch on SAMD51 yet -CIRCUITPY_TOUCHIO = 0 - +CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_GAMEPAD = 1 CIRCUITPY_GAMEPADSHIFT = 1 - -CHIP_VARIANT = SAMD51J19A -CHIP_FAMILY = samd51 - CIRCUITPY_STAGE = 1 -CIRCUITPY_GAMEPAD = 1 -CIRCUITPY_DISPLAYIO = 1 -CIRCUITPY_AUDIOIO = 1 +# No touch on SAMD51 yet +CIRCUITPY_TOUCHIO = 0 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 179b75a9ea83..a1ff907475fe 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 -# No touch on SAMD51 yet -CIRCUITPY_TOUCHIO = 0 - +CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_GAMEPAD = 1 CIRCUITPY_GAMEPADSHIFT = 1 - -CHIP_VARIANT = SAMD51J19A -CHIP_FAMILY = samd51 - CIRCUITPY_STAGE = 1 -CIRCUITPY_GAMEPAD = 1 -CIRCUITPY_DISPLAYIO = 1 -CIRCUITPY_AUDIOIO = 1 +# No touch on SAMD51 yet +CIRCUITPY_TOUCHIO = 0 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 21332eb3a405..996b17b3b3a9 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 da7da27611f5..9523984b77ee 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 d76696b39d5a..ca1e11f01187 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 4da42c02dc08..9d0ef1c04099 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 -CIRCUITPY_AUDIOIO = 0 -CIRCUITPY_AUDIOBUSIO = 0 - +SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = "W25Q32FV" +LONGINT_IMPL = MPZ + +CIRCUITPY_AUDIOIO = 0 +CIRCUITPY_AUDIOBUSIO = 0 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 57400d6a792b..ef6cf89246fb 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 c0238ce80ea3..c9d0baf11f7b 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.mk @@ -4,9 +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 +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 462e3e2caf50..a6e216575e02 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.mk @@ -4,9 +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 +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 bfcada0d773c..6d108e649ee9 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 1c6f6db05d87..b4a00b654a62 100644 --- a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.mk @@ -4,9 +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 +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 c9c196da7b2e..b9d36a741818 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 b6710af6dfb5..109492b76475 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 cafd84b214fc..a27ca88748e5 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.h b/py/circuitpy_mpconfig.h index c794759f8757..2026185ef95e 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -72,6 +72,7 @@ #define MICROPY_KBD_EXCEPTION (1) #define MICROPY_MEM_STATS (0) #define MICROPY_NONSTANDARD_TYPECODES (0) +#define MICROPY_OPT_COMPUTED_GOTO (1) #define MICROPY_PERSISTENT_CODE_LOAD (1) #define MICROPY_PY_ARRAY (1) diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index ed9b9f4618b1..47303a73a76f 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 a69243b019ea..17cb792646d7 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) +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 diff --git a/py/vmentrytable.h b/py/vmentrytable.h index 615f4e2ce439..a0e2d4065850 100644 --- a/py/vmentrytable.h +++ b/py/vmentrytable.h @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#if __clang__ +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winitializer-overrides" #endif // __clang__ @@ -113,6 +113,6 @@ static const void *const entry_table[256] = { [MP_BC_BINARY_OP_MULTI ... MP_BC_BINARY_OP_MULTI + MP_BINARY_OP_NUM_BYTECODE - 1] = &&entry_MP_BC_BINARY_OP_MULTI, }; -#if __clang__ +#ifdef __clang__ #pragma clang diagnostic pop #endif // __clang__