From 579cdf30f18891def56587c88621651fce629af8 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 5 May 2021 16:49:29 -0400 Subject: [PATCH] fix more build errors --- .../boards/kicksat-sprite/mpconfigboard.mk | 5 ++++- ports/cxd56/mpconfigport.h | 12 +++++++----- ports/nrf/boards/pca10100/mpconfigboard.mk | 11 +++++------ py/repl.c | 2 +- supervisor/usb.h | 2 ++ 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk index ea010ed2ee..d7b8a4bb1e 100644 --- a/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk +++ b/ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk @@ -12,12 +12,15 @@ LONGINT_IMPL = MPZ # Not needed. CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOMP3 = 0 -CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_BLEIO_HCI = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_PS2IO = 0 CIRCUITPY_RGBMATRIX = 0 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_TOUCHIO = 0 + CIRCUITPY_ULAB = 0 # Override optimization to keep binary small diff --git a/ports/cxd56/mpconfigport.h b/ports/cxd56/mpconfigport.h index bce68f83f2..4c332577e6 100644 --- a/ports/cxd56/mpconfigport.h +++ b/ports/cxd56/mpconfigport.h @@ -32,17 +32,19 @@ // 64kiB stack #define CIRCUITPY_DEFAULT_STACK_SIZE (0x10000) -#include "py/circuitpy_mpconfig.h" - -#define MICROPY_BYTES_PER_GC_BLOCK (32) - -// CXD56 architecture uses fixed endpoint numbers +// CXD56 architecture uses fixed endpoint numbers. +// Override default definitions in circuitpy_mpconfig.h, +// so define these before #include'ing that file. #define USB_CDC_EP_NUM_NOTIFICATION (3) #define USB_CDC_EP_NUM_DATA_OUT (2) #define USB_CDC_EP_NUM_DATA_IN (2) #define USB_MSC_EP_NUM_OUT (5) #define USB_MSC_EP_NUM_IN (4) +#include "py/circuitpy_mpconfig.h" + +#define MICROPY_BYTES_PER_GC_BLOCK (32) + #define MICROPY_PORT_ROOT_POINTERS \ CIRCUITPY_COMMON_ROOT_POINTERS \ diff --git a/ports/nrf/boards/pca10100/mpconfigboard.mk b/ports/nrf/boards/pca10100/mpconfigboard.mk index dd59eb96c9..9fae5ccc4d 100644 --- a/ports/nrf/boards/pca10100/mpconfigboard.mk +++ b/ports/nrf/boards/pca10100/mpconfigboard.mk @@ -9,25 +9,24 @@ INTERNAL_FLASH_FILESYSTEM = 1 CIRCUITPY_ALARM = 0 CIRCUITPY_AUDIOMP3 = 0 +CIRCUITPY_BINASCII = 0 CIRCUITPY_BITBANGIO = 0 -CIRCUITPY_BITMAPTOOLS = 0 -CIRCUITPY_BUSIO = 1 +CIRCUITPY_BUSDEVICE = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_JSON = 0 CIRCUITPY_MSGPACK = 0 CIRCUITPY_NEOPIXEL_WRITE = 0 CIRCUITPY_NVM = 0 CIRCUITPY_PIXELBUF = 0 +CIRCUITPY_RE = 0 CIRCUITPY_RGBMATRIX = 0 -CIRCUITPY_ROTARYIO = 0 -CIRCUITPY_RTC = 1 CIRCUITPY_SDCARDIO = 0 -CIRCUITPY_TOUCHIO = 0 CIRCUITPY_ULAB = 0 -CIRCUITPY_BUSDEVICE = 0 + MICROPY_PY_ASYNC_AWAIT = 0 SUPEROPT_GC = 0 diff --git a/py/repl.c b/py/repl.c index ac88e91114..7ceae573d4 100644 --- a/py/repl.c +++ b/py/repl.c @@ -153,7 +153,7 @@ STATIC bool test_qstr(mp_obj_t obj, qstr name) { } else { // try builtin module return mp_map_lookup((mp_map_t *)&mp_builtin_module_map, - MP_OBJ_NEW_QSTR(name), MP_MAP_LOOKUP); + MP_OBJ_NEW_QSTR(name), MP_MAP_LOOKUP) != NULL; } } diff --git a/supervisor/usb.h b/supervisor/usb.h index 9c792d07f1..918da98897 100644 --- a/supervisor/usb.h +++ b/supervisor/usb.h @@ -28,6 +28,8 @@ #define MICROPY_INCLUDED_SUPERVISOR_USB_H #include +#include +#include // Ports must call this as frequently as they can in order to keep the USB // connection alive and responsive. Normally this is called from background