From 4dfba2f8acec7d76fa61c13fcec662b6d957f69a Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 1 Nov 2018 17:14:11 -0400 Subject: [PATCH] put .frozen before /lib in sys.path; update frozen libraries --- frozen/Adafruit_CircuitPython_BusDevice | 2 +- frozen/Adafruit_CircuitPython_CircuitPlayground | 2 +- frozen/Adafruit_CircuitPython_Crickit | 2 +- frozen/Adafruit_CircuitPython_DotStar | 2 +- frozen/Adafruit_CircuitPython_HID | 2 +- frozen/Adafruit_CircuitPython_IRRemote | 2 +- frozen/Adafruit_CircuitPython_LIS3DH | 2 +- frozen/Adafruit_CircuitPython_Motor | 2 +- frozen/Adafruit_CircuitPython_NeoPixel | 2 +- frozen/Adafruit_CircuitPython_Thermistor | 2 +- frozen/Adafruit_CircuitPython_seesaw | 2 +- main.c | 3 ++- ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk | 2 ++ ports/esp8266/main.c | 3 ++- tools/preprocess_frozen_modules.py | 2 +- 15 files changed, 18 insertions(+), 14 deletions(-) diff --git a/frozen/Adafruit_CircuitPython_BusDevice b/frozen/Adafruit_CircuitPython_BusDevice index 0791964147..d86fc7e81d 160000 --- a/frozen/Adafruit_CircuitPython_BusDevice +++ b/frozen/Adafruit_CircuitPython_BusDevice @@ -1 +1 @@ -Subproject commit 07919641470edb602585c6a91f7b8eacf17e664b +Subproject commit d86fc7e81d51465ca1eae6f8c1141f81f065f5aa diff --git a/frozen/Adafruit_CircuitPython_CircuitPlayground b/frozen/Adafruit_CircuitPython_CircuitPlayground index d0aa6dc56d..f4ee725fb9 160000 --- a/frozen/Adafruit_CircuitPython_CircuitPlayground +++ b/frozen/Adafruit_CircuitPython_CircuitPlayground @@ -1 +1 @@ -Subproject commit d0aa6dc56d66decfae92daced7384c1e3518a666 +Subproject commit f4ee725fb93fd1a31666d3f71d10c94eb96df7c8 diff --git a/frozen/Adafruit_CircuitPython_Crickit b/frozen/Adafruit_CircuitPython_Crickit index 44f52c5dac..412392c8bd 160000 --- a/frozen/Adafruit_CircuitPython_Crickit +++ b/frozen/Adafruit_CircuitPython_Crickit @@ -1 +1 @@ -Subproject commit 44f52c5dacd9fc605565e5794e95c9a785aaf693 +Subproject commit 412392c8bdb6b4378e007eb7974c76b92fa9ff1d diff --git a/frozen/Adafruit_CircuitPython_DotStar b/frozen/Adafruit_CircuitPython_DotStar index af25424ee7..03c24157d4 160000 --- a/frozen/Adafruit_CircuitPython_DotStar +++ b/frozen/Adafruit_CircuitPython_DotStar @@ -1 +1 @@ -Subproject commit af25424ee7dbebea3e5d77390c017018ffa52d36 +Subproject commit 03c24157d46672c723021686f7a838cfeb2db2ba diff --git a/frozen/Adafruit_CircuitPython_HID b/frozen/Adafruit_CircuitPython_HID index 5c2f6ef1ed..f5e70e0925 160000 --- a/frozen/Adafruit_CircuitPython_HID +++ b/frozen/Adafruit_CircuitPython_HID @@ -1 +1 @@ -Subproject commit 5c2f6ef1ed80f24b6a3878067d40350d3725e198 +Subproject commit f5e70e09250f2a25ebb6487a30a763041644c5d3 diff --git a/frozen/Adafruit_CircuitPython_IRRemote b/frozen/Adafruit_CircuitPython_IRRemote index c29e10b590..ec11164ec6 160000 --- a/frozen/Adafruit_CircuitPython_IRRemote +++ b/frozen/Adafruit_CircuitPython_IRRemote @@ -1 +1 @@ -Subproject commit c29e10b590efbdf06163897b49cd0c2bea82ad6e +Subproject commit ec11164ec6682094a48d0f9848d2c4c89c08f3bc diff --git a/frozen/Adafruit_CircuitPython_LIS3DH b/frozen/Adafruit_CircuitPython_LIS3DH index c4152a0d87..6298cd3638 160000 --- a/frozen/Adafruit_CircuitPython_LIS3DH +++ b/frozen/Adafruit_CircuitPython_LIS3DH @@ -1 +1 @@ -Subproject commit c4152a0d87a04903ae0e612eb381af440c9e28b3 +Subproject commit 6298cd363811ad6ac10d4325c898be87a70d7bb2 diff --git a/frozen/Adafruit_CircuitPython_Motor b/frozen/Adafruit_CircuitPython_Motor index e0b709f171..4421e79661 160000 --- a/frozen/Adafruit_CircuitPython_Motor +++ b/frozen/Adafruit_CircuitPython_Motor @@ -1 +1 @@ -Subproject commit e0b709f1710555da67705360870ba0d14ced7e06 +Subproject commit 4421e79661002ff8da6c0c4f22940ec843ee300b diff --git a/frozen/Adafruit_CircuitPython_NeoPixel b/frozen/Adafruit_CircuitPython_NeoPixel index e9f50cb667..72e8f3855e 160000 --- a/frozen/Adafruit_CircuitPython_NeoPixel +++ b/frozen/Adafruit_CircuitPython_NeoPixel @@ -1 +1 @@ -Subproject commit e9f50cb6678a1684591ee021b95a3c4b51786fee +Subproject commit 72e8f3855ecd136641d536a49311c38ee4f76f33 diff --git a/frozen/Adafruit_CircuitPython_Thermistor b/frozen/Adafruit_CircuitPython_Thermistor index 00f4ebca6c..eae584918e 160000 --- a/frozen/Adafruit_CircuitPython_Thermistor +++ b/frozen/Adafruit_CircuitPython_Thermistor @@ -1 +1 @@ -Subproject commit 00f4ebca6c740b76c1c464f83d514ac20b0600e1 +Subproject commit eae584918e72ff5fa323825470f276b31829ef9f diff --git a/frozen/Adafruit_CircuitPython_seesaw b/frozen/Adafruit_CircuitPython_seesaw index 340cd17fad..e3e3021d85 160000 --- a/frozen/Adafruit_CircuitPython_seesaw +++ b/frozen/Adafruit_CircuitPython_seesaw @@ -1 +1 @@ -Subproject commit 340cd17fad0c29d3a70d6e298a30ecc753df054e +Subproject commit e3e3021d8578fde450511b47a085d9d56ab46741 diff --git a/main.c b/main.c index cbc0b093c3..2484d3f1fe 100644 --- a/main.c +++ b/main.c @@ -92,9 +92,10 @@ void reset_mp(void) { mp_obj_list_init(mp_sys_path, 0); mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script) mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_)); - mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib)); // Frozen modules are in their own pseudo-dir, e.g., ".frozen". + // Prioritize .frozen over /lib. mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_FROZEN_FAKE_DIR_QSTR)); + mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib)); mp_obj_list_init(mp_sys_argv, 0); } diff --git a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk index 0f8d0f9ca4..ddc262a570 100644 --- a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk @@ -10,6 +10,8 @@ LONGINT_IMPL = NONE CHIP_VARIANT = SAMD21E18A CHIP_FAMILY = samd21 +CFLAGS_INLINE_LIMIT = 45 + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/esp8266/main.c b/ports/esp8266/main.c index c590ab59eb..dda17bb379 100644 --- a/ports/esp8266/main.c +++ b/ports/esp8266/main.c @@ -95,10 +95,11 @@ STATIC void mp_reset(void) { mp_init(); mp_obj_list_init(mp_sys_path, 0); mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_)); // current dir (or base dir of the script) - mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib)); mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_)); // Frozen modules are in their own pseudo-dir, e.g., ".frozen". + // Prioritize .frozen over /lib. mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_FROZEN_FAKE_DIR_QSTR)); + mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib)); mp_obj_list_init(mp_sys_argv, 0); diff --git a/tools/preprocess_frozen_modules.py b/tools/preprocess_frozen_modules.py index d157deeee9..f2b59ffc0f 100755 --- a/tools/preprocess_frozen_modules.py +++ b/tools/preprocess_frozen_modules.py @@ -33,7 +33,7 @@ def copy_and_process(in_dir, out_dir): for root, subdirs, files in os.walk(in_dir): # Skip library examples directories. - if Path(root).name in ['examples', 'docs']: + if Path(root).name in ['examples', 'tests', 'docs']: continue for file in files: