mongoose/examples/CC3200/Makefile.build
Deomid Ryabkov 4f9627c612 CC3200 FS refactoring and basic Mongoose example
Moved filesystem-related code out of SJS and into common.
Made it possible to have one, both or no filesystems enabled.
FailFS is now SimpleLinkFS, SLFS (ahem).

Example just serves a "Hello, world!" index page for now.

PUBLISHED_FROM=0e98ee4b8d95782c10791522c42eae5a7ba314f9
2016-03-21 22:45:53 +00:00

133 lines
4.2 KiB
Makefile

# -*- mode: makefile -*-
# This file is executed inside Docker build container.
# It can be used without container too if SDK_PATH and V7_PATH are configured.
PLATFORM = CC3200
SDK_PATH ?= /cc3200-sdk
REPO_PATH ?= ../../..
COMMON_PATH ?= $(REPO_PATH)/common
BUILD_DIR ?= ./build
FW_DIR ?= ./out
SLFS_PATH ?= ./slfs
BINDIR = ${FW_DIR}
OBJDIR = ${BUILD_DIR}
include ${SDK_PATH}/tools/gcc_scripts/makedefs
.PHONY: all clean flash
PROG = cc3200_example
IPATH = . ../.. \
$(REPO_PATH) \
${SDK_PATH} \
${SDK_PATH}/inc \
${SDK_PATH}/driverlib \
${SDK_PATH}/oslib \
${SDK_PATH}/simplelink \
${SDK_PATH}/simplelink/include \
${SDK_PATH}/third_party/FreeRTOS/source \
${SDK_PATH}/third_party/FreeRTOS/source/include \
${SDK_PATH}/third_party/FreeRTOS/source/portable/GCC/ARM_CM4
VPATH = ../.. ${SDK_PATH}/driverlib \
${SDK_PATH}/example/common \
${SDK_PATH}/oslib \
${SDK_PATH}/simplelink \
${SDK_PATH}/simplelink/source \
${SDK_PATH}/third_party/FreeRTOS/source \
${SDK_PATH}/third_party/FreeRTOS/source/portable/GCC/ARM_CM4 \
${SDK_PATH}/third_party/FreeRTOS/source/portable/MemMang \
${COMMON_PATH}/platforms/cc3200 \
MONGOOSE_FEATURES = \
-DMG_CC3200 \
-DMG_DISABLE_DIRECTORY_LISTING \
-DMG_DISABLE_JSON_RPC \
-DMG_DISABLE_COAP \
-DMG_DISABLE_SYNC_RESOLVER \
-DMG_DISABLE_SOCKETPAIR \
-DMG_DISABLE_DAV \
-DMG_DISABLE_CGI \
-DMG_DISABLE_SSI \
-DMG_ENABLE_HTTP_STREAMING_MULTIPART \
-DMG_MAX_HTTP_HEADERS=20 \
-DMG_MAX_HTTP_REQUEST_SIZE=1024 \
-DMG_MAX_PATH=40 \
-DMG_MAX_HTTP_SEND_MBUF=1024 \
-DMG_NO_BSD_SOCKETS
SDK_FLAGS = -DTARGET_IS_CC3200 -DUSE_FREERTOS -DSL_PLATFORM_MULTI_THREADED
DISABLED_SDK_WARNINGS = -Wno-missing-braces -Wno-strict-aliasing -Wno-parentheses -Wno-unused-variable
CFLAGS += -Os -Wall -Werror \
$(SDK_FLAGS) -DCS_PLATFORM=4 -DCC3200_FS_SLFS \
${MONGOOSE_FEATURES} ${CFLAGS_EXTRA}
FW_ELF = ${FW_DIR}/${PROG}.axf
FW_BIN = ${FW_DIR}/${PROG}.bin
FW_MANIFEST = ${FW_DIR}/manifest.json
FW_ZIP = ${FW_DIR}/firmware.zip
BUILD_INFO_JSON = ${OBJDIR}/build_info.json
SLFS_FILES = $(wildcard $(SLFS_PATH)/*)
.PHONY: all clean flash
all: ${OBJDIR} ${SYS_CONFIG_C} ${FW_DIR} ${FW_ZIP}
clean:
@rm -rf ${OBJDIR} ${wildcard *~}
@rm -rf ${FW_DIR} ${wildcard *~}
${OBJDIR}:
@echo " MKDIR $@"
@mkdir -p ${OBJDIR} ${FS_BUILD_DIR}
${FW_DIR}:
@echo " MKDIR $@"
@mkdir -p ${FW_DIR}
${FW_ZIP}: ${FW_ELF} ${FW_BIN} ${SLFS_FILES}
@echo " Code size: $(shell ls -l ${FW_BIN} | awk '{print $$5}')"
@echo " GEN ${FW_MANIFEST}"
@$(COMMON_PATH)/tools/fw_meta.py gen_build_info \
--json_output=$(BUILD_INFO_JSON)
@cp -v $(SLFS_FILES) out/
@$(COMMON_PATH)/tools/fw_meta.py create_manifest \
--name=$(PROG) --platform=$(PLATFORM) \
--build_info=$(BUILD_INFO_JSON) \
--output=$(FW_MANIFEST) \
--src_dir=$(FW_DIR) \
sys_mcuimg.bin:src=$(notdir $(FW_BIN)) \
$(foreach f,$(SLFS_FILES), $(notdir $(f)):src=$(notdir $(f)))
@echo " ZIP $@"
@$(COMMON_PATH)/tools/fw_meta.py create_fw \
--manifest=$(FW_MANIFEST) \
--src_dir=$(FW_DIR) \
--output=$@
APP_OBJS = $(OBJDIR)/main.o \
${OBJDIR}/cc3200_fs.o ${OBJDIR}/cc3200_fs_slfs.o ${OBJDIR}/cc3200_libc.o \
${OBJDIR}/cc3200_socket.o \
${OBJDIR}/mongoose.o \
${OBJDIR}/startup_gcc.o \
${OBJDIR}/timers.o ${OBJDIR}/list.o ${OBJDIR}/queue.o ${OBJDIR}/tasks.o ${OBJDIR}/port.o ${OBJDIR}/heap_3.o ${OBJDIR}/osi_freertos.o \
${OBJDIR}/socket.o ${OBJDIR}/wlan.o ${OBJDIR}/driver.o ${OBJDIR}/device.o ${OBJDIR}/netapp.o ${OBJDIR}/netcfg.o ${OBJDIR}/cc_pal.o ${OBJDIR}/fs.o \
${OBJDIR}/cpu.o ${OBJDIR}/i2c.o ${OBJDIR}/interrupt.o ${OBJDIR}/pin.o ${OBJDIR}/prcm.o ${OBJDIR}/spi.o ${OBJDIR}/uart.o ${OBJDIR}/udma.o ${OBJDIR}/utils.o
${FW_ELF}: ${APP_OBJS}
SCATTERgcc_${PROG} = ${PROG}.ld
ENTRY_${PROG} = ResetISR
# Target specific warning inhibitions
build/wlan.o: CFLAGS += $(DISABLED_SDK_WARNINGS)
build/driver.o: CFLAGS += $(DISABLED_SDK_WARNINGS)
build/fs.o: CFLAGS += $(DISABLED_SDK_WARNINGS)
build/spi.o: CFLAGS += $(DISABLED_SDK_WARNINGS)
build/prcm.o: CFLAGS += $(DISABLED_SDK_WARNINGS)
build/spiffs_hydrogen.o: CFLAGS += -Wno-unused-function