From b3e458c326545995395660fdccda3736226c85a1 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 12 Sep 2024 14:02:07 -0700 Subject: [PATCH] Refactor RP2350 unique module build settings This enables picodvi by default on RP2350 boards and fixes #9615 --- .../adafruit_feather_rp2350/mpconfigboard.mk | 5 ----- .../boards/adafruit_metro_rp2350/mpconfigboard.mk | 2 -- .../cytron_iriv_io_controller/mpconfigboard.mk | 1 - .../cytron_motion_2350_pro/mpconfigboard.mk | 1 - .../boards/pimoroni_pga2350/mpconfigboard.mk | 1 - .../boards/pimoroni_pico_plus2/mpconfigboard.mk | 1 - .../boards/pimoroni_plasma2350/mpconfigboard.mk | 1 - .../boards/pimoroni_tiny2350/mpconfigboard.mk | 1 - .../boards/raspberry_pi_pico2/mpconfigboard.mk | 1 - .../boards/seeeduino_xiao_rp2350/mpconfigboard.mk | 2 -- .../solderparty_rp2350_stamp/mpconfigboard.mk | 2 -- .../solderparty_rp2350_stamp_xl/mpconfigboard.mk | 2 -- .../sparkfun_pro_micro_rp2350/mpconfigboard.mk | 7 ------- ports/raspberrypi/mpconfigport.mk | 15 ++++++++++++++- 14 files changed, 14 insertions(+), 28 deletions(-) diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2350/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_feather_rp2350/mpconfigboard.mk index 021e382264ba..0816bebd093b 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2350/mpconfigboard.mk +++ b/ports/raspberrypi/boards/adafruit_feather_rp2350/mpconfigboard.mk @@ -8,8 +8,3 @@ CHIP_PACKAGE = A CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "GD25Q64C,W25Q64JVxQ" - -CIRCUITPY_ALARM = 0 - -CIRCUITPY_FLOPPYIO = 0 -CIRCUITPY_PICODVI = 1 diff --git a/ports/raspberrypi/boards/adafruit_metro_rp2350/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_metro_rp2350/mpconfigboard.mk index d668b709ba0d..94a3c5c3f377 100644 --- a/ports/raspberrypi/boards/adafruit_metro_rp2350/mpconfigboard.mk +++ b/ports/raspberrypi/boards/adafruit_metro_rp2350/mpconfigboard.mk @@ -8,5 +8,3 @@ CHIP_PACKAGE = A CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" - -CIRCUITPY_ALARM = 0 diff --git a/ports/raspberrypi/boards/cytron_iriv_io_controller/mpconfigboard.mk b/ports/raspberrypi/boards/cytron_iriv_io_controller/mpconfigboard.mk index 73e6954977e8..56fc00d09739 100644 --- a/ports/raspberrypi/boards/cytron_iriv_io_controller/mpconfigboard.mk +++ b/ports/raspberrypi/boards/cytron_iriv_io_controller/mpconfigboard.mk @@ -10,7 +10,6 @@ CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" CIRCUITPY__EVE = 1 -CIRCUITPY_ALARM = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SimpleIO diff --git a/ports/raspberrypi/boards/cytron_motion_2350_pro/mpconfigboard.mk b/ports/raspberrypi/boards/cytron_motion_2350_pro/mpconfigboard.mk index 35d16884bdf1..0ac939ce6a26 100644 --- a/ports/raspberrypi/boards/cytron_motion_2350_pro/mpconfigboard.mk +++ b/ports/raspberrypi/boards/cytron_motion_2350_pro/mpconfigboard.mk @@ -10,7 +10,6 @@ CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" CIRCUITPY__EVE = 1 -CIRCUITPY_ALARM = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/raspberrypi/boards/pimoroni_pga2350/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_pga2350/mpconfigboard.mk index 5015062767d7..4091f6d1b0bc 100644 --- a/ports/raspberrypi/boards/pimoroni_pga2350/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_pga2350/mpconfigboard.mk @@ -10,4 +10,3 @@ CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" CIRCUITPY__EVE = 1 -CIRCUITPY_ALARM = 0 diff --git a/ports/raspberrypi/boards/pimoroni_pico_plus2/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_pico_plus2/mpconfigboard.mk index a6f18a3bf15c..d47f28d64fb8 100644 --- a/ports/raspberrypi/boards/pimoroni_pico_plus2/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_pico_plus2/mpconfigboard.mk @@ -10,4 +10,3 @@ CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" CIRCUITPY__EVE = 1 -CIRCUITPY_ALARM = 0 diff --git a/ports/raspberrypi/boards/pimoroni_plasma2350/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_plasma2350/mpconfigboard.mk index 6e7b7497f5d7..56fd7b641de3 100644 --- a/ports/raspberrypi/boards/pimoroni_plasma2350/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_plasma2350/mpconfigboard.mk @@ -10,4 +10,3 @@ CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ" CIRCUITPY__EVE = 1 -CIRCUITPY_ALARM = 0 diff --git a/ports/raspberrypi/boards/pimoroni_tiny2350/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_tiny2350/mpconfigboard.mk index 04569b08cfb3..9ffdf263003f 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2350/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_tiny2350/mpconfigboard.mk @@ -10,4 +10,3 @@ CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ" CIRCUITPY__EVE = 1 -CIRCUITPY_ALARM = 0 diff --git a/ports/raspberrypi/boards/raspberry_pi_pico2/mpconfigboard.mk b/ports/raspberrypi/boards/raspberry_pi_pico2/mpconfigboard.mk index 7a684716674d..43328dd47094 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico2/mpconfigboard.mk +++ b/ports/raspberrypi/boards/raspberry_pi_pico2/mpconfigboard.mk @@ -10,4 +10,3 @@ CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ" CIRCUITPY__EVE = 1 -CIRCUITPY_ALARM = 0 diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2350/mpconfigboard.mk b/ports/raspberrypi/boards/seeeduino_xiao_rp2350/mpconfigboard.mk index cce1027615e5..d5f866bd89e9 100644 --- a/ports/raspberrypi/boards/seeeduino_xiao_rp2350/mpconfigboard.mk +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2350/mpconfigboard.mk @@ -8,5 +8,3 @@ CHIP_PACKAGE = A CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "P25Q16H" - -CIRCUITPY_ALARM = 0 diff --git a/ports/raspberrypi/boards/solderparty_rp2350_stamp/mpconfigboard.mk b/ports/raspberrypi/boards/solderparty_rp2350_stamp/mpconfigboard.mk index 1e98eb99a0bb..7f050ee33523 100644 --- a/ports/raspberrypi/boards/solderparty_rp2350_stamp/mpconfigboard.mk +++ b/ports/raspberrypi/boards/solderparty_rp2350_stamp/mpconfigboard.mk @@ -10,8 +10,6 @@ CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" CIRCUITPY__EVE = 1 -CIRCUITPY_ALARM = 0 -CIRCUITPY_PICODVI = 1 FROZEN_MPY_DIRS += $(TOP)/ports/raspberrypi/boards/solderparty_rp2040_stamp FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/raspberrypi/boards/solderparty_rp2350_stamp_xl/mpconfigboard.mk b/ports/raspberrypi/boards/solderparty_rp2350_stamp_xl/mpconfigboard.mk index 1e9480dcb7a8..92486e16d574 100644 --- a/ports/raspberrypi/boards/solderparty_rp2350_stamp_xl/mpconfigboard.mk +++ b/ports/raspberrypi/boards/solderparty_rp2350_stamp_xl/mpconfigboard.mk @@ -10,8 +10,6 @@ CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" CIRCUITPY__EVE = 1 -CIRCUITPY_ALARM = 0 -CIRCUITPY_PICODVI = 1 FROZEN_MPY_DIRS += $(TOP)/ports/raspberrypi/boards/solderparty_rp2040_stamp FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2350/mpconfigboard.mk b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2350/mpconfigboard.mk index c1c10b82dc6e..e5d6e1b8ff8f 100644 --- a/ports/raspberrypi/boards/sparkfun_pro_micro_rp2350/mpconfigboard.mk +++ b/ports/raspberrypi/boards/sparkfun_pro_micro_rp2350/mpconfigboard.mk @@ -8,10 +8,3 @@ CHIP_PACKAGE = A CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" - -CIRCUITPY_ALARM = 0 -CIRCUITPY_RGBMATRIX = 0 -CIRCUITPY_USB_HOST = 0 - -CIRCUITPY_FLOPPYIO = 0 -CIRCUITPY_PICODVI = 1 diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index ab72ddc4f05b..cd16ec62773e 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -5,7 +5,6 @@ CIRCUITPY_OPTIMIZE_PROPERTY_FLASH_SIZE ?= 1 # CYW43 support does not provide settable MAC addresses for station or AP. CIRCUITPY_WIFI_RADIO_SETTABLE_MAC_ADDRESS = 0 -CIRCUITPY_ALARM ?= 1 CIRCUITPY_RP2PIO ?= 1 CIRCUITPY_NEOPIXEL_WRITE ?= $(CIRCUITPY_RP2PIO) CIRCUITPY_FLOPPYIO ?= 1 @@ -47,6 +46,20 @@ CIRCUITPY_AUDIOPWMIO ?= 1 CIRCUITPY_AUDIOMIXER ?= 1 +ifeq ($(CHIP_VARIANT),RP2040) +CIRCUITPY_ALARM ?= 1 + +# Default PICODVI off because it uses RAM to store code run on the second CPU for RP2040. +CIRCUITPY_PICODVI ?= 0 +endif + +ifeq ($(CHIP_VARIANT),RP2350) +# This needs to be implemented. +CIRCUITPY_ALARM ?= 0 +# Default PICODVI on because it doesn't require much code in RAM to talk to HSTX. +CIRCUITPY_PICODVI ?= 1 +endif + INTERNAL_LIBM = 1 CIRCUITPY_BUILD_EXTENSIONS ?= uf2