Fix compilation on AVR

This commit is contained in:
Jeremy Soller 2020-02-18 15:35:41 -07:00
parent ff9f3fe710
commit f7453df299
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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];