Go Down

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

Andrew

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.

Andrew

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

Osgeld

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
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

Go Up