From 53cb99ead2447d927ee7bbf801f51f1c139fe992 Mon Sep 17 00:00:00 2001 From: tyeth Date: Sun, 13 Sep 2026 22:19:14 +0100 Subject: [PATCH 1/3] espressif: freeze the env-collector's libraries on the 13 boards it targets The ESP-NOW / WiFi / BLE environmental collector ships ~20 libraries in lib/. On a board without PSRAM that is the difference between running and not. Measured on a Feather ESP32-S3 No PSRAM (2026-09-13), with the application itself already cross-compiled to .mpy: * BLE + ESP-NOW + softAP all come up, and then `import datastore` dies with `MemoryError: memory allocation failed, allocating 158 bytes`; * with BLE off it reaches the eInk dashboard and the SD mount fails for want of 832 bytes, with 15.9 KB free. Cross-compiling the application removes the on-device *compiler* peak -- which is what made the C6 unbootable -- but not the resident bytecode. Freezing does: a frozen module executes in place from flash and never occupies heap. Twenty-two libraries, on the 13 espressif boards this project targets -- the same 13 the custom-build workflow has been dispatched for, and on the branch those builds actually used. Nine were not yet in frozen/ and are added as submodules: IL0373, JD79667, MAX1704x, NTP, SCD4X, SCD30, SEN6x, PCF8523, DS1307. The other thirteen were already there. The 22 lines are repeated verbatim in each board's mpconfigboard.mk rather than factored into one include. That is not an aesthetic choice: tools/ ci_fetch_deps.py reads each board file line by line looking for "FROZEN_MPY_DIRS += $(TOP)/" to decide which submodules to check out, and it does not follow includes. The include version builds fine locally, FREEZE lists all 22 dirs, and then CI fails at MKMANIFEST with every frozen directory empty. Each copy of the block carries a comment saying so before someone tidies it back. Deliberately not frozen: * adafruit_pixelbuf -- already a built-in C module. * sensirion_i2c_driver / sensirion_i2c_sen5x -- a third-party circup bundle rather than a library repo, and node_sensors.py carries a minimal built-in SEN5x driver for boards without them. * PCF85063A -- no Adafruit library exists; the project drives that chip directly from its own extrtc.py. Size: ~162 KB of frozen bytecode from 621 KB of source, uniform across all 13. Comfortable on the 8 MB and 16 MB boards; the 4 MB ones are what CI has to answer, and if one overflows the fix is to split the list rather than shrink it everywhere. NOTE for whoever deploys against these builds: sys.path puts /lib ahead of .frozen, so a copy left in lib/ SHADOWS the frozen one and the board pays the RAM anyway. Emptying lib/ is what collects the benefit -- the same trap as leaving a .py beside a .mpy. Co-Authored-By: Claude Opus 5 --- .gitmodules | 27 ++++++++++++++ frozen/Adafruit_CircuitPython_DS1307 | 1 + frozen/Adafruit_CircuitPython_IL0373 | 1 + frozen/Adafruit_CircuitPython_JD79667 | 1 + frozen/Adafruit_CircuitPython_MAX1704x | 1 + frozen/Adafruit_CircuitPython_NTP | 1 + frozen/Adafruit_CircuitPython_PCF8523 | 1 + frozen/Adafruit_CircuitPython_SCD30 | 1 + frozen/Adafruit_CircuitPython_SCD4X | 1 + frozen/Adafruit_CircuitPython_SEN6x | 1 + .../mpconfigboard.mk | 37 +++++++++++++++++++ .../mpconfigboard.mk | 37 +++++++++++++++++++ .../mpconfigboard.mk | 37 +++++++++++++++++++ .../mpconfigboard.mk | 37 +++++++++++++++++++ .../mpconfigboard.mk | 37 +++++++++++++++++++ .../mpconfigboard.mk | 37 +++++++++++++++++++ .../mpconfigboard.mk | 37 +++++++++++++++++++ .../adafruit_metro_esp32s3/mpconfigboard.mk | 37 +++++++++++++++++++ .../adafruit_qtpy_esp32_pico/mpconfigboard.mk | 37 +++++++++++++++++++ .../mpconfigboard.mk | 37 +++++++++++++++++++ .../mpconfigboard.mk | 37 +++++++++++++++++++ .../mpconfigboard.mk | 37 +++++++++++++++++++ .../mpconfigboard.mk | 37 +++++++++++++++++++ 23 files changed, 517 insertions(+) create mode 160000 frozen/Adafruit_CircuitPython_DS1307 create mode 160000 frozen/Adafruit_CircuitPython_IL0373 create mode 160000 frozen/Adafruit_CircuitPython_JD79667 create mode 160000 frozen/Adafruit_CircuitPython_MAX1704x create mode 160000 frozen/Adafruit_CircuitPython_NTP create mode 160000 frozen/Adafruit_CircuitPython_PCF8523 create mode 160000 frozen/Adafruit_CircuitPython_SCD30 create mode 160000 frozen/Adafruit_CircuitPython_SCD4X create mode 160000 frozen/Adafruit_CircuitPython_SEN6x diff --git a/.gitmodules b/.gitmodules index 0dee3eb5cd4..be5ae786ab5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -430,3 +430,30 @@ [submodule "frozen/Adafruit_CircuitPython_TAS2505"] path = frozen/Adafruit_CircuitPython_TAS2505 url = https://github.com/adafruit/Adafruit_CircuitPython_TAS2505.git +[submodule "frozen/Adafruit_CircuitPython_IL0373"] + path = frozen/Adafruit_CircuitPython_IL0373 + url = https://github.com/adafruit/Adafruit_CircuitPython_IL0373.git +[submodule "frozen/Adafruit_CircuitPython_JD79667"] + path = frozen/Adafruit_CircuitPython_JD79667 + url = https://github.com/adafruit/Adafruit_CircuitPython_JD79667.git +[submodule "frozen/Adafruit_CircuitPython_MAX1704x"] + path = frozen/Adafruit_CircuitPython_MAX1704x + url = https://github.com/adafruit/Adafruit_CircuitPython_MAX1704x.git +[submodule "frozen/Adafruit_CircuitPython_NTP"] + path = frozen/Adafruit_CircuitPython_NTP + url = https://github.com/adafruit/Adafruit_CircuitPython_NTP.git +[submodule "frozen/Adafruit_CircuitPython_SCD4X"] + path = frozen/Adafruit_CircuitPython_SCD4X + url = https://github.com/adafruit/Adafruit_CircuitPython_SCD4X.git +[submodule "frozen/Adafruit_CircuitPython_SCD30"] + path = frozen/Adafruit_CircuitPython_SCD30 + url = https://github.com/adafruit/Adafruit_CircuitPython_SCD30.git +[submodule "frozen/Adafruit_CircuitPython_SEN6x"] + path = frozen/Adafruit_CircuitPython_SEN6x + url = https://github.com/adafruit/Adafruit_CircuitPython_SEN6x.git +[submodule "frozen/Adafruit_CircuitPython_PCF8523"] + path = frozen/Adafruit_CircuitPython_PCF8523 + url = https://github.com/adafruit/Adafruit_CircuitPython_PCF8523.git +[submodule "frozen/Adafruit_CircuitPython_DS1307"] + path = frozen/Adafruit_CircuitPython_DS1307 + url = https://github.com/adafruit/Adafruit_CircuitPython_DS1307.git diff --git a/frozen/Adafruit_CircuitPython_DS1307 b/frozen/Adafruit_CircuitPython_DS1307 new file mode 160000 index 00000000000..d9ccc8cbc90 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_DS1307 @@ -0,0 +1 @@ +Subproject commit d9ccc8cbc90af7f5daf380fca9492d3a337430d6 diff --git a/frozen/Adafruit_CircuitPython_IL0373 b/frozen/Adafruit_CircuitPython_IL0373 new file mode 160000 index 00000000000..645f0bf78cd --- /dev/null +++ b/frozen/Adafruit_CircuitPython_IL0373 @@ -0,0 +1 @@ +Subproject commit 645f0bf78cd9e09ef07eaca37871ee310fa36445 diff --git a/frozen/Adafruit_CircuitPython_JD79667 b/frozen/Adafruit_CircuitPython_JD79667 new file mode 160000 index 00000000000..4a5ce533021 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_JD79667 @@ -0,0 +1 @@ +Subproject commit 4a5ce53302152058cac151cef6d5c528304d3437 diff --git a/frozen/Adafruit_CircuitPython_MAX1704x b/frozen/Adafruit_CircuitPython_MAX1704x new file mode 160000 index 00000000000..ad881ac7f2a --- /dev/null +++ b/frozen/Adafruit_CircuitPython_MAX1704x @@ -0,0 +1 @@ +Subproject commit ad881ac7f2adc0ba06f1a153e91658ebcbbacf18 diff --git a/frozen/Adafruit_CircuitPython_NTP b/frozen/Adafruit_CircuitPython_NTP new file mode 160000 index 00000000000..20cb912e92a --- /dev/null +++ b/frozen/Adafruit_CircuitPython_NTP @@ -0,0 +1 @@ +Subproject commit 20cb912e92a8edcb7a69e64f938b33937f55d475 diff --git a/frozen/Adafruit_CircuitPython_PCF8523 b/frozen/Adafruit_CircuitPython_PCF8523 new file mode 160000 index 00000000000..28187e912a1 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_PCF8523 @@ -0,0 +1 @@ +Subproject commit 28187e912a1ddd5ae544857fb449198ea1914197 diff --git a/frozen/Adafruit_CircuitPython_SCD30 b/frozen/Adafruit_CircuitPython_SCD30 new file mode 160000 index 00000000000..a13f91cb423 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SCD30 @@ -0,0 +1 @@ +Subproject commit a13f91cb423e985e03f9b67ec77bb86df8e24616 diff --git a/frozen/Adafruit_CircuitPython_SCD4X b/frozen/Adafruit_CircuitPython_SCD4X new file mode 160000 index 00000000000..2c625693826 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SCD4X @@ -0,0 +1 @@ +Subproject commit 2c62569382663b42d79f1780ee647895c58dbc6e diff --git a/frozen/Adafruit_CircuitPython_SEN6x b/frozen/Adafruit_CircuitPython_SEN6x new file mode 160000 index 00000000000..b8dacfc9552 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SEN6x @@ -0,0 +1 @@ +Subproject commit b8dacfc955208db3127efdf48b52a8e4398bb361 diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk index 2569b1cabb1..b93c59e5f3a 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk @@ -10,3 +10,40 @@ CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 40m + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/adafruit_feather_esp32c6_4mbflash_nopsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32c6_4mbflash_nopsram/mpconfigboard.mk index 28821ed7b48..c2498059ec4 100644 --- a/ports/espressif/boards/adafruit_feather_esp32c6_4mbflash_nopsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32c6_4mbflash_nopsram/mpconfigboard.mk @@ -9,3 +9,40 @@ CIRCUITPY_ESP_FLASH_SIZE = 4MB # Board was originally defined with a 2MB firmware, almost 2MB user filesystem. Leave it that way. CIRCUITPY_4MB_FLASH_LARGE_USER_FS_LAYOUT = 1 + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index 6fafa82485a..d3363e6e9b4 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -12,3 +12,40 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/mpconfigboard.mk index cdf1657d8be..140d2150891 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/mpconfigboard.mk @@ -8,3 +8,40 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk index a82ae6d4f04..321019debb9 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk @@ -16,3 +16,40 @@ CIRCUITPY_ESP_PSRAM_FREQ = 80m # Already have a display. CIRCUITPY_PARALLELDISPLAYBUS = 0 + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk index 71ef6d222a2..e8cb5b57c02 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk @@ -16,3 +16,40 @@ CIRCUITPY_ESP_PSRAM_FREQ = 80m # Already have a display. CIRCUITPY_PARALLELDISPLAYBUS = 0 + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/adafruit_feather_huzzah32/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_huzzah32/mpconfigboard.mk index f948521eb6d..fb434010d84 100644 --- a/ports/espressif/boards/adafruit_feather_huzzah32/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_huzzah32/mpconfigboard.mk @@ -6,3 +6,40 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk index 2fd5a40f259..7b9d8f60723 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk @@ -12,3 +12,40 @@ CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_PSRAM_MODE = opi CIRCUITPY_ESP_PSRAM_FREQ = 80m CIRCUITPY_ESP_PSRAM_SIZE = 8MB + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk index e27e48cf51e..07aaaaa91a4 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk @@ -13,3 +13,40 @@ CIRCUITPY_ESP_PSRAM_FREQ = 80m # Not enough pins. CIRCUITPY_PARALLELDISPLAYBUS = 0 + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index 09571a63a59..739c12796a3 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -16,3 +16,40 @@ CIRCUITPY_ESP_PSRAM_FREQ = 80m # Not enough pins. CIRCUITPY_ESPCAMERA = 0 CIRCUITPY_PARALLELDISPLAYBUS = 0 + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk index 053b15647c1..b0955f310b6 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk @@ -12,3 +12,40 @@ CIRCUITPY_ESP_FLASH_SIZE = 8MB # Few pins. CIRCUITPY_PARALLELDISPLAYBUS = 0 + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk index c428bc33314..3a6d91edaaa 100644 --- a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk @@ -10,3 +10,40 @@ CIRCUITPY_ESP_FLASH_SIZE = 8MB # Hand the console to UART0/CH343 instead of USB-Serial-JTAG; the port defaults # this to 1 for esp32c6 and the two cannot both be enabled. CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.mk index ea5597d3702..b67fa3c80c6 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.mk @@ -8,3 +8,40 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB + +# --- environmental-collector frozen libraries ------------------------------- +# Frozen bytecode executes in place from flash; the same library imported +# from lib/ is read into RAM and stays there. On a board without PSRAM that +# is the difference between running and not -- a Feather ESP32-S3 No PSRAM +# running this project, with its own code already cross-compiled to .mpy, +# had 6 KB of heap left once BLE + ESP-NOW + softAP were up and died on the +# next import. +# +# Listed literally rather than behind an include, even though the same 22 +# lines repeat across every board this project targets: tools/ +# ci_fetch_deps.py scans THIS file for "FROZEN_MPY_DIRS += $(TOP)/" to +# decide which submodules to check out, and it does not follow includes. An +# include builds locally and then fails CI at MKMANIFEST with empty frozen +# directories. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HTTPServer +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ConnectionManager +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NTP +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Ticks +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SEN6x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD4X +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SCD30 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_MAX1704x +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LC709203F +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_JD79667 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_IL0373 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Bitmap_Font +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8563 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS3231 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PCF8523 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DS1307 From ed13de12379db62a1ae39a9a27afa58f723251f6 Mon Sep 17 00:00:00 2001 From: tyeth Date: Thu, 10 Sep 2026 15:16:30 +0100 Subject: [PATCH 2/3] py/version.py: treat an empty CP_VERSION as unset build-board-custom.yml calls .github/actions/deps/submodules without version: true, so steps.set-up-submodules.outputs.version is empty. For a board with frozen modules the mpy_cross action then runs make with CP_VERSION="" in its environment, and get_version_info_from_git() took the presence of the variable as authoritative, returned an empty tag, and makeversionhdr.py aborted with "Cannot determine version". Boards without frozen modules never run that step, which is why the Pico 2 W asset build passed while the Pico W one failed twice on the same commit. Fall back to git describe when CP_VERSION is present but empty. Co-Authored-By: Claude Fable 5.1 --- py/version.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/py/version.py b/py/version.py index b9e889b86b6..c02ce942f49 100755 --- a/py/version.py +++ b/py/version.py @@ -3,7 +3,11 @@ def get_version_info_from_git(repo_path, extra_args=[]): - if "CP_VERSION" in os.environ: + # CIRCUITPY-CHANGE: treat an empty CP_VERSION as unset. A workflow that routes an + # unpopulated step output through `env:` (build-board-custom.yml -> + # .github/actions/mpy_cross does this for boards with frozen modules) exports + # CP_VERSION="" and must fall back to git describe instead of failing. + if os.environ.get("CP_VERSION"): git_tag = os.environ["CP_VERSION"] else: # Note: git describe doesn't work if no tag is available From 81f2d24440a88b409387f4b9a42a2fc132615a88 Mon Sep 17 00:00:00 2001 From: tyeth Date: Sun, 13 Sep 2026 22:35:09 +0100 Subject: [PATCH 3/3] espressif: state _bleio explicitly on the 4MB + 2MB PSRAM targets The hub serves its portal over a Nordic UART service and the nodes take their config the same way, so _bleio is not optional for this project on the boards it is aimed at. Reading ports/espressif/mpconfigport.mk, it should already be on: CIRCUITPY_BLEIO_NATIVE defaults to 1 and is forced off only for the S2 and the P4 (no BLE hardware) and for 2MB flash -- not 4MB, which only loses dualbank and gains -Os. So on these four boards this is a no-op that says so out loud, and it stops a future flash-size trim taking BLE away silently the way the 2MB block already does. Boards: feather_esp32s3_4mbflash_2mbpsram, qtpy_esp32s3_4mbflash_2mbpsram, feather_esp32s3_tft, feather_esp32s3_reverse_tft. Size is not the constraint here, contrary to what a 4MB board suggests: the last green build of feather_esp32s3_4mbflash_2mbpsram used 1,841,040 of 2,883,584 bytes of firmware space, leaving 1,042,544 free -- room for this project's ~162 KB of frozen bytecode several times over. --- .../mpconfigboard.mk | 7 +++++++ .../adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk | 7 +++++++ .../boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk | 7 +++++++ .../mpconfigboard.mk | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index d3363e6e9b4..deeaa2e728d 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -13,6 +13,13 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m +# This project needs _bleio on this board: the hub serves its portal over +# a Nordic UART service and the nodes take their config the same way. The +# port already defaults CIRCUITPY_BLEIO_NATIVE to 1 and only forces it off +# for 2MB flash, the S2 and the P4 -- stated here so a future flash-size +# trim cannot take it away silently. +CIRCUITPY_BLEIO_NATIVE = 1 + # --- environmental-collector frozen libraries ------------------------------- # Frozen bytecode executes in place from flash; the same library imported # from lib/ is read into RAM and stays there. On a board without PSRAM that diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk index 321019debb9..c51218faf2b 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk @@ -17,6 +17,13 @@ CIRCUITPY_ESP_PSRAM_FREQ = 80m # Already have a display. CIRCUITPY_PARALLELDISPLAYBUS = 0 +# This project needs _bleio on this board: the hub serves its portal over +# a Nordic UART service and the nodes take their config the same way. The +# port already defaults CIRCUITPY_BLEIO_NATIVE to 1 and only forces it off +# for 2MB flash, the S2 and the P4 -- stated here so a future flash-size +# trim cannot take it away silently. +CIRCUITPY_BLEIO_NATIVE = 1 + # --- environmental-collector frozen libraries ------------------------------- # Frozen bytecode executes in place from flash; the same library imported # from lib/ is read into RAM and stays there. On a board without PSRAM that diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk index e8cb5b57c02..81021c36f4f 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk @@ -17,6 +17,13 @@ CIRCUITPY_ESP_PSRAM_FREQ = 80m # Already have a display. CIRCUITPY_PARALLELDISPLAYBUS = 0 +# This project needs _bleio on this board: the hub serves its portal over +# a Nordic UART service and the nodes take their config the same way. The +# port already defaults CIRCUITPY_BLEIO_NATIVE to 1 and only forces it off +# for 2MB flash, the S2 and the P4 -- stated here so a future flash-size +# trim cannot take it away silently. +CIRCUITPY_BLEIO_NATIVE = 1 + # --- environmental-collector frozen libraries ------------------------------- # Frozen bytecode executes in place from flash; the same library imported # from lib/ is read into RAM and stays there. On a board without PSRAM that diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index 739c12796a3..6898b808757 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -17,6 +17,13 @@ CIRCUITPY_ESP_PSRAM_FREQ = 80m CIRCUITPY_ESPCAMERA = 0 CIRCUITPY_PARALLELDISPLAYBUS = 0 +# This project needs _bleio on this board: the hub serves its portal over +# a Nordic UART service and the nodes take their config the same way. The +# port already defaults CIRCUITPY_BLEIO_NATIVE to 1 and only forces it off +# for 2MB flash, the S2 and the P4 -- stated here so a future flash-size +# trim cannot take it away silently. +CIRCUITPY_BLEIO_NATIVE = 1 + # --- environmental-collector frozen libraries ------------------------------- # Frozen bytecode executes in place from flash; the same library imported # from lib/ is read into RAM and stays there. On a board without PSRAM that