esp32: add set_port.sh tool (unix only) to set serial port for esp tool

This commit is contained in:
Matthias Ringwald 2017-08-15 10:26:03 +02:00
parent e1f907047d
commit a5481ee357
3 changed files with 10 additions and 3 deletions

View File

@ -1,11 +1,11 @@
# BTstack Port for the Espressif ESP32 Platform
Status: Basic port incl. all examples. BTstack runs on dedicated FreeRTOS thread. Multi threading not supported.
Status: Basic port incl. all examples. BTstack runs on dedicated FreeRTOS thread. Multi threading (calling BTstack functions from a different thread) is not supported.
## Setup
- Follow [Espressif IoT Development Framework (ESP-IDF) setup](https://github.com/espressif/esp-idf) to install XTensa toolchain and the ESP-IDF.
- In port/esp32, configure the serial port for firmware upload as described in the ESP-IDF setup guides.
- In port/esp32/template, configure the serial port for firmware upload as described in the ESP-IDF setup guides.
## Usage

View File

@ -55,9 +55,13 @@ for file in os.listdir(examples_embedded):
os.makedirs(apps_folder)
# copy files
for item in ['sdkconfig']:
for item in ['sdkconfig', 'set_port.sh']:
shutil.copyfile(script_path + '/template/' + item, apps_folder + '/' + item)
# mark set_port.sh as executable
os.chmod(apps_folder + '/set_port.sh', 0o755)
# create Makefile file
with open(apps_folder + "Makefile", "wt") as fout:
fout.write(mk_template.replace("EXAMPLE", example).replace("TOOL", script_path).replace("DATE",time.strftime("%c")))

View File

@ -0,0 +1,3 @@
#!/bin/sh
PORT=$1
sed -i "/CONFIG_ESPTOOLPY_PORT/c\CONFIG_ESPTOOLPY_PORT=\"$PORT\"" sdkconfig