compiler.cpp.extra_flags not working

jerome

Member
Hello,

As I explained in my second message in that thread:
https://forum.pjrc.com/threads/5393...quot-compiler-cpp-extra_flags-DMY_FLAG-1-quot

hardware/teensy/avr/platform.txt doesn't use compiler.cpp.extra_flags. Would it be possible to add compiler.cpp.extra_flags in platform.txt?

I'm not very familiar with teensy. I'm not sure if it is opensource on the software part. And if it is, I'm not sure where it is. If it is open source, I would be more than happy to suggest a patch to solve that problem.

compiler.cpp.extra_flags is useful to compile my project using the command line (arduino-builder) and set a flag value on the fly that can be used while compiling my project (using macros).

Thanks,
 
The Teensyduino core files are definitively open source as you can see in almost every single source file. They are in a public repository on github, so you might fork it, create a patch, and issue a pull request. But you have to understand that an estimated 99% of Teensy users does not invoke the arduino-builder manually and might thus not be interested in your idea, especially since a simple single #define on top of the .ino file can lead basically to a similar result.
 
I understand that not a lot of people use that feature. But since it works with other arduino hardware, and it is a feature supported by Arduino IDE, it would be nice to have it on teensy too (at least I would be happy :) ).
And since it is not a high demand, that's why I would be happy to suggest a patch.

I've seen https://github.com/PaulStoffregen. But I found 213 repositories... I'm a bit lost there.

In which repository can I fix hardware/teensy/avr/platform.txt ?

Thanks for the fast answer!
 
The boards.txt and platform.txt files aren't on github. That's not because they're meant to be closed source. The reason has to do with the special build scripts (which are closed source) I use for creating the installers. Those files need to be customized for the different supported Arduino versions, so there isn't one definitive copy to have on the github repository.

Regarding this:

Would it be possible to add compiler.cpp.extra_flags in platform.txt?

Certainly you can edit the copy of boards.txt on your machine. If using a Mac, control-click Arduino and "Show Package Contents" to access the files inside the application bundle. On Linux and Windows the Arduino software is ordinary directories.

Whether I'll change platform.txt for Teensyduino 1.45 remains to be seen. Right now, I'm leaning towards "probably not". But if a really compelling use case is made here, I might consider it....
 
Thanks for the suggestion, but I came here to avoid exactly that solution. I don't want to patch that file every time I would like to update a version.

Thanks for your answer. I guess I have to move on.
 
Back
Top