-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.sh
More file actions
38 lines (32 loc) · 696 Bytes
/
Copy pathcommon.sh
File metadata and controls
38 lines (32 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
for sdk_candidate in ~/esp/xtensa-esp32-elf/bin; do
if [ -e $sdk_candidate ];then
PATH=$sdk_candidate:$PATH
break
fi
done
for idf_canditate in ~/software/vc/esp-idf-3.1.2 ~/software/vc/esp-idf; do
if [ -e $idf_canditate ]; then
IDF_PATH=$idf_canditate
break
fi
done
if [ -z ${ESPPORT} ]; then
ports=(/dev/ttyUSB{0,1,2})
for candidate in /dev/tty.SLAB_USBtoUART $ports; do
if [ -e $candidate ]; then
ESPPORT=$candidate
fi
done
fi
if [ -z ${ESPBAUD} ]; then
ESPBAUD=460800
fi
if [ `uname` == 'Darwin' ]; then
CORES=4
else
CORES=28
fi
export PATH
export IDF_PATH
export ESPPORT
export ESPBAUD