platform -> board

This commit is contained in:
px4dev
2013-02-23 22:00:59 -08:00
parent abe48bd714
commit 50739c1843
7 changed files with 40 additions and 35 deletions
@@ -7,4 +7,4 @@
#
CONFIG_ARCH = CORTEXM4F
include $(PX4_MK_INCLUDE)/toolchain_gnu-arm-eabi.mk
include $(PX4_MK_DIR)/toolchain_gnu-arm-eabi.mk
@@ -7,4 +7,4 @@
#
CONFIG_ARCH = CORTEXM3
include $(PX4_MK_INCLUDE)/toolchain_gnu-arm-eabi.mk
include $(PX4_MK_DIR)/toolchain_gnu-arm-eabi.mk
+1 -1
View File
@@ -6,4 +6,4 @@ CONFIG = px4fmu_default
SRCS = $(PX4_BASE)/platforms/empty.c
ROMFS_ROOT = $(PX4_BASE)/ROMFS/$(CONFIG)
include $(PX4_BASE)/makefiles/firmware.mk
include $(PX4_MK_DIR)/firmware.mk
+1 -1
View File
@@ -5,4 +5,4 @@
CONFIG = px4io_default
SRCS = $(PX4_BASE)/platforms/empty.c
include $(PX4_BASE)/makefiles/firmware.mk
include $(PX4_MK_DIR)/firmware.mk
+16 -16
View File
@@ -6,8 +6,8 @@
#
# Requires:
#
# PLATFORM
# Must be set to a platform name known to the PX4 distribution (as
# BOARD
# Must be set to a board name known to the PX4 distribution (as
# we need a corresponding NuttX export archive to link with).
#
# Optional:
@@ -41,16 +41,16 @@
# If PX4_BASE wasn't set previously, work out what it should be
# and set it here now.
#
export PX4_MK_INCLUDE ?= $(dir $(lastword $(MAKEFILE_LIST)))
export MK_DIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
ifeq ($(PX4_BASE),)
export PX4_BASE := $(abspath $(PX4_MK_INCLUDE)/..)
export PX4_BASE := $(abspath $(MK_DIR)/..)
$(info %% set PX4_BASE to $(PX4_BASE))
endif
#
# Get path and tool config
#
include $(PX4_MK_INCLUDE)/setup.mk
include $(MK_DIR)/setup.mk
#
# If WORK_DIR is not set, create a 'build' directory next to the
@@ -63,18 +63,18 @@ endif
$(info %% WORK_DIR $(WORK_DIR))
#
# Sanity-check the PLATFORM variable and then get the platform config.
# If PLATFORM is not set, but CONFIG is, use that.
# Sanity-check the BOARD variable and then get the board config.
# If BOARD is not set, but CONFIG is, use that.
#
# The platform config in turn will fetch the toolchain configuration.
# The board config in turn will fetch the toolchain configuration.
#
ifeq ($(PLATFORM),)
ifeq ($(BOARD),)
ifeq ($(CONFIG),)
$(error At least one of the PLATFORM or CONFIG variables must be set before including firmware.mk)
$(error At least one of the BOARD or CONFIG variables must be set before including firmware.mk)
endif
PLATFORM := $(firstword $(subst _, ,$(CONFIG)))
BOARD := $(firstword $(subst _, ,$(CONFIG)))
endif
include $(PX4_MK_INCLUDE)/platform_$(PLATFORM).mk
include $(PX4_MK_DIR)/board_$(BOARD).mk
#
# Things that, if they change, might affect everything
@@ -86,11 +86,11 @@ GLOBAL_DEPS += $(MAKEFILE_LIST)
################################################################################
#
# Check that the NuttX archive for the selected platform is available.
# Check that the NuttX archive for the selected board is available.
#
NUTTX_ARCHIVE := $(wildcard $(ARCHIVE_DIR)/$(PLATFORM).export)
NUTTX_ARCHIVE := $(wildcard $(ARCHIVE_DIR)/$(BOARD).export)
ifeq ($(NUTTX_ARCHIVE),)
$(error The NuttX export archive for $(PLATFORM) is missing from $(ARCHIVE_DIR) - try 'make archives' in $(PX4_BASE))
$(error The NuttX export archive for $(BOARD) is missing from $(ARCHIVE_DIR) - try 'make archives' in $(PX4_BASE))
endif
#
@@ -244,7 +244,7 @@ $(filter %.S.o,$(OBJS)): $(WORK_DIR)/%.S.o: %.S $(GLOBAL_DEPS)
$(PRODUCT_BUNDLE): $(PRODUCT_BIN)
@echo %% Generating $@
$(Q) $(MKFW) --prototype $(IMAGE_DIR)/$(PLATFORM).prototype \
$(Q) $(MKFW) --prototype $(IMAGE_DIR)/$(BOARD).prototype \
--git_identity $(PX4_BASE) \
--image $< > $@
+1
View File
@@ -7,6 +7,7 @@
#
export PX4_APP_SRC = $(PX4_BASE)/src/apps
export PX4_LIB_SRC = $(PX4_BASE)/src/libs
export PX4_MK_DIR = $(PX4_BASE)/makefiles
export NUTTX_SRC = $(PX4_BASE)/nuttx
export NUTTX_APP_SRC = $(PX4_BASE)/apps
export MAVLINK_SRC = $(PX4_BASE)/mavlink