From 50739c1843d266a7ff26c26284dfec9d77cf80f5 Mon Sep 17 00:00:00 2001 From: px4dev Date: Wed, 20 Feb 2013 21:25:04 -0800 Subject: platform -> board --- makefiles/board_px4fmu.mk | 10 ++++++++++ makefiles/board_px4io.mk | 10 ++++++++++ makefiles/config_px4fmu_default.mk | 2 +- makefiles/config_px4io_default.mk | 2 +- makefiles/firmware.mk | 32 ++++++++++++++++---------------- makefiles/platform_px4fmu.mk | 10 ---------- makefiles/platform_px4io.mk | 10 ---------- makefiles/setup.mk | 1 + 8 files changed, 39 insertions(+), 38 deletions(-) create mode 100644 makefiles/board_px4fmu.mk create mode 100644 makefiles/board_px4io.mk delete mode 100644 makefiles/platform_px4fmu.mk delete mode 100644 makefiles/platform_px4io.mk (limited to 'makefiles') diff --git a/makefiles/board_px4fmu.mk b/makefiles/board_px4fmu.mk new file mode 100644 index 000000000..959e4ed26 --- /dev/null +++ b/makefiles/board_px4fmu.mk @@ -0,0 +1,10 @@ +# +# Platform-specific definitions for the PX4FMU +# + +# +# Configure the toolchain +# +CONFIG_ARCH = CORTEXM4F + +include $(PX4_MK_DIR)/toolchain_gnu-arm-eabi.mk diff --git a/makefiles/board_px4io.mk b/makefiles/board_px4io.mk new file mode 100644 index 000000000..275014aba --- /dev/null +++ b/makefiles/board_px4io.mk @@ -0,0 +1,10 @@ +# +# Platform-specific definitions for the PX4IO +# + +# +# Configure the toolchain +# +CONFIG_ARCH = CORTEXM3 + +include $(PX4_MK_DIR)/toolchain_gnu-arm-eabi.mk diff --git a/makefiles/config_px4fmu_default.mk b/makefiles/config_px4fmu_default.mk index e0c1aff9d..5a61e9428 100644 --- a/makefiles/config_px4fmu_default.mk +++ b/makefiles/config_px4fmu_default.mk @@ -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 diff --git a/makefiles/config_px4io_default.mk b/makefiles/config_px4io_default.mk index f47e7968b..4361ce3cc 100644 --- a/makefiles/config_px4io_default.mk +++ b/makefiles/config_px4io_default.mk @@ -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 diff --git a/makefiles/firmware.mk b/makefiles/firmware.mk index 574818d64..eade36905 100644 --- a/makefiles/firmware.mk +++ b/makefiles/firmware.mk @@ -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 $< > $@ diff --git a/makefiles/platform_px4fmu.mk b/makefiles/platform_px4fmu.mk deleted file mode 100644 index a9e103cc8..000000000 --- a/makefiles/platform_px4fmu.mk +++ /dev/null @@ -1,10 +0,0 @@ -# -# Platform-specific definitions for the PX4FMU -# - -# -# Configure the toolchain -# -CONFIG_ARCH = CORTEXM4F - -include $(PX4_MK_INCLUDE)/toolchain_gnu-arm-eabi.mk diff --git a/makefiles/platform_px4io.mk b/makefiles/platform_px4io.mk deleted file mode 100644 index 7de24a60b..000000000 --- a/makefiles/platform_px4io.mk +++ /dev/null @@ -1,10 +0,0 @@ -# -# Platform-specific definitions for the PX4IO -# - -# -# Configure the toolchain -# -CONFIG_ARCH = CORTEXM3 - -include $(PX4_MK_INCLUDE)/toolchain_gnu-arm-eabi.mk diff --git a/makefiles/setup.mk b/makefiles/setup.mk index 97893921d..94efd401d 100644 --- a/makefiles/setup.mk +++ b/makefiles/setup.mk @@ -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 -- cgit v1.2.3