sumotoy / RA8875

A library for RAiO RA8875 display driver for Teensy3.x or LC/Arduino's/Energia/Spark
GNU General Public License v3.0
79 stars 54 forks source link

Issue using preprocessor placeholder with some compiler. #104

Open sumotoy opened 8 years ago

sumotoy commented 8 years ago

This need some kind of workaround. Some compiler (an Apple one and SPARK offline, not the online one) load all preprocessor assignement not in order (grr!), as result the placeholders are not allowed. For instance, fonts uses _PRGMTAG placeholder that it's converted in 'null' or 'PROGMEM' in relation to the processor used, this happen because files should be loaded in order as I decided in library. Sadly, some compiler will not load files in order (as I decided with includes) and as result they trigger an error when there's a preprocessor placeholder (like PRGMTAG_). I wonder if I can use something like: #pragma startup progtagAssignFuncion and `void __attribute((constructor)) progtagAssignFuncion();` depends on compiler, this should force compiler to load function BEFORE main. I would like to know some opinion about that...

jenschr commented 7 years ago

This is causing problems for me as well. Any odds of implementing it soon? Or at least a pointer as to how to work around?