From 7f5dda293fe4d1e525d670eeb33d9d73aafed04d Mon Sep 17 00:00:00 2001 From: Vladimir Smitka Date: Fri, 11 Sep 2026 18:32:23 +0000 Subject: [PATCH] pimoroni_picosystem: enable picogame The board has the 240x240 ST7789 over four-wire SPI that picogame's fast display path drives, plus the buttons and audio a game needs. It does not fit at -O3: the firmware is at 95.3% of the 1020 KB partition and the engine needs another 50 KB. At -O2 with the loop passes it keeps 140 KB free, within 1% of -O3 on this M0+. --- .../raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk index 8dca786a5e0..28a3c6a641a 100644 --- a/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_picosystem/mpconfigboard.mk @@ -12,7 +12,13 @@ CIRCUITPY__EVE = 1 CIRCUITPY_KEYPAD = 1 CIRCUITPY_STAGE = 1 +CIRCUITPY_PICOGAME = 1 +CIRCUITPY_PICOGAME_FAST_DISPLAY = 1 CIRCUITPY_AUDIOIO = 1 FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/picosystem + +# The default is -O3. picogame does not fit at -O3; these loop passes keep the render +# kernels within 1% of it. +OPTIMIZATION_FLAGS = -O2 -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-partial-pre -fsplit-paths