Merge pull request #1339 from dhalbert/3.x-frozen-swap

Merge 3.x .frozen and /lib swap on sys.path; update frozen libs
This commit is contained in:
Scott Shawcroft 2018-11-15 12:52:54 -08:00 committed by GitHub
commit 0ea31ec15d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 19 additions and 12 deletions

@ -1 +1 @@
Subproject commit 97d4129b8117d177df2675839ec4081b3570838d
Subproject commit d86fc7e81d51465ca1eae6f8c1141f81f065f5aa

@ -1 +1 @@
Subproject commit 36ec7b371f1751961de6d2c910533618d931f109
Subproject commit f4ee725fb93fd1a31666d3f71d10c94eb96df7c8

@ -1 +1 @@
Subproject commit bbf2d897ae116531bfa15af3bcb32b0123acc435
Subproject commit 412392c8bdb6b4378e007eb7974c76b92fa9ff1d

@ -1 +1 @@
Subproject commit 99c71a6c1ea00bc14f0a4507116ff216beafafbd
Subproject commit f5e70e09250f2a25ebb6487a30a763041644c5d3

@ -1 +1 @@
Subproject commit 377910d5a9bfbf833dfd3064f80c5b2ae0c78c9a
Subproject commit 6298cd363811ad6ac10d4325c898be87a70d7bb2

@ -1 +1 @@
Subproject commit 00326214fc2ece8b31c07a654b192797e6a08043
Subproject commit 4421e79661002ff8da6c0c4f22940ec843ee300b

@ -1 +1 @@
Subproject commit 4b9563d6a74c6089d0ef5466975d11ef52851bca
Subproject commit 72e8f3855ecd136641d536a49311c38ee4f76f33

@ -1 +1 @@
Subproject commit 1570b23f7a6d62e169d2fd15969e507a1da05374
Subproject commit eae584918e72ff5fa323825470f276b31829ef9f

@ -1 +1 @@
Subproject commit e3e3021d8578fde450511b47a085d9d56ab46741
Subproject commit c92c22ff029ee05bd392299cf25887e9af48903a

3
main.c
View File

@ -108,9 +108,10 @@ void start_mp(supervisor_allocation* heap) {
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);

View File

@ -19,3 +19,6 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor
#Adding per @danh to reduce memory usage and get the latest changes in
CFLAGS_INLINE_LIMIT = 55

View File

@ -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

View File

@ -33,5 +33,5 @@ bool common_hal_get_serial_connected(void) {
}
bool common_hal_get_serial_bytes_available(void) {
return (bool) serial_bytes_available();
return (bool) serial_bytes_available();
}

View File

@ -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);