File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ COPY_OUT=0
17
17
DEPLOY_OUT=0
18
18
19
19
function print_help() {
20
- echo " Usage: build.sh [-s] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|idf_libs|copy_bootloader|mem_variant>] [config ...]"
20
+ echo " Usage: build.sh [-s] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure| idf_libs|copy_bootloader|mem_variant>] [config ...]"
21
21
echo " -s Skip installing/updating of ESP-IDF and all components"
22
22
echo " -A Set which branch of arduino-esp32 to be used for compilation"
23
23
echo " -I Set which branch of ESP-IDF to be used for compilation"
@@ -58,6 +58,7 @@ while getopts ":A:I:i:c:t:b:sd" opt; do
58
58
b=$OPTARG
59
59
if [ " $b " != " build" ] &&
60
60
[ " $b " != " menuconfig" ] &&
61
+ [ " $b " != " reconfigure" ] &&
61
62
[ " $b " != " idf_libs" ] &&
62
63
[ " $b " != " copy_bootloader" ] &&
63
64
[ " $b " != " mem_variant" ]; then
Original file line number Diff line number Diff line change
1
+ # /bin/bash
2
+
3
+ if ! idf.py --version >& /dev/null ; then
4
+ cat > /dev/stderr << EOF
5
+ ERROR: This script requires a full Espressif IDF install.
6
+ Suggested use:
7
+
8
+ sudo docker run -it --rm -v \$ PWD:/project -w /project espressif/idf:v4.4 $0
9
+
10
+ EOF
11
+ exit 1
12
+ fi
13
+
14
+ source ./tools/config.sh
15
+
16
+ TINYUSB_REPO_URL=" https://github.com/hathach/tinyusb.git"
17
+ TINYUSB_REPO_DIR=" $AR_COMPS /arduino_tinyusb/tinyusb"
18
+
19
+ #
20
+ # CLONE/UPDATE TINYUSB
21
+ #
22
+ echo " Updating TinyUSB..."
23
+ if [ ! -d $TINYUSB_REPO_DIR ]; then
24
+ git clone $TINYUSB_REPO_URL $TINYUSB_REPO_DIR
25
+ else
26
+ git -C $TINYUSB_REPO_DIR fetch && \
27
+ git -C $TINYUSB_REPO_DIR pull --ff-only
28
+ fi
29
+ if [ $? -ne 0 ]; then exit 1; fi
30
+
31
+ # generate ninja files
32
+ ./build.sh -t esp32s3 -b reconfigure -s
33
+
34
+ # compile and extract library
35
+ TINYUSB_LIB_FILE=esp-idf/arduino_tinyusb/libarduino_tinyusb.a
36
+ (cd build && ninja $TINYUSB_LIB_FILE && cp $TINYUSB_LIB_FILE ..)
You can’t perform that action at this time.
0 commit comments