I'm using atom/platformio to compile my code. My program complies without an error for the Teensy 3.2 oder 3.6. Now I switched to set the Teensy 4.0 as my target and get those compile errors:

Code:
include/RotaryEncoder.h:24:42: error: section attribute not allowed for 'TURN_CNT'
const PROGMEM int TURN_CNT         = 4;   // Zahl der Impulse je Schritt

include/RotaryEncoder.h:25:42: error: section attribute not allowed for 'PRELL_PRESSED_MS'
const PROGMEM int PRELL_PRESSED_MS = 500; // Entprellen
 
In file included from src/TeensyDisplay.cpp:4:0:
include/TeensyDisplay.h:25:38: error: section attribute not allowed for 'DEF_FONT'
const PROGMEM int DEF_FONT     = 0;

include/TeensyDisplay.h:26:38: error: section attribute not allowed for 'FONT_HEIGHT'
const PROGMEM int FONT_HEIGHT  = 8;

...

Compiling .pio/build/teensy40/FrameworkArduino/DMAChannel.cpp.o
Compiling .pio/build/teensy40/FrameworkArduino/EventResponder.cpp.o
Compiling .pio/build/teensy40/FrameworkArduino/HardwareSerial.cpp.o
In file included from src/main.cpp:25:0:
include/TeensyDisplay.h:25:38: error: section attribute not allowed for 'DEF_FONT'
const PROGMEM int DEF_FONT     = 0;
Seems to be related to the const attribute but I don't understand the problem - any hint how to fix it would be nice.

Thanks!