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>
pull/12295/head
Jim Mussared 2023-08-24 15:44:16 +10:00
rodzic 326dfd2a85
commit bc1af5ab7f
6 zmienionych plików z 13 dodań i 34 usunięć

Wyświetl plik

@ -7,6 +7,8 @@ endif
# Make 'release' the default build type
BTYPE ?= release
# Make the 'application' by default ('bootloader' can be built explicitly)
BTARGET ?= application
# Port for flashing firmware
PORT ?= /dev/ttyUSB1

Wyświetl plik

@ -198,7 +198,7 @@ WIPY_IP ?= '192.168.1.1'
WIPY_USER ?= 'micro'
WIPY_PWD ?= 'python'
all: $(BUILD)/mcuimg.bin
all: $(BUILD)/firmware.zip
.PHONY: deploy-ota
@ -219,6 +219,10 @@ $(BUILD)/mcuimg.bin: $(BUILD)/application.bin
$(ECHO) "Create $@"
$(Q)$(SHELL) $(APP_SIGN) $(BUILD)
$(BUILD)/firmware.zip: $(BUILD)/mcuimg.bin
$(ECHO) "Create $@"
$(Q)$(ZIP) -j $@ $<
MAKE_PINS = boards/make-pins.py
BOARD_PINS = boards/$(BOARD)/pins.csv
AF_FILE = boards/cc3200_af.csv

Wyświetl plik

@ -42,6 +42,7 @@ SED = sed
CAT = cat
TOUCH = touch
PYTHON = python3
ZIP = zip
AS = $(CROSS_COMPILE)as
CC = $(CROSS_COMPILE)gcc

Wyświetl plik

@ -60,7 +60,7 @@ FW_TAG="-$FW_DATE-unstable-$FW_GIT"
# build new firmware
cd ports/cc3200
${AUTODIR}/build-cc3200-latest.sh ${FW_TAG} ${LOCAL_FIRMWARE}
build_cc3200_boards ${FW_TAG} ${LOCAL_FIRMWARE}
cd ../esp8266
build_esp8266_boards ${FW_TAG} ${LOCAL_FIRMWARE}
cd ../esp32

Wyświetl plik

@ -88,6 +88,10 @@ function build_boards {
done
}
function build_cc3200_boards {
build_boards hal/cc3200_hal.c $1 $2 zip
}
function build_esp32_boards {
build_boards modesp32.c $1 $2 bin elf map uf2 app-bin
}

Wyświetl plik

@ -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