Update Spresense SDK to 2.0.2

This commit is contained in:
Kamil Tomaszewski
2021-01-22 15:56:56 +01:00
parent 469ca2f155
commit 36064e3d7d
12 changed files with 2488 additions and 11 deletions
+31 -10
View File
@@ -1,3 +1,19 @@
# Platforms are: Linux, Darwin, MSYS, CYGWIN
PLATFORM := $(firstword $(subst _, ,$(shell uname -s 2>/dev/null)))
ifeq ($(PLATFORM),Darwin)
# macOS
MKSPK = $(TOP)/hw/mcu/sony/cxd56/mkspk/mkspk
else ifeq ($(PLATFORM),Linux)
# Linux
MKSPK = $(TOP)/hw/mcu/sony/cxd56/mkspk/mkspk
else
# Cygwin/MSYS2
MKSPK = $(TOP)/hw/mcu/sony/cxd56/mkspk/mkspk.exe
endif
SERIAL ?= /dev/ttyUSB0
CFLAGS += \
-DCONFIG_HAVE_DOUBLE \
-Dmain=spresense_main \
@@ -11,31 +27,33 @@ CFLAGS += \
-fno-builtin \
-fno-strength-reduce \
-fomit-frame-pointer \
-Wno-error=undef \
-Wno-error=cast-align \
-Wno-error=unused-parameter \
-DCFG_TUSB_MCU=OPT_MCU_CXD56 \
# lwip/src/core/raw.c:334:43: error: declaration of 'recv' shadows a global declaration
CFLAGS += -Wno-error=shadow
SPRESENSE_SDK = $(TOP)/hw/mcu/sony/cxd56/spresense-exported-sdk
INC += \
$(SPRESENSE_SDK)/nuttx/include \
$(SPRESENSE_SDK)/nuttx/arch \
$(SPRESENSE_SDK)/nuttx/arch/chip \
$(SPRESENSE_SDK)/sdk/bsp/include \
$(SPRESENSE_SDK)/sdk/bsp/include/sdk \
$(SPRESENSE_SDK)/nuttx/arch/os \
$(SPRESENSE_SDK)/sdk/include \
LIBS += \
$(SPRESENSE_SDK)/sdk/libs/libapps.a \
$(SPRESENSE_SDK)/sdk/libs/libsdk.a \
$(SPRESENSE_SDK)/nuttx/libs/libapps.a \
$(SPRESENSE_SDK)/nuttx/libs/libnuttx.a \
LD_FILE = hw/mcu/sony/cxd56/spresense-exported-sdk/nuttx/build/ramconfig.ld
LD_FILE = hw/mcu/sony/cxd56/spresense-exported-sdk/nuttx/scripts/ramconfig.ld
LDFLAGS += \
-Xlinker --entry=__start \
-nostartfiles \
-nodefaultlibs \
-Wl,--defsym,__stack=_vectors+786432 \
-Wl,--gc-sections \
-u spresense_main \
@@ -43,10 +61,13 @@ LDFLAGS += \
VENDOR = sony
CHIP_FAMILY = cxd56
$(BUILD)/$(BOARD)-firmware.spk: $(BUILD)/$(BOARD)-firmware.elf
$(MKSPK): $(BUILD)/$(BOARD)-firmware.elf
$(MAKE) -C $(TOP)/hw/mcu/sony/cxd56/mkspk
$(BUILD)/$(BOARD)-firmware.spk: $(MKSPK)
@echo CREATE $@
@$(SPRESENSE_SDK)/sdk/tools/linux/mkspk -c 2 $^ nuttx $@
@$(MKSPK) -c 2 $(BUILD)/$(BOARD)-firmware.elf nuttx $@
# flash
flash: $(BUILD)/$(BOARD)-firmware.spk
@$(SPRESENSE_SDK)/sdk/tools/flash.sh -c /dev/ttyUSB0 $<
@$(TOP)/hw/mcu/sony/cxd56/tools/flash_writer.py -s -c $(SERIAL) -d -b 115200 -n $<