swap out esphelper for makefile commands to throw m4 into passthrough, upload via esptool, and start the serial

This commit is contained in:
brentru
2019-10-01 11:34:04 -04:00
parent bd00a04d30
commit 38a1cd7ee8
4 changed files with 24 additions and 37 deletions

View File

@@ -1,4 +1,7 @@
PROJECT_NAME := nina-fw
M4_PORT := /dev/cu.usbmodem1431201
M4_BOOTLOADER := /Volumes/FEATHERBOOT/.
ESP_PORT := /dev/cu.usbserial-AH03B302
EXTRA_COMPONENT_DIRS := $(PWD)/arduino
@@ -14,7 +17,26 @@ endif
include $(IDF_PATH)/make/project.mk
# M4 to USB-Serial Passthrough
passthrough:
cp passthrough.UF2 $(M4_BOOTLOADER)
echo "Copied to BOOT!"
# Upload to ESP32 after entering passthrough
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
serial:
miniterm.py -p
firmware: all
python combine.py
.PHONY: firmware
.PHONY: passthrough
.PHONY: upload
.PHONY: serial

View File

@@ -1,35 +0,0 @@
import time
import os
import subprocess
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-p', action='store', dest='port_num',
help='Board port name')
parser.add_argument('-uf2', action='store', dest='uf2',
help='.UF2 file')
results = parser.parse_args()
dest_port = results.port_num
uf2_file = results.uf2
def search_ports():
proc = subprocess.Popen(["ls /dev/cu.* | grep cu.usbmodem"], stdout=subprocess.PIPE, shell=True)
(out, err) = proc.communicate()
avail_ports = out.decode('utf-8')
return avail_ports
# Scan all ports for FEATHERBOOT
avail_ports = search_ports()
while not avail_ports:
search_ports()
print("Board not found, double-tap RESET to enter the bootloader...")
time.sleep(1)
# cp provided uf2 to featherboot
# wait for featherboot to pop back up as a usbmodem
# execute esptool on port with compiled fw, the start up miniterm.py

View File

@@ -434,7 +434,7 @@ CONFIG_LOG_DEFAULT_LEVEL_WARN=
CONFIG_LOG_DEFAULT_LEVEL_INFO=
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=y
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_LOG_COLORS=y
#
@@ -490,7 +490,7 @@ CONFIG_TCP_OVERSIZE_DISABLE=
#
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_UDP_RECVMBOX_SIZE=6
CONFIG_TCPIP_TASK_STACK_SIZE=2048
CONFIG_TCPIP_TASK_STACK_SIZE=3072
CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
CONFIG_TCPIP_TASK_AFFINITY_CPU0=
CONFIG_TCPIP_TASK_AFFINITY_CPU1=