Fix handling of board config files. Treat CONFIG_BOARD like CONFIG_ARCH in the toolchain configuration.

This commit is contained in:
px4dev
2013-08-13 00:34:11 -07:00
parent b6676f6cb8
commit 56d355414c
3 changed files with 10 additions and 5 deletions
+1 -4
View File
@@ -153,11 +153,8 @@ ifeq ($(BOARD_FILE),)
$(error Config $(CONFIG) references board $(BOARD), but no board definition file found)
endif
export BOARD
export BOARD_FILE
include $(BOARD_FILE)
ifeq ($(CONFIG_BOARD),)
$(error Board config for $(BOARD) does not define CONFIG_BOARD)
endif
EXTRADEFINES += -DCONFIG_ARCH_BOARD_$(CONFIG_BOARD)
$(info % BOARD = $(BOARD))
#
+2 -1
View File
@@ -98,6 +98,7 @@
#
# CONFIG
# BOARD
# BOARD_FILE
# MODULE_WORK_DIR
# MODULE_OBJ
# MODULE_MK
@@ -117,7 +118,7 @@ $(info %% MODULE_MK = $(MODULE_MK))
#
# Get the board/toolchain config
#
include $(PX4_MK_DIR)/board_$(BOARD).mk
include $(BOARD_FILE)
#
# Get the module's config
+7
View File
@@ -85,6 +85,13 @@ ifeq ($(ARCHCPUFLAGS),)
$(error Must set CONFIG_ARCH to one of CORTEXM4F, CORTEXM4 or CORTEXM3)
endif
# Set the board flags
#
ifeq ($(CONFIG_BOARD),)
$(error Board config does not define CONFIG_BOARD)
endif
ARCHDEFINES += -DCONFIG_ARCH_BOARD_$(CONFIG_BOARD)
# optimisation flags
#
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \