Open Donziboy2 opened 6 years ago
that hardware is defined for devices that use it
if your attempting to access hardware not available, obviously you would d get that error. This is not a “bug”, nor should code be bloated to tell users to switch to a different MCU to use hardware that doesn't exist on theirs...
There is some code in the Arduino IDE to detect certain cases and print friendly messages. It can be found in message_advice_Teensy() in Compiler.java.
But as you can see, it's not written to be customized depending on which board is selected. It also looks only for fixed strings in English, which doesn't work when the compiler it localized to another language. Eventually I would like to greatly improve this code, allowing the IDE to parse the compiler messages in any language and to get these messages from a text file that can be customized per platform and per board without editing the Java code.
Sadly, this is a low priority compared to so many other projects.....
If you use SPI1 or SPI2 and compile for a Teensy 3.2/3.1 it gives a generic error .
error: 'SPI1' was not declared in this scope SPI1.begin();
If possible it would be nice to say these functions are only usable in T3.5/T3.6 instead of a generic error message that we get. Took me about 2 hours to figure out why it was throwing errors.