From fb6b4385801fc05ac993c2fc4866a0f16bdfc4f5 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 11 Aug 2021 14:47:35 -0700 Subject: [PATCH] Make `getpass` and `traceback` full build only This leaves much more space on SAMD21 builds that aren't "full builds". These are new APIs that we don't need to add to old boards. Also, tweak two Arduino boards to save space on them. --- .../boards/arduino_mkr1300/mpconfigboard.h | 13 +++++++++++++ .../boards/arduino_nano_33_iot/mpconfigboard.h | 8 ++++++++ py/circuitpy_mpconfig.mk | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h index f0748f35de..6a3f7a9687 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h @@ -16,3 +16,16 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 +// USD ID +#define IGNORE_PIN_PA18 1 + +// Hooked to the external crystal +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// SWD only +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 + +// Not connected +#define IGNORE_PIN_PA28 1 diff --git a/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.h b/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.h index 62883ad4a5..6be4f5606a 100644 --- a/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.h @@ -16,3 +16,11 @@ // USB is always used internally so skip the pin objects for it. #define IGNORE_PIN_PA24 1 #define IGNORE_PIN_PA25 1 + +// Not connected +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 + +// SWD only +#define IGNORE_PIN_PA30 1 +#define IGNORE_PIN_PA31 1 diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index e22cccda43..be68904d18 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -190,7 +190,7 @@ CFLAGS += -DCIRCUITPY_FREQUENCYIO=$(CIRCUITPY_FREQUENCYIO) CIRCUITPY_GAMEPADSHIFT ?= 0 CFLAGS += -DCIRCUITPY_GAMEPADSHIFT=$(CIRCUITPY_GAMEPADSHIFT) -CIRCUITPY_GETPASS ?= 1 +CIRCUITPY_GETPASS ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_GETPASS=$(CIRCUITPY_GETPASS) CIRCUITPY_GNSS ?= 0 @@ -336,7 +336,7 @@ CFLAGS += -DCIRCUITPY_TOUCHIO_USE_NATIVE=$(CIRCUITPY_TOUCHIO_USE_NATIVE) CIRCUITPY_TOUCHIO ?= 1 CFLAGS += -DCIRCUITPY_TOUCHIO=$(CIRCUITPY_TOUCHIO) -CIRCUITPY_TRACEBACK ?= 1 +CIRCUITPY_TRACEBACK ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_TRACEBACK=$(CIRCUITPY_TRACEBACK) # For debugging.