upload-nina and upload-circuitpython

This commit is contained in:
brentru
2019-10-01 12:04:18 -04:00
parent 38a1cd7ee8
commit ae2b0660ca
2 changed files with 15 additions and 9 deletions

View File

@@ -1,8 +1,13 @@
PROJECT_NAME := nina-fw PROJECT_NAME := nina-fw
# Ports
M4_PORT := /dev/cu.usbmodem1431201 M4_PORT := /dev/cu.usbmodem1431201
M4_BOOTLOADER := /Volumes/FEATHERBOOT/.
ESP_PORT := /dev/cu.usbserial-AH03B302 ESP_PORT := /dev/cu.usbserial-AH03B302
# Directories and Files
BOOT_VOLUME := /Volumes/FEATHERBOOT/.
CIRCUITPYTHON_UF2 := adafruit-circuitpython-feather_m4_express-en_US-4.1.0.uf2
EXTRA_COMPONENT_DIRS := $(PWD)/arduino EXTRA_COMPONENT_DIRS := $(PWD)/arduino
ifeq ($(RELEASE),1) ifeq ($(RELEASE),1)
@@ -17,18 +22,17 @@ endif
include $(IDF_PATH)/make/project.mk include $(IDF_PATH)/make/project.mk
# M4 to USB-Serial Passthrough
passthrough: passthrough:
cp passthrough.UF2 $(M4_BOOTLOADER) cp passthrough.UF2 $(BOOT_VOLUME)
echo "Copied to BOOT!"
# Upload to ESP32 after entering passthrough upload-nina:
upload:
echo "Uploading nina-fw to ESP32"
esptool.py --port $(M4_PORT) --before no_reset --baud 115200 write_flash 0 NINA_W102-1.3.1.bin esptool.py --port $(M4_PORT) --before no_reset --baud 115200 write_flash 0 NINA_W102-1.3.1.bin
upload-circuitpython:
cp $(CIRCUITPYTHON_UF2) $(BOOT_VOLUME)
serial: serial:
miniterm.py -p miniterm.py $(ESP_PORT) 115200
firmware: all firmware: all
python combine.py python combine.py
@@ -37,6 +41,8 @@ firmware: all
.PHONY: passthrough .PHONY: passthrough
.PHONY: upload .PHONY: upload-nina
.PHONY: upload-circuitpython
.PHONY: serial .PHONY: serial