Skip to content

Commit 0748143

Browse files
committed
cc3200: Add targets to erase flash, deploy firmware using cc3200tool.
cc3200tool, https://github.com/ALLTERCO/cc3200tool is a (mostly, some binary blobs present) open-source, Linux-friendly tool to flash a cc3200 devices. It's an alternative to fully proprietary, Windows-only Uniflash from TI. The provided make targets are for erasing flash, flashing the uPy bootloader and firmware, and flashing vendor's WiFi firmware "servicepacks" (the latter needs to be downloaded from vendor side, a link is present inside Makefile).
1 parent 75aa7be commit 0748143

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

cc3200/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ endif
88
# Make 'release' the default build type
99
BTYPE ?= release
1010

11+
# Port for flashing firmware
12+
PORT ?= /dev/ttyUSB1
13+
1114
# If the build directory is not given, make it reflect the board name.
1215
BUILD ?= build/$(BOARD)/$(BTYPE)
1316

@@ -23,6 +26,9 @@ CFLAGS += -Iboards/$(BOARD)
2326

2427
LDFLAGS = -Wl,-nostdlib -Wl,--gc-sections -Wl,-Map=$@.map
2528

29+
FLASH_SIZE_WIPY = 2M
30+
FLASH_SIZE_LAUNCHXL = 1M
31+
2632
ifeq ($(BTARGET), application)
2733
# qstr definitions (must come before including py.mk)
2834
QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
@@ -39,3 +45,18 @@ endif
3945

4046
# always include MicroPython make rules
4147
include ../py/mkrules.mk
48+
49+
erase:
50+
cc3200tool -p $(PORT) format_flash --size $(FLASH_SIZE_$(BOARD))
51+
52+
deploy:
53+
cc3200tool -p $(PORT) \
54+
write_file bootmgr/build/$(BOARD)/$(BTYPE)/bootloader.bin /sys/mcuimg.bin \
55+
write_file build/$(BOARD)/$(BTYPE)/mcuimg.bin /sys/factimg.bin
56+
57+
# Files *.ucf and *ucf.signed.bin come from CC3200SDK-SERVICEPACK
58+
# package from http://www.ti.com/tool/cc3200sdk
59+
servicepack:
60+
cc3200tool -p $(PORT) \
61+
write_file --file-size=0x20000 --signature ota_1.0.1.6-2.7.0.0.ucf.signed.bin \
62+
ota_1.0.1.6-2.7.0.0.ucf /sys/servicepack.ucf

0 commit comments

Comments
 (0)