Make sure CONTIKI_BOARD_xyz is defined
@@ -46,11 +46,6 @@ UPPERCASE = _ABCDEFGHIJKLMNOPQRSTUVWXYZ_
TARGET_UPPERCASE := ${strip ${shell echo $(TARGET) | sed y!$(LOWERCASE)!$(UPPERCASE)!}}
CFLAGS += -DCONTIKI=1 -DCONTIKI_TARGET_$(TARGET_UPPERCASE)=1
CFLAGS += -DCONTIKI_TARGET_STRING=\"$(TARGET)\"
-ifneq ($(BOARD),)
-TARGET_BOARD_UPPERCASE := ${strip ${shell echo $(BOARD) | sed y!$(LOWERCASE)!$(UPPERCASE)!}}
-CFLAGS += -DCONTIKI_BOARD_$(TARGET_BOARD_UPPERCASE)=1
-CFLAGS += -DCONTIKI_BOARD_STRING=\"$(BOARD)\"
-endif
CFLAGS += -Wno-unused-const-variable
@@ -129,6 +124,12 @@ endif # $(BOARD) not empty
PLATFORM_ACTION ?= build
+ifneq ($(BOARD),)
+ TARGET_BOARD_UPPERCASE := ${strip ${shell echo $(BOARD) | sed y!$(LOWERCASE)!$(UPPERCASE)!}}
+ CFLAGS += -DCONTIKI_BOARD_$(TARGET_BOARD_UPPERCASE)=1
+ CFLAGS += -DCONTIKI_BOARD_STRING=\"$(BOARD)\"
+endif
+
# Configure MAC layer
# The different options
