2018-05-28 11:17:01 +00:00
|
|
|
################################################################################
|
|
|
|
### SimpleLink MCU platform makefile
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Board and BSP selection
|
|
|
|
BOARD_PLATFORMS = launchpad sensortag srf06
|
|
|
|
|
2018-07-25 08:21:54 +00:00
|
|
|
# All supported boards for this SimpleLink family
|
2018-08-30 15:09:25 +00:00
|
|
|
BOARDS = $(foreach BOARD, $(BOARD_PLATFORMS), \
|
2018-07-25 13:05:08 +00:00
|
|
|
$(shell cd $(FAMILY_PATH); find $(BOARD)/* -type d -print))
|
2018-05-28 11:17:01 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Directory and source configurations
|
|
|
|
|
|
|
|
# Include the board-specific Makefile
|
|
|
|
BOARD_PATH := $(FAMILY_PATH)/$(BOARD)
|
|
|
|
include $(BOARD_PATH)/Makefile.$(notdir $(BOARD))
|
|
|
|
|
2018-05-30 10:21:54 +00:00
|
|
|
DEVICE_FAMILY_LC := $(shell echo "$(DEVICE_FAMILY)" | tr A-Z a-z)
|
|
|
|
|
2018-05-28 11:17:01 +00:00
|
|
|
# Add to the source dirs
|
|
|
|
TARGET_FAMILY_DIRS += common
|
|
|
|
TARGET_FAMILY_DIRS += $(BOARD)
|
|
|
|
|
|
|
|
CONTIKI_TARGET_DIRS += $(FAMILY)
|
|
|
|
CONTIKI_TARGET_DIRS += $(addprefix $(FAMILY)/, $(TARGET_FAMILY_DIRS))
|
|
|
|
|
2018-09-11 11:17:21 +00:00
|
|
|
BOARD_DEFINES += DeviceFamily_$(DEVICE_FAMILY)
|
|
|
|
BOARD_DEFINES += DEVICE_LINE_$(DEVICE_LINE)
|
|
|
|
BOARD_DEFINES += DEVICE_$(DEVICE)
|
|
|
|
BOARD_DEFINES += $(BOARD_TYPE)
|
|
|
|
BOARD_DEFINES += SUPPORTS_PROP_MODE=$(SUPPORTS_PROP_MODE)
|
|
|
|
BOARD_DEFINES += SUPPORTS_IEEE_MODE=$(SUPPORTS_IEEE_MODE)
|
|
|
|
BOARD_DEFINES += SUPPORTS_BLE_BEACON=$(SUPPORTS_BLE_BEACON)
|
|
|
|
BOARD_DEFINES += SUPPORTS_HIGH_PA=$(SUPPORTS_HIGH_PA)
|
2018-05-28 11:17:01 +00:00
|
|
|
|
2018-08-30 15:09:25 +00:00
|
|
|
# If the user-specified a Node ID, pass a define
|
2018-05-28 11:17:01 +00:00
|
|
|
ifdef NODEID
|
2018-09-11 11:17:21 +00:00
|
|
|
BOARD_DEFINES += IEEE_ADDR_NODE_ID=$(NODEID)
|
2018-05-28 11:17:01 +00:00
|
|
|
endif
|
|
|
|
|
2018-09-11 11:17:21 +00:00
|
|
|
CFLAGS += $(addprefix -D, $(BOARD_DEFINES))
|
|
|
|
|
2018-05-28 11:17:01 +00:00
|
|
|
CONTIKI_TARGET_SOURCEFILES += platform.c
|
2018-07-19 14:44:39 +00:00
|
|
|
CONTIKI_TARGET_SOURCEFILES += batmon-sensor.c
|
2018-05-28 11:17:01 +00:00
|
|
|
CONTIKI_TARGET_SOURCEFILES += $(BOARD_SOURCEFILES)
|
|
|
|
|
|
|
|
CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
|
|
|
|
2018-05-30 10:21:54 +00:00
|
|
|
# Pull in the correct CPU makefile
|
|
|
|
CPU_FAMILY = cc13xx-cc26xx
|
2018-05-28 11:17:01 +00:00
|
|
|
|
|
|
|
# Define the CPU directory and pull in the correct CPU Makefile
|
2018-11-23 09:35:41 +00:00
|
|
|
CONTIKI_CPU := $(realpath $(ARCH_PATH)/cpu/simplelink-$(CPU_FAMILY))
|
2018-05-28 11:17:01 +00:00
|
|
|
include $(CONTIKI_CPU)/Makefile.$(CPU_FAMILY)
|
|
|
|
|
|
|
|
MODULES += os/net os/net/mac os/net/mac/framer
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Display all supported Boards for the given SimpleLink Family
|
|
|
|
simplelink_boards:
|
|
|
|
@echo "$(BOARDS) (current: $(BOARD))"
|