cc3200/Makefile: Build firmware.zip.
This allows the cc3200 port to be build with the standard autobuild script rather than the custom build-cc3200-latest.sh (which is now removed). This also fixes the path inside the zip file (by using the `-j` flag to zip). This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
parent
326dfd2a85
commit
bc1af5ab7f
@ -7,6 +7,8 @@ endif
|
|||||||
|
|
||||||
# Make 'release' the default build type
|
# Make 'release' the default build type
|
||||||
BTYPE ?= release
|
BTYPE ?= release
|
||||||
|
# Make the 'application' by default ('bootloader' can be built explicitly)
|
||||||
|
BTARGET ?= application
|
||||||
|
|
||||||
# Port for flashing firmware
|
# Port for flashing firmware
|
||||||
PORT ?= /dev/ttyUSB1
|
PORT ?= /dev/ttyUSB1
|
||||||
|
@ -198,7 +198,7 @@ WIPY_IP ?= '192.168.1.1'
|
|||||||
WIPY_USER ?= 'micro'
|
WIPY_USER ?= 'micro'
|
||||||
WIPY_PWD ?= 'python'
|
WIPY_PWD ?= 'python'
|
||||||
|
|
||||||
all: $(BUILD)/mcuimg.bin
|
all: $(BUILD)/firmware.zip
|
||||||
|
|
||||||
.PHONY: deploy-ota
|
.PHONY: deploy-ota
|
||||||
|
|
||||||
@ -219,6 +219,10 @@ $(BUILD)/mcuimg.bin: $(BUILD)/application.bin
|
|||||||
$(ECHO) "Create $@"
|
$(ECHO) "Create $@"
|
||||||
$(Q)$(SHELL) $(APP_SIGN) $(BUILD)
|
$(Q)$(SHELL) $(APP_SIGN) $(BUILD)
|
||||||
|
|
||||||
|
$(BUILD)/firmware.zip: $(BUILD)/mcuimg.bin
|
||||||
|
$(ECHO) "Create $@"
|
||||||
|
$(Q)$(ZIP) -j $@ $<
|
||||||
|
|
||||||
MAKE_PINS = boards/make-pins.py
|
MAKE_PINS = boards/make-pins.py
|
||||||
BOARD_PINS = boards/$(BOARD)/pins.csv
|
BOARD_PINS = boards/$(BOARD)/pins.csv
|
||||||
AF_FILE = boards/cc3200_af.csv
|
AF_FILE = boards/cc3200_af.csv
|
||||||
|
@ -42,6 +42,7 @@ SED = sed
|
|||||||
CAT = cat
|
CAT = cat
|
||||||
TOUCH = touch
|
TOUCH = touch
|
||||||
PYTHON = python3
|
PYTHON = python3
|
||||||
|
ZIP = zip
|
||||||
|
|
||||||
AS = $(CROSS_COMPILE)as
|
AS = $(CROSS_COMPILE)as
|
||||||
CC = $(CROSS_COMPILE)gcc
|
CC = $(CROSS_COMPILE)gcc
|
||||||
|
@ -60,7 +60,7 @@ FW_TAG="-$FW_DATE-unstable-$FW_GIT"
|
|||||||
|
|
||||||
# build new firmware
|
# build new firmware
|
||||||
cd ports/cc3200
|
cd ports/cc3200
|
||||||
${AUTODIR}/build-cc3200-latest.sh ${FW_TAG} ${LOCAL_FIRMWARE}
|
build_cc3200_boards ${FW_TAG} ${LOCAL_FIRMWARE}
|
||||||
cd ../esp8266
|
cd ../esp8266
|
||||||
build_esp8266_boards ${FW_TAG} ${LOCAL_FIRMWARE}
|
build_esp8266_boards ${FW_TAG} ${LOCAL_FIRMWARE}
|
||||||
cd ../esp32
|
cd ../esp32
|
||||||
|
@ -88,6 +88,10 @@ function build_boards {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function build_cc3200_boards {
|
||||||
|
build_boards hal/cc3200_hal.c $1 $2 zip
|
||||||
|
}
|
||||||
|
|
||||||
function build_esp32_boards {
|
function build_esp32_boards {
|
||||||
build_boards modesp32.c $1 $2 bin elf map uf2 app-bin
|
build_boards modesp32.c $1 $2 bin elf map uf2 app-bin
|
||||||
}
|
}
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# function for building firmware
|
|
||||||
function do_build() {
|
|
||||||
descr=$1
|
|
||||||
board=$2
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
echo "building $descr $board"
|
|
||||||
build_dir=/tmp/cc3200-build-$board
|
|
||||||
$MICROPY_AUTOBUILD_MAKE $@ BTARGET=application BOARD=$board BUILD=$build_dir || exit 1
|
|
||||||
zip $dest_dir/$descr$fw_tag.zip $build_dir/mcuimg.bin
|
|
||||||
rm -rf $build_dir
|
|
||||||
}
|
|
||||||
|
|
||||||
# check/get parameters
|
|
||||||
if [ $# != 2 ]; then
|
|
||||||
echo "usage: $0 <fw-tag> <dest-dir>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
fw_tag=$1
|
|
||||||
dest_dir=$2
|
|
||||||
|
|
||||||
# check we are in the correct directory
|
|
||||||
if [ ! -r application.mk ]; then
|
|
||||||
echo "must be in cc3200 directory"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# build the versions
|
|
||||||
do_build wipy WIPY
|
|
Loading…
Reference in New Issue
Block a user