From cce8b2be07b5640026d7ef06d1421c217fe6a5d4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 31 Mar 2021 09:40:26 -0500 Subject: [PATCH] raspberypi: Allow mpconfigboard to override additional items This allows more options to be overridden to 0 in an mpconfigboard.mk. Improved: * FRAMEBUFFERIO, FULL_BUILD, BITOPS, PWMIO, RGBMATRIX, OTARYIO, PULSEIO, WATCHDOG Still problematic (pull requests welcome): * RP2PIO & NEOPIXEL_WRITE, possibly only if a status neopixel is defined * BITBANGIO, possibly only if BUSIO is enabled * RTC Incidentally, with RP2PIO & NEOPIXEL_WRITE, BITBANGIO, and RTC re-enabled I get ``` 323956 bytes used, 720524 bytes free in flash firmware space out of 1044480 bytes (1020.0kB). 12072 bytes used, 250072 bytes free in ram for stack and heap out of 262144 bytes (256.0kB). ``` Closes #4515 --- ports/raspberrypi/mpconfigport.mk | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index 395948a514..ddbd0ec63b 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -17,19 +17,15 @@ endif # All raspberrypi ports have longints. LONGINT_IMPL = MPZ -ifndef CIRCUITPY_RP2PIO -CIRCUITPY_RP2PIO = 1 -else -CIRCUITPY_NEOPIXEL_WRITE = 0 -endif - -CIRCUITPY_FRAMEBUFFERIO = 1 -CIRCUITPY_FULL_BUILD = 1 +CIRCUITPY_RP2PIO ?= 1 +CIRCUITPY_NEOPIXEL_WRITE ?= $(CIRCUITPY_RP2PIO) +CIRCUITPY_FRAMEBUFFERIO ?= 1 +CIRCUITPY_FULL_BUILD ?= 1 CIRCUITPY_AUDIOMP3 ?= 1 -CIRCUITPY_BITOPS = 1 -CIRCUITPY_PWMIO = 1 -CIRCUITPY_RGBMATRIX = 1 -CIRCUITPY_ROTARYIO = 1 +CIRCUITPY_BITOPS ?= 1 +CIRCUITPY_PWMIO ?= 1 +CIRCUITPY_RGBMATRIX ?= 1 +CIRCUITPY_ROTARYIO ?= 1 # Things that need to be implemented. # Use PWM interally @@ -37,8 +33,8 @@ CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_NVM = 1 # Use PIO interally -CIRCUITPY_PULSEIO = 1 -CIRCUITPY_WATCHDOG = 1 +CIRCUITPY_PULSEIO ?= 1 +CIRCUITPY_WATCHDOG ?= 1 # Audio via PWM CIRCUITPY_AUDIOIO = 0