From 08d045e2f5ef70ccfbb41b2024fe567b13a031b3 Mon Sep 17 00:00:00 2001 From: Robert Wessels Date: Fri, 24 Jul 2015 11:31:54 -0700 Subject: [PATCH] Fix for issue #682 -DARDUINO= and -DENERGIA= version defines --- app/src/processing/app/debug/Compiler.java | 2 ++ hardware/common/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index 4d166df05b2..448504e2b05 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -124,6 +124,8 @@ public boolean compile(Sketch sketch, fw.write("BOARD ?=" + boardPreferences.get("build.hardware") +"\n"); fw.write("PLATFORM ?=" + Preferences.get("target") + "\n"); fw.write("BUILD_DRVLIB ?= " + Preferences.getBoolean("build.drvlib") + "\n"); + fw.write("ENERGIA_VERSION ?=" + Base.EREVISION + "\n"); + fw.write("ARDUINO_VERSION ?=" + Base.REVISION + "\n"); // Add all Sketch tabs that match the extension list to EXTRA_SOURCES List allowedExtensions = Arrays.asList("c", "cpp", "S"); diff --git a/hardware/common/Makefile b/hardware/common/Makefile index 6a7338775d9..093a4595b40 100644 --- a/hardware/common/Makefile +++ b/hardware/common/Makefile @@ -107,7 +107,7 @@ CFLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir)) include $(APPLICATION_PATH)/hardware/$(PLATFORM)/Plat.mk -CFLAGS += -ffunction-sections -fdata-sections -DARDUINO=101 -DBOARD_$(BOARD) -DENERGIA=14 $(MCU_FLAG) $(VFP) +CFLAGS += -ffunction-sections -fdata-sections -DARDUINO=$(ENERGIA_VERSION) -DBOARD_$(BOARD) -DENERGIA=$(ENERGIA_VERSION) $(MCU_FLAG) $(VFP) CPPFLAGS += -fno-exceptions -fno-rtti # define TI-RTOS and Energia wiring headers based on CLOSURE above