Go Down

Topic: Sketch compatability with new IDE or MCU versions (Read 1 time) previous topic - next topic


Aug 05, 2010, 04:49 pm Last Edit: Aug 05, 2010, 04:52 pm by Andrew Reason: 1
This cropped up over in another thread (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1280914282/10#10). An unknown amount of the code in the Playground (and elsewhere) no longer works with the latest version of the IDE/libraries, or with later versions of the mcu (e.g. 328 registers versus 168). Would it help to have some kind of record inside the sketch of which IDE version and mcu it was written for, say in the form of #defines or #pragma statements? It wouldn't stop code rot, but the IDE could flag it up as a potential problem.

For instance you could have something like this in the sketch:

Code: [Select]
#define ARDUINO_CPU atmega328
#define ARDUINO_IDE 0.19

which the IDE would recognise and act on. Obviously it would be human readable as well.


EDIT: Oops, I think this has come up before (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1266076921)  :-[


well that would be adding something that does not exist now, I have a good feeling the consensus around the community is that 1.0 should have nothing changed from the way it is now

so while this is a good idea, and you have my support behind it, dont get too excited

Go Up