mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-27 21:54:30 +01:00
Passing the ARDUINO constant from the IDE to avr-gcc as a command line argument (so I don't forget to update the version in the .h file).
This commit is contained in:
parent
de28fadf49
commit
6a15e01ff8
@ -40,7 +40,7 @@ import processing.core.*;
|
|||||||
* files and images, etc) that comes from that.
|
* files and images, etc) that comes from that.
|
||||||
*/
|
*/
|
||||||
public class Base {
|
public class Base {
|
||||||
static final int REVISION = 18;
|
public static final int REVISION = 18;
|
||||||
static String VERSION_NAME = "0018";
|
static String VERSION_NAME = "0018";
|
||||||
|
|
||||||
static HashMap<Integer, String> platformNames = new HashMap<Integer, String>();
|
static HashMap<Integer, String> platformNames = new HashMap<Integer, String>();
|
||||||
|
@ -452,6 +452,7 @@ public class Compiler implements MessageConsumer {
|
|||||||
"-assembler-with-cpp",
|
"-assembler-with-cpp",
|
||||||
"-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"),
|
"-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"),
|
||||||
"-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"),
|
"-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"),
|
||||||
|
"-DARDUINO=" + Base.REVISION,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
for (int i = 0; i < includePaths.size(); i++) {
|
for (int i = 0; i < includePaths.size(); i++) {
|
||||||
@ -478,6 +479,7 @@ public class Compiler implements MessageConsumer {
|
|||||||
"-fdata-sections",
|
"-fdata-sections",
|
||||||
"-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"),
|
"-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"),
|
||||||
"-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"),
|
"-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"),
|
||||||
|
"-DARDUINO=" + Base.REVISION,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
for (int i = 0; i < includePaths.size(); i++) {
|
for (int i = 0; i < includePaths.size(); i++) {
|
||||||
@ -505,6 +507,7 @@ public class Compiler implements MessageConsumer {
|
|||||||
"-fdata-sections",
|
"-fdata-sections",
|
||||||
"-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"),
|
"-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"),
|
||||||
"-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"),
|
"-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"),
|
||||||
|
"-DARDUINO=" + Base.REVISION,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
for (int i = 0; i < includePaths.size(); i++) {
|
for (int i = 0; i < includePaths.size(); i++) {
|
||||||
|
@ -32,10 +32,6 @@
|
|||||||
extern "C"{
|
extern "C"{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ARDUINO
|
|
||||||
#define ARDUINO 18
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HIGH 0x1
|
#define HIGH 0x1
|
||||||
#define LOW 0x0
|
#define LOW 0x0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user