Is it OK to add this to my boards.txt file?
teensy31.build.option5=-DF_CPU=96000000;USB_SERIAL;LAYOUT_US_ENGLISH
The stock file has teensy31.build.option4 as the last.
I did the above, then restarted my IDE (VisualMicro/Studio6) and it read in boards.txt. Then I removed the IDE project properties definition with the same info. Now compiled OK.
I believe this eliminates me having to put -DF_CPU in each project's properties. This is a PITA with source code I have that often targets Teensy2/AVR and Teensy 3 by just changing the target MCU in the IDE and recompiling.
I ask, because I don't know how boards.txt is parsed and if teensy31.build.option5= would be unexpected by the IDE.
I'd also add, for Teensy 3.0
teensy3.build.option5=-DF_CPU=96000000;USB_SERIAL;LAYOUT_US_ENGLISH
teensy31.build.option5=-DF_CPU=96000000;USB_SERIAL;LAYOUT_US_ENGLISH
The stock file has teensy31.build.option4 as the last.
I did the above, then restarted my IDE (VisualMicro/Studio6) and it read in boards.txt. Then I removed the IDE project properties definition with the same info. Now compiled OK.
I believe this eliminates me having to put -DF_CPU in each project's properties. This is a PITA with source code I have that often targets Teensy2/AVR and Teensy 3 by just changing the target MCU in the IDE and recompiling.
I ask, because I don't know how boards.txt is parsed and if teensy31.build.option5= would be unexpected by the IDE.
I'd also add, for Teensy 3.0
teensy3.build.option5=-DF_CPU=96000000;USB_SERIAL;LAYOUT_US_ENGLISH
Last edited: