mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-05 21:59:45 +00:00
esp32: add set_port.sh tool (unix only) to set serial port for esp tool
This commit is contained in:
parent
e1f907047d
commit
a5481ee357
@ -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
|
||||
|
||||
|
@ -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")))
|
||||
|
3
port/esp32/template/set_port.sh
Executable file
3
port/esp32/template/set_port.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
PORT=$1
|
||||
sed -i "/CONFIG_ESPTOOLPY_PORT/c\CONFIG_ESPTOOLPY_PORT=\"$PORT\"" sdkconfig
|
Loading…
Reference in New Issue
Block a user