I am trying to compile the MultipleTextLayers example from the SmartMatrix library for a Teensy 4.1. I use PIO Core 6.2.0 and PIO Home 3.4.4. When building, I get the following error.
My platformio.ini looks like this:
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy41.html
PLATFORM: Teensy (5.2.0) > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
- framework-arduinoteensy @ 1.162.0 (1.62)
- tool-teensy @ 1.162.0 (1.62)
- toolchain-gccarmnoneeabi-teensy @ 1.150201.0 (15.2.1)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 93 compatible libraries
Scanning dependencies...
Dependency Graph
|-- SmartMatrix @ 4.0.3+sha.af288cb (License: Unknown, URI: git+https://github.com/pixelmatix/SmartMatrix, Path: /home/oni/Code/SmartMatrixTest/.pio/libdeps/teensy41/SmartMatrix)
| |-- SPI @ 1.0 (License: Unknown, Path: /home/oni/.platformio/packages/framework-arduinoteensy/libraries/SPI)
Building in release mode
arm-none-eabi-g++ -o .pio/build/teensy41/src/main.cpp.o -c -fno-exceptions -felide-constructors -fno-rtti -std=gnu++17 -Wno-error=narrowing -fpermissive -Wno-psabi -Wno-maybe-uninitialized -fno-threadsafe-statics -Wall -ffunction-sections -fdata-sections -mthumb -mcpu=cortex-m7 -nostdlib -mfloat-abi=hard -mfpu=fpv5-d16 -O2 -DPLATFORMIO=60200 -D__IMXRT1062__ -DARDUINO_TEENSY41 -DUSB_SERIAL -DARDUINO=10805 -DTEENSYDUINO=162 -DCORE_TEENSY -DF_CPU=600000000 -DLAYOUT_US_ENGLISH -Iinclude -Isrc -I.pio/libdeps/teensy41/SmartMatrix/src -I/home/oni/.platformio/packages/framework-arduinoteensy/libraries/SPI -I/home/oni/.platformio/packages/framework-arduinoteensy/cores/teensy4 src/main.cpp
In file included from src/main.cpp:20:
.pio/libdeps/teensy41/SmartMatrix/src/MatrixHardware_Teensy4_ShieldV5.h:41:17: note: '#pragma message: MatrixHardware: SmartLED Shield for Teensy 4 (V5)'
41 | #pragma message "MatrixHardware: SmartLED Shield for Teensy 4 (V5)"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/main.cpp:25:
.pio/libdeps/teensy41/SmartMatrix/src/SmartMatrix.h:40:21: note: '#pragma message: SmartMatrix Library version 4.000.003'
40 | # pragma message "SmartMatrix Library version 4.000.003"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/teensy41/SmartMatrix/src/SmartMatrix.h:222:
.pio/libdeps/teensy41/SmartMatrix/src/MatrixTeensy4Hub75Refresh_Impl.h: In instantiation of 'SmartMatrixRefreshT4<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::SmartMatrixRefreshT4(uint8_t, volatile rowDataStruct*) [with int refreshDepth = 36; int matrixWidth = 32; int matrixHeight = 32; unsigned char panelType = 0; long unsigned int optionFlags = 0; uint8_t = unsigned char]':
src/main.cpp:35:1: required from here
119 | SmartMatrixRefreshT4<pwm_depth, width, height, panel_type, option_flags> matrix_name##Refresh(buffer_rows, rowsDataBuffer); \
| ^
.pio/libdeps/teensy41/SmartMatrix/src/MatrixTeensy4Hub75Refresh_Impl.h:110:10: error: section of alias 'SmartMatrixRefreshT4<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::SmartMatrixRefreshT4(uint8_t, volatile rowDataStruct*) [with int refreshDepth = 36; int matrixWidth = 32; int matrixHeight = 32; unsigned char panelType = 0; long unsigned int optionFlags = 0; uint8_t = unsigned char]' must match section of its target
110 | FLASHMEM SmartMatrixRefreshT4<refreshDepth, matrixWidth, matrixHeight, panelType, optionFlags>::SmartMatrixRefreshT4(uint8_t bufferrows, volatile rowDataStruct * rowDataBuf) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*** [.pio/build/teensy41/src/main.cpp.o] Error 1
My platformio.ini looks like this:
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
lib_deps =
https://github.com/pixelmatix/SmartMatrix