In "circuitpython\ports\raspberrypi\boards\adafruit_feather_rp2040\mpconfigboard.mk":
- Code: Select all | TOGGLE FULL SIZE
USB_VID = 0x239A
USB_PID = 0x80F2
USB_PRODUCT = "Feather RP2040"
USB_MANUFACTURER = "Adafruit"
CHIP_VARIANT = RP2040
CHIP_FAMILY = rp2
EXTERNAL_FLASH_DEVICES = "GD25Q64C"
I want to disable CIRCUITPY_DISPLAYIO = 0
In "circuitpython\ports\raspberrypi\mpconfigport.mk":
- Code: Select all | TOGGLE FULL SIZE
# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk
# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers.
# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h.
ifeq ($(LONGINT_IMPL),NONE)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none
endif
ifeq ($(LONGINT_IMPL),MPZ)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
endif
ifeq ($(LONGINT_IMPL),LONGLONG)
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong
endif
# All raspberrypi ports have longints.
LONGINT_IMPL = MPZ
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
# Things that need to be implemented.
# Use PWM interally
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_NVM = 1
# Use PIO interally
CIRCUITPY_PULSEIO ?= 1
CIRCUITPY_WATCHDOG ?= 1
# Audio via PWM
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_AUDIOBUSIO ?= 1
CIRCUITPY_AUDIOCORE ?= 1
CIRCUITPY_AUDIOPWMIO ?= 1
# These libraries require Cortex M4+ for fancy math instructions.
CIRCUITPY_AUDIOMIXER ?= 0
INTERNAL_LIBM = 1
USB_SERIAL_NUMBER_LENGTH = 16
# Number of USB endpoint pairs.
USB_NUM_EP = 8
INTERNAL_FLASH_FILESYSTEM = 1
Where is ?=1 documented?
The Error: First I build with the default settings, clean build no issues, Then I add CIRCUITPY_DISPLAYIO = 0 to mpconfigboard.mk and when I build I get error: array subscript 0
- Code: Select all | TOGGLE FULL SIZE
kevin@Aorus:~/circuitpython/ports/raspberrypi$ make V=1 clean BOARD=adafruit_feather_rp2040
rm -rf build-adafruit_feather_rp2040
kevin@Aorus:~/circuitpython/ports/raspberrypi$ make -j6 BOARD=adafruit_feather_rp2040
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
{'sku': ['GD25Q64C']}
text data bss dec hex filename
244 0 0 244 f4 build-adafruit_feather_rp2040/boot2.elf
QSTR updated
628936 bytes used, 415544 bytes free in flash firmware space out of 1044480 bytes (1020.0kB).
13928 bytes used, 248216 bytes free in ram for stack and heap out of 262144 bytes (256.0kB).
Converting to uf2, output size: 1253888, start address: 0x10000000
Wrote 1253888 bytes to build-adafruit_feather_rp2040/firmware.uf2
kevin@Aorus:~/circuitpython/ports/raspberrypi$ make V=1 clean BOARD=adafruit_feather_rp2040
rm -rf build-adafruit_feather_rp2040
kevin@Aorus:~/circuitpython/ports/raspberrypi$ make -j6 BOARD=adafruit_feather_rp2040
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
{'sku': ['GD25Q64C']}
text data bss dec hex filename
244 0 0 244 f4 build-adafruit_feather_rp2040/boot2.elf
QSTR updated
../../shared-module/framebufferio/FramebufferDisplay.c: In function 'common_hal_framebufferio_framebufferdisplay_construct':
../../shared-module/framebufferio/FramebufferDisplay.c:283:17: error: array subscript 0 is outside array bounds of 'primary_display_t[0]' [-Werror=array-bounds]
283 | if (self == &displays[0].framebuffer_display) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../shared-module/framebufferio/FramebufferDisplay.c:34:
../../shared-module/displayio/__init__.h:69:26: note: while referencing 'displays'
69 | extern primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT];
| ^~~~~~~~
../../shared-module/framebufferio/FramebufferDisplay.c: In function 'common_hal_framebufferio_framebufferdisplay_set_rotation':
../../shared-module/framebufferio/FramebufferDisplay.c:283:17: error: array subscript 0 is outside array bounds of 'primary_display_t[0]' [-Werror=array-bounds]
283 | if (self == &displays[0].framebuffer_display) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../shared-module/framebufferio/FramebufferDisplay.c:34:
../../shared-module/displayio/__init__.h:69:26: note: while referencing 'displays'
69 | extern primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT];
| ^~~~~~~~
cc1: all warnings being treated as errors
make: *** [../../py/mkrules.mk:55: build-adafruit_feather_rp2040/shared-module/framebufferio/FramebufferDisplay.o] Error 1
make: *** Waiting for unfinished jobs....
kevin@Aorus:~/circuitpython/ports/raspberrypi$
If I add CIRCUITPY_FRAMEBUFFER = 0 to mpconfigboard.mk I lose the framebuffer error and get:
- Code: Select all | TOGGLE FULL SIZE
kevin@Aorus:~/circuitpython/ports/raspberrypi$ make -j16 BOARD=adafruit_feather_rp2040
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
{'sku': ['GD25Q64C']}
text data bss dec hex filename
244 0 0 244 f4 build-adafruit_feather_rp2040/boot2.elf
QSTR updated
/home/kevin/gcc-arm-none-eabi-10-2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: build-adafruit_feather_rp2040/shared-bindings/rgbmatrix/RGBMatrix.o: in function `rgbmatrix_rgbmatrix_make_new':
RGBMatrix.c:(.text.rgbmatrix_rgbmatrix_make_new+0x2c): undefined reference to `allocate_display_bus_or_raise'
collect2: error: ld returned 1 exit status
make: *** [Makefile:286: build-adafruit_feather_rp2040/firmware.elf] Error 1
And finally I add CIRCUITPY_RGBMATRIX = 0 to mpconfigboard.mk and get a clean build!
I take it there is no dependency checking during build?
A database a a couple thousand lines of code should fix this.
This is now fixed with the inclusion of additional mpconfigboard statements I'll post an issue requesting documentation on the dependencies of modules