02b812a631
Working Simplelink platform with the following Simplelink SDK's: * CC13x0 SDK * CC13x2 SDK * CC26x2 SDK Is also compatible with Code Composer Studio (XDCTools)
66 lines
2.1 KiB
Makefile
66 lines
2.1 KiB
Makefile
################################################################################
|
|
### SimpleLink MCU platform makefile
|
|
|
|
################################################################################
|
|
# Board and BSP selection
|
|
BOARD_PLATFORMS = launchpad sensortag srf06
|
|
|
|
# Assigned lazily to avoid breaking environments which doesn't have cd and find
|
|
BOARDS = $(foreach BOARD_TYPE, $(BOARD_PLATFORMS), \
|
|
$(shell cd $(FAMILY_PATH); find $(BOARD_TYPE)/* -type d -print))
|
|
|
|
BOARD_EXISTS := $(shell [ -d "$(FAMILY_PATH)/$(BOARD)" ]; echo $$?)
|
|
|
|
ifneq ($(BOARD_EXISTS),0)
|
|
$(error Simplelink Board '$(BOARD)' is not supported for Simplelink Family '$(FAMILY)')
|
|
endif
|
|
|
|
################################################################################
|
|
# Directory and source configurations
|
|
|
|
# Include the board-specific Makefile
|
|
BOARD_PATH := $(FAMILY_PATH)/$(BOARD)
|
|
include $(BOARD_PATH)/Makefile.$(notdir $(BOARD))
|
|
|
|
# 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))
|
|
|
|
DEFINES += DeviceFamily_$(DEVICE_FAMILY)
|
|
DEFINES += $(BOARD_TYPE)
|
|
DEFINES += SUPPORTS_PROP_MODE=$(SUPPORTS_PROP_MODE)
|
|
DEFINES += SUPPORTS_IEEE_MODE=$(SUPPORTS_IEEE_MODE)
|
|
|
|
### If the user-specified a Node ID, pass a define
|
|
ifdef NODEID
|
|
DEFINES += IEEE_ADDR_NODE_ID=$(NODEID)
|
|
endif
|
|
|
|
CONTIKI_TARGET_SOURCEFILES += platform.c
|
|
CONTIKI_TARGET_SOURCEFILES += $(BOARD_SOURCEFILES)
|
|
|
|
CONTIKI_SOURCEFILES += $(CONTIKI_TARGET_SOURCEFILES)
|
|
|
|
# TODO fix for CC26x0
|
|
ifeq ($(DEVICE_FAMILY),CC26X0)
|
|
# Pull in the correct CPU makefile
|
|
CPU_FAMILY = cc26x0
|
|
else
|
|
# Pull in the correct CPU makefile
|
|
CPU_FAMILY = cc13xx-cc26xx
|
|
endif
|
|
|
|
# Define the CPU directory and pull in the correct CPU Makefile
|
|
CONTIKI_CPU := $(realpath $(CONTIKI)/arch/cpu/cc13xx-cc26xx)
|
|
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))"
|