Skip to content

Commit ef65ee7

Browse files
dhalberttannewt
authored andcommitted
Freeze libraries needed by adafruit_circuitplayground library into firmware.
This saves a lot of RAM. Fixes micropython#287. Also fixed compilation of frozen_mpy.c to use supplied make rule rather than builtin rule (supplied rule suppresses printing out the gcc command line).
1 parent f498167 commit ef65ee7

File tree

6 files changed

+21
-0
lines changed

6 files changed

+21
-0
lines changed

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,12 @@
2020
[submodule "atmel-samd/frozen/Adafruit_CircuitPython_NeoPixel"]
2121
path = frozen/Adafruit_CircuitPython_NeoPixel
2222
url = https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel
23+
[submodule "frozen/Adafruit_CircuitPython_Thermistor"]
24+
path = frozen/Adafruit_CircuitPython_Thermistor
25+
url = https://github.com/adafruit/Adafruit_CircuitPython_Thermistor.git
26+
[submodule "frozen/Adafruit_CircuitPython_LIS3DH"]
27+
path = frozen/Adafruit_CircuitPython_LIS3DH
28+
url = https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH.git
29+
[submodule "frozen/Adafruit_CircuitPython_BusDevice"]
30+
path = frozen/Adafruit_CircuitPython_BusDevice
31+
url = https://github.com/adafruit/Adafruit_CircuitPython_BusDevice.git

atmel-samd/boards/circuitplayground_express/mpconfigboard.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ FLASH_IMPL = spi_flash.c
77
CHIP_VARIANT = SAMD21G18A
88

99
# Include these Python libraries in firmware.
10+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
11+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
1012
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
13+
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor

py/mkrules.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ vpath %.c . $(TOP)
4646
$(BUILD)/%.o: %.c
4747
$(call compile_c)
4848

49+
# frozen.c and frozen_mpy.c are created in $(BUILD), so use our rule
50+
# for those as well.
51+
vpath %.c . $(BUILD)
52+
$(BUILD)/%.o: %.c
53+
$(call compile_c)
54+
4955
# List all native flags since the current build system doesn't have
5056
# the MicroPython configuration available. However, these flags are
5157
# needed to extract all qstrings

0 commit comments

Comments
 (0)