Skip to content

Commit 6a41bf9

Browse files
johanhedanicampora
authored andcommitted
cc3200: Create separate release/debug build directories
1 parent 7711afb commit 6a41bf9

File tree

5 files changed

+26
-10
lines changed

5 files changed

+26
-10
lines changed

cc3200/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ ifeq ($(wildcard boards/$(BOARD)/.),)
55
$(error Invalid BOARD specified)
66
endif
77

8+
BTYPE ?= release
9+
810
# If the build directory is not given, make it reflect the board name.
9-
BUILD ?= build/$(BOARD)
11+
BUILD ?= build/$(BOARD)/$(BTYPE)
1012

1113
include ../py/mkenv.mk
1214
-include ../../localconfig.mk
1315

1416
CROSS_COMPILE ?= arm-none-eabi-
1517

16-
BTYPE ?= release
17-
1818
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
1919
CFLAGS = -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4)
2020
CFLAGS += -g -ffunction-sections -fdata-sections -fno-common -fsigned-char -mno-unaligned-access

cc3200/application.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ $(BUILD)/application.bin: $(BUILD)/application.axf
216216

217217
$(BUILD)/MCUIMG.BIN: $(BUILD)/application.bin
218218
$(ECHO) "Create $@"
219-
$(Q)$(SHELL) $(APP_SIGN) $(BOARD)
219+
$(Q)$(SHELL) $(APP_SIGN) $(BOARD) $(BTYPE)
220220

221221
MAKE_PINS = boards/make-pins.py
222222
BOARD_PINS = boards/$(BOARD)/pins.csv

cc3200/appsign.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
#!/bin/bash
22

3+
if [ "$#" -ne 2 ]; then
4+
echo "Usage: appsign.sh *board type* *build type*"
5+
exit 1
6+
fi
7+
8+
BOARD=$1
9+
BTYPE=$2
10+
311
# Build location
4-
# First parameter passed is the board type
5-
BUILD=build/$1
12+
# Based on build type and board type
13+
BUILD=build/${BOARD}/${BTYPE}
614

715
# Generate the MD5 hash
816
echo -n `md5sum --binary $BUILD/application.bin | awk '{ print $1 }'` > __md5hash.bin
@@ -17,4 +25,4 @@ rm -f __md5hash.bin
1725
# Remove hte unsigned binary
1826
rm -f $BUILD/application.bin
1927

20-
exit $RET
28+
exit $RET

cc3200/bootmgr/bootgen.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
#!/bin/bash
22

3+
if [ "$#" -ne 2 ]; then
4+
echo "Usage: bootgen.sh *board type* *build type*"
5+
exit 1
6+
fi
7+
8+
BOARD=$1
9+
BTYPE=$2
10+
311
# Re-locator Path
412
RELOCATOR=bootmgr/relocator
513

614
# Boot Manager Path
715
# First parameter passed is the board type
8-
BOOTMGR=bootmgr/build/$1
16+
BOOTMGR=bootmgr/build/${BOARD}/${BTYPE}
917

1018
# Check for re-locator binary
1119
if [ ! -f $RELOCATOR/relocator.bin ]; then

cc3200/bootmgr/bootloader.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
BUILD = bootmgr/build/$(BOARD)
1+
BUILD = bootmgr/build/$(BOARD)/$(BTYPE)
22

33
BOOT_INC = -Ibootmgr
44
BOOT_INC += -Ibootmgr/sl
@@ -122,7 +122,7 @@ $(BUILD)/bootmgr.bin: $(BUILD)/bootmgr.axf
122122

123123
$(BUILD)/bootloader.bin: $(BUILD)/bootmgr.bin
124124
$(ECHO) "Create $@"
125-
$(Q)$(SHELL) $(BOOT_GEN) $(BOARD)
125+
$(Q)$(SHELL) $(BOOT_GEN) $(BOARD) $(BTYPE)
126126

127127
# Create an empty "qstrdefs.generated.h" needed by py/mkrules.mk
128128
$(HEADER_BUILD)/qstrdefs.generated.h: | $(HEADER_BUILD)

0 commit comments

Comments
 (0)