From fbf166af1abbc2a9ac690071afbd0152c4686285 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 20 Mar 2019 14:36:24 -0400 Subject: [PATCH 1/2] enable MICROPY_CPYTHON_COMPAT for most builds except CIRCUITPY_SMALL_BUILD; remove a few other things to make fit --- .../boards/circuitplayground_express/mpconfigboard.mk | 1 + .../boards/circuitplayground_express_crickit/mpconfigboard.mk | 1 + ports/atmel-samd/mpconfigport.h | 3 --- ports/nrf/mpconfigport.h | 3 --- py/circuitpy_mpconfig.h | 1 + 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk index e1fba0d00c..868ca9443d 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk @@ -12,6 +12,7 @@ LONGINT_IMPL = MPZ # Make room for frozen libs. CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_I2CSLAVE = 0 CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index b450f1d555..1dbd1a7393 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -13,6 +13,7 @@ LONGINT_IMPL = NONE CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_PIXELBUF = 0 CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_I2CSLAVE = 0 CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21 diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h index dbf1c93f37..4e15a6c308 100644 --- a/ports/atmel-samd/mpconfigport.h +++ b/ports/atmel-samd/mpconfigport.h @@ -35,8 +35,6 @@ #define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21" #define SPI_FLASH_MAX_BAUDRATE 8000000 #define CIRCUITPY_DEFAULT_STACK_SIZE 4096 - -#define MICROPY_CPYTHON_COMPAT (0) #define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0) #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0) #define MICROPY_PY_FUNCTION_ATTRS (0) @@ -64,7 +62,6 @@ #define SPI_FLASH_MAX_BAUDRATE 24000000 // 24kiB stack #define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000 -#define MICROPY_CPYTHON_COMPAT (1) #define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1) #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1) #define MICROPY_PY_FUNCTION_ATTRS (1) diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 1d863ed72c..1b2d8ea122 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -30,9 +30,6 @@ #include "ble_drv.h" -#define MICROPY_CPYTHON_COMPAT (1) -//#define MICROPY_MODULE_BUILTIN_INIT (1) // TODO check this -//#define MICROPY_MODULE_WEAK_LINKS (1) // TODO check this #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1) #define MICROPY_PY_FUNCTION_ATTRS (1) #define MICROPY_PY_IO (1) diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 00f3c7b3f4..b867c01865 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -177,6 +177,7 @@ typedef long mp_off_t; // Remove some lesser-used functionality to make small builds fit. #define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD) +#define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD) #define MICROPY_MODULE_WEAK_LINKS (CIRCUITPY_FULL_BUILD) #define MICROPY_PY_ALL_SPECIAL_METHODS (CIRCUITPY_FULL_BUILD) #define MICROPY_PY_BUILTINS_COMPLEX (CIRCUITPY_FULL_BUILD) From eca23a727965c067a09ed7d1d99ec878cc061d65 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 20 Mar 2019 15:38:52 -0400 Subject: [PATCH 2/2] remove i2cslave from feather m0 crickit --- .../boards/feather_m0_express_crickit/mpconfigboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk index 6b7750221e..fa39de33fa 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk @@ -12,6 +12,7 @@ LONGINT_IMPL = MPZ # Make space for frozen libs CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_I2CSLAVE = 0 CHIP_VARIANT = SAMD21G18A CHIP_FAMILY = samd21