summaryrefslogtreecommitdiff
path: root/atmel-samd
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2017-08-23 14:05:59 -0400
committerScott Shawcroft <scott@tannewt.org>2017-08-23 11:05:59 -0700
commit74cfdeb316420a3732370a5e19a6822c52395384 (patch)
tree8b719c40f2b52e5fe654d490e5ca4bdb4858717a /atmel-samd
parent16ef611b0bd9e76583b0a7e761d8ac2e00c8ff6d (diff)
Added ability to freeze multiple directories; freeze neopixel library in cpx build (#199)
Reworked frozen module support: clean up makefiles and handle multiple directories. Modules to freeze are included as git submodules. Add neopixel to circuitplayground express build. Fixes #56
Diffstat (limited to 'atmel-samd')
-rw-r--r--atmel-samd/Makefile6
-rw-r--r--atmel-samd/boards/circuitplayground_express/mpconfigboard.mk3
2 files changed, 7 insertions, 2 deletions
diff --git a/atmel-samd/Makefile b/atmel-samd/Makefile
index 9e3a10bd8..913461261 100644
--- a/atmel-samd/Makefile
+++ b/atmel-samd/Makefile
@@ -145,9 +145,11 @@ CFLAGS += -DMICROPY_MODULE_FROZEN_STR
CFLAGS += -Wno-error=lto-type-mismatch
endif
-ifneq ($(FROZEN_MPY_DIR),)
# To use frozen bytecode, put your .py files in a subdirectory (eg frozen/) and
-# then invoke make with FROZEN_MPY_DIR=frozen (be sure to build from scratch).
+# then invoke make with FROZEN_MPY_DIR=frozen or FROZEN_MPY_DIRS="dir1 dir2"
+# (be sure to build from scratch).
+
+ifneq ($(FROZEN_MPY_DIRS),)
CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool
CFLAGS += -DMICROPY_MODULE_FROZEN_MPY
CFLAGS += -Wno-error=lto-type-mismatch
diff --git a/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk b/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk
index 54739ddb2..d773f2f60 100644
--- a/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk
+++ b/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk
@@ -5,3 +5,6 @@ USB_PID = 0x8019
FLASH_IMPL = spi_flash.c
CHIP_VARIANT = SAMD21G18A
+
+# Include these Python libraries in firmware.
+FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel