diff --git a/Makefile b/Makefile
index 844d6e4..b28e31d 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ clean:
 COMMON_DIR=src/common
 SRC=$(wildcard $(COMMON_DIR)/*.c)
 INCLUDE=$(wildcard $(COMMON_DIR)/include/common/*.h) $(COMMON_DIR)/common.mk
-CFLAGS=-I$(COMMON_DIR)/include -D__VERSION__=$(VERSION)
+CFLAGS=-I$(COMMON_DIR)/include -D__FIRMWARE_VERSION__=$(VERSION)
 include $(COMMON_DIR)/common.mk
 
 # Include the board's source
diff --git a/src/common/version.c b/src/common/version.c
index 04fb0f4..1eaae41 100644
--- a/src/common/version.c
+++ b/src/common/version.c
@@ -1,12 +1,17 @@
 #include <common/macro.h>
 
+// Prevent failures to compile on AVR
+#ifndef __SDCC
+    #define __code
+#endif
+
 static const char __code BOARD[] =
     "76EC_BOARD="
     xstr(__BOARD__);
 
 static const char __code VERSION[] =
     "76EC_VERSION="
-    xstr(__VERSION__);
+    xstr(__FIRMWARE_VERSION__);
 
 const char * board() {
     return &BOARD[11];