diff options
| author | Dan Halbert <halbert@halwitz.org> | 2017-10-03 18:10:13 -0400 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2017-10-08 10:54:46 -0600 |
| commit | ef65ee78c544f0996eeb77ae762d2c4c7ed17057 (patch) | |
| tree | 0452584406ca3acc7fd333f7c5001650f70e5a20 | |
| parent | f4981677b0b73d286f3af098a4111f8ba6d286bc (diff) | |
Freeze libraries needed by adafruit_circuitplayground library into firmware.
This saves a lot of RAM. Fixes #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).
| -rw-r--r-- | .gitmodules | 9 | ||||
| -rw-r--r-- | atmel-samd/boards/circuitplayground_express/mpconfigboard.mk | 3 | ||||
| m--------- | frozen/Adafruit_CircuitPython_BusDevice | 0 | ||||
| m--------- | frozen/Adafruit_CircuitPython_LIS3DH | 0 | ||||
| m--------- | frozen/Adafruit_CircuitPython_Thermistor | 0 | ||||
| -rw-r--r-- | py/mkrules.mk | 6 |
6 files changed, 18 insertions, 0 deletions
diff --git a/.gitmodules b/.gitmodules index 54c4d5a9c..faad88a85 100644 --- a/.gitmodules +++ b/.gitmodules @@ -20,3 +20,12 @@ [submodule "atmel-samd/frozen/Adafruit_CircuitPython_NeoPixel"] path = frozen/Adafruit_CircuitPython_NeoPixel url = https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel +[submodule "frozen/Adafruit_CircuitPython_Thermistor"] + path = frozen/Adafruit_CircuitPython_Thermistor + url = https://github.com/adafruit/Adafruit_CircuitPython_Thermistor.git +[submodule "frozen/Adafruit_CircuitPython_LIS3DH"] + path = frozen/Adafruit_CircuitPython_LIS3DH + url = https://github.com/adafruit/Adafruit_CircuitPython_LIS3DH.git +[submodule "frozen/Adafruit_CircuitPython_BusDevice"] + path = frozen/Adafruit_CircuitPython_BusDevice + url = https://github.com/adafruit/Adafruit_CircuitPython_BusDevice.git diff --git a/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk b/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk index d773f2f60..e8195c90d 100644 --- a/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk +++ b/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk @@ -7,4 +7,7 @@ FLASH_IMPL = spi_flash.c CHIP_VARIANT = SAMD21G18A # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor diff --git a/frozen/Adafruit_CircuitPython_BusDevice b/frozen/Adafruit_CircuitPython_BusDevice new file mode 160000 +Subproject 39f28ed4e0e5a06fc33fd01c1efc8c52c4140f0 diff --git a/frozen/Adafruit_CircuitPython_LIS3DH b/frozen/Adafruit_CircuitPython_LIS3DH new file mode 160000 +Subproject fa00b61d1bde90c3cf9cce74388cb9717058b2b diff --git a/frozen/Adafruit_CircuitPython_Thermistor b/frozen/Adafruit_CircuitPython_Thermistor new file mode 160000 +Subproject 2d57c0ba9a09d6d30f0ae2b98aba9567c25e6fb diff --git a/py/mkrules.mk b/py/mkrules.mk index 9ed5483b2..656ffd03c 100644 --- a/py/mkrules.mk +++ b/py/mkrules.mk @@ -46,6 +46,12 @@ vpath %.c . $(TOP) $(BUILD)/%.o: %.c $(call compile_c) +# frozen.c and frozen_mpy.c are created in $(BUILD), so use our rule +# for those as well. +vpath %.c . $(BUILD) +$(BUILD)/%.o: %.c + $(call compile_c) + # List all native flags since the current build system doesn't have # the MicroPython configuration available. However, these flags are # needed to extract all qstrings |
