summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-12-29 16:57:00 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-12-29 17:12:47 +0300
commit0748143a4c648ad7bcdbbf125d039ceb7490f4e6 (patch)
tree3ab27e031f72b7f3a9d5308b15f432823629ac4c
parent75aa7befec5d3afce2c5a970d8644299d367f6fe (diff)
downloadmicropython-0748143a4c648ad7bcdbbf125d039ceb7490f4e6.tar.gz
micropython-0748143a4c648ad7bcdbbf125d039ceb7490f4e6.zip
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).
-rw-r--r--cc3200/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/cc3200/Makefile b/cc3200/Makefile
index 7623d20e7a..1798ac927c 100644
--- a/cc3200/Makefile
+++ b/cc3200/Makefile
@@ -8,6 +8,9 @@ endif
# Make 'release' the default build type
BTYPE ?= release
+# Port for flashing firmware
+PORT ?= /dev/ttyUSB1
+
# If the build directory is not given, make it reflect the board name.
BUILD ?= build/$(BOARD)/$(BTYPE)
@@ -23,6 +26,9 @@ CFLAGS += -Iboards/$(BOARD)
LDFLAGS = -Wl,-nostdlib -Wl,--gc-sections -Wl,-Map=$@.map
+FLASH_SIZE_WIPY = 2M
+FLASH_SIZE_LAUNCHXL = 1M
+
ifeq ($(BTARGET), application)
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
@@ -39,3 +45,18 @@ endif
# always include MicroPython make rules
include ../py/mkrules.mk
+
+erase:
+ cc3200tool -p $(PORT) format_flash --size $(FLASH_SIZE_$(BOARD))
+
+deploy:
+ cc3200tool -p $(PORT) \
+ write_file bootmgr/build/$(BOARD)/$(BTYPE)/bootloader.bin /sys/mcuimg.bin \
+ write_file build/$(BOARD)/$(BTYPE)/mcuimg.bin /sys/factimg.bin
+
+# Files *.ucf and *ucf.signed.bin come from CC3200SDK-SERVICEPACK
+# package from http://www.ti.com/tool/cc3200sdk
+servicepack:
+ cc3200tool -p $(PORT) \
+ write_file --file-size=0x20000 --signature ota_1.0.1.6-2.7.0.0.ucf.signed.bin \
+ ota_1.0.1.6-2.7.0.0.ucf /sys/servicepack.ucf