MichaelMeissner
Senior Member+
macros are used for testing compile-time variables, you're trying to use run-time variable with compile-time statements
#define X 2
#if X > 1
....
To amplify what manitou said, you cannot use this in a pre-processor statement. It is a run-time variable that is set by the startup code to the size of the psram chips that are soldered on the board. The Teensy startup code basically sends commands to the first memory, saying are you a psram chip, and if so, what size are you? If it is a psram chip, it will also query the second pad, and if you have two psram chips soldered on (instead of a psram and a flash chip), the variable will include both chips, and use them automatically.
So, you need to write your code that for the Teensy 4.1, add the possibility of psram chips, but you can't depend on knowing whether they are soldered in at compile.time.