Pages: [1]   Go Down
Author Topic: Sketch compatability with new IDE or MCU versions  (Read 937 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Sr. Member
****
Karma: 1
Posts: 491
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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)  :-[
« Last Edit: August 05, 2010, 09:52:16 am by Andrew » Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged


Pages: [1]   Go Up
Jump to: