diff --git a/cc3200/Makefile b/cc3200/Makefile index 246445fb5763fdc8e3884b2f9a419ef50034195a..29318d44ec4a98135fe60a3dd9fe93b318b11d5c 100644 --- a/cc3200/Makefile +++ b/cc3200/Makefile @@ -5,16 +5,16 @@ ifeq ($(wildcard boards/$(BOARD)/.),) $(error Invalid BOARD specified) endif +BTYPE ?= release + # If the build directory is not given, make it reflect the board name. -BUILD ?= build/$(BOARD) +BUILD ?= build/$(BOARD)/$(BTYPE) include ../py/mkenv.mk -include ../../localconfig.mk CROSS_COMPILE ?= arm-none-eabi- -BTYPE ?= release - CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -march=armv7e-m -mabi=aapcs -mcpu=cortex-m4 -msoft-float -mfloat-abi=soft -fsingle-precision-constant -Wdouble-promotion CFLAGS = -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) CFLAGS += -g -ffunction-sections -fdata-sections -fno-common -fsigned-char -mno-unaligned-access diff --git a/cc3200/application.mk b/cc3200/application.mk index e8bf66079e5334855ec3f5bbd1db6723ea2417b1..59aac1377004b37f64568be091c44c5601b6a471 100644 --- a/cc3200/application.mk +++ b/cc3200/application.mk @@ -216,7 +216,7 @@ $(BUILD)/application.bin: $(BUILD)/application.axf $(BUILD)/MCUIMG.BIN: $(BUILD)/application.bin $(ECHO) "Create $@" - $(Q)$(SHELL) $(APP_SIGN) $(BOARD) + $(Q)$(SHELL) $(APP_SIGN) $(BOARD) $(BTYPE) MAKE_PINS = boards/make-pins.py BOARD_PINS = boards/$(BOARD)/pins.csv diff --git a/cc3200/appsign.sh b/cc3200/appsign.sh index 842e83cf977efff6bcc9389e8f810dc187d70a48..d72498a2870c5e249bad1c78145ac808b6eabfc0 100644 --- a/cc3200/appsign.sh +++ b/cc3200/appsign.sh @@ -1,8 +1,16 @@ #!/bin/bash +if [ "$#" -ne 2 ]; then + echo "Usage: appsign.sh *board type* *build type*" + exit 1 +fi + +BOARD=$1 +BTYPE=$2 + # Build location -# First parameter passed is the board type -BUILD=build/$1 +# Based on build type and board type +BUILD=build/${BOARD}/${BTYPE} # Generate the MD5 hash echo -n `md5sum --binary $BUILD/application.bin | awk '{ print $1 }'` > __md5hash.bin @@ -17,4 +25,4 @@ rm -f __md5hash.bin # Remove hte unsigned binary rm -f $BUILD/application.bin -exit $RET \ No newline at end of file +exit $RET diff --git a/cc3200/bootmgr/bootgen.sh b/cc3200/bootmgr/bootgen.sh index be495b37496e3fb81a94b7af1b285d631f03a9e2..cab5d20873f725783f8422b7f00b7715358d231f 100644 --- a/cc3200/bootmgr/bootgen.sh +++ b/cc3200/bootmgr/bootgen.sh @@ -1,11 +1,19 @@ #!/bin/bash +if [ "$#" -ne 2 ]; then + echo "Usage: bootgen.sh *board type* *build type*" + exit 1 +fi + +BOARD=$1 +BTYPE=$2 + # Re-locator Path RELOCATOR=bootmgr/relocator # Boot Manager Path # First parameter passed is the board type -BOOTMGR=bootmgr/build/$1 +BOOTMGR=bootmgr/build/${BOARD}/${BTYPE} # Check for re-locator binary if [ ! -f $RELOCATOR/relocator.bin ]; then diff --git a/cc3200/bootmgr/bootloader.mk b/cc3200/bootmgr/bootloader.mk index 1f687d9b888b41dccfc238b45b8a018e13bc5bdf..143cafa98ee2f2936a6d0cb2485853053699f5ce 100644 --- a/cc3200/bootmgr/bootloader.mk +++ b/cc3200/bootmgr/bootloader.mk @@ -1,4 +1,4 @@ -BUILD = bootmgr/build/$(BOARD) +BUILD = bootmgr/build/$(BOARD)/$(BTYPE) BOOT_INC = -Ibootmgr BOOT_INC += -Ibootmgr/sl @@ -122,7 +122,7 @@ $(BUILD)/bootmgr.bin: $(BUILD)/bootmgr.axf $(BUILD)/bootloader.bin: $(BUILD)/bootmgr.bin $(ECHO) "Create $@" - $(Q)$(SHELL) $(BOOT_GEN) $(BOARD) + $(Q)$(SHELL) $(BOOT_GEN) $(BOARD) $(BTYPE) # Create an empty "qstrdefs.generated.h" needed by py/mkrules.mk $(HEADER_BUILD)/qstrdefs.generated.h: | $(HEADER_BUILD)