Skip to content

Commit 55c3321

Browse files
committed
Update scripts with the latest requirements
1 parent cafcea0 commit 55c3321

File tree

6 files changed

+26
-36
lines changed

6 files changed

+26
-36
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ components/esp-sr/
66
components/esp32-camera/
77
components/esp_littlefs/
88
components/esp-rainmaker/
9-
components/esp-dsp/
9+
components/espressif__esp-dsp/
1010
components/esp-insights/
1111
components/arduino_tinyusb/tinyusb/
1212
esp-idf/

configs/defconfig.esp32

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY=y
1111
CONFIG_SPIRAM=y
1212
CONFIG_SPIRAM_OCCUPY_HSPI_HOST=y
1313
CONFIG_ULP_COPROC_ENABLED=y
14-
CONFIG_XTAL_FREQ_AUTO=y
1514
# CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1 is not set
1615
CONFIG_FREERTOS_FPU_IN_ISR=y
1716
# CONFIG_USE_WAKENET is not set

tools/copy-libs.sh

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ echo " '-Wl,-Map=\"%s\"' % join(\"\${BUILD_DIR}\", \"\${PROGNAME}.map\")"
350350
echo " ]," >> "$AR_PLATFORMIO_PY"
351351
echo "" >> "$AR_PLATFORMIO_PY"
352352

353-
# # include dirs
354-
AR_INC=""
353+
# include dirs
354+
REL_INC=""
355355
echo " CPPPATH=[" >> "$AR_PLATFORMIO_PY"
356356

357357
set -- $INCLUDES
@@ -378,7 +378,7 @@ for item; do
378378

379379
out_sub="${item#*$ipath}"
380380
out_cpath="$AR_SDK/include/$fname$out_sub"
381-
AR_INC+=" \"-I{compiler.sdk.path}/include/$fname$out_sub\""
381+
REL_INC+="-iwithprefixbefore $fname$out_sub "
382382
if [ "$out_sub" = "" ]; then
383383
echo " join(FRAMEWORK_DIR, \"tools\", \"sdk\", \"$IDF_TARGET\", \"include\", \"$fname\")," >> "$AR_PLATFORMIO_PY"
384384
else
@@ -451,34 +451,25 @@ for item; do
451451
fi
452452
done
453453

454-
# remove backslashes for Arduino
455-
DEFINES=`echo "$DEFINES" | tr -d '\\'`
456-
457-
458454
# end generation of platformio-build.py
459455
cat 1pio_end.txt >> "$AR_PLATFORMIO_PY"
460456
rm 1pio_end.txt
461457

462-
# arduino platform.txt
463-
platform_file="$AR_COMPS/arduino/platform.txt"
464-
if [ -f "$AR_PLATFORM_TXT" ]; then
465-
# use the file we have already compiled for other chips
466-
platform_file="$AR_PLATFORM_TXT"
467-
fi
468-
awk "/compiler.cpreprocessor.flags.$IDF_TARGET=/{n++}{print>n\"platform_start.txt\"}" "$platform_file"
469-
$SED -i "/compiler.cpreprocessor.flags.$IDF_TARGET\=/d" 1platform_start.txt
470-
awk "/compiler.ar.flags.$IDF_TARGET=/{n++}{print>n\"platform_mid.txt\"}" 1platform_start.txt
471-
rm -rf 1platform_start.txt
472-
473-
cat platform_start.txt > "$AR_PLATFORM_TXT"
474-
echo "compiler.cpreprocessor.flags.$IDF_TARGET=$DEFINES $AR_INC" >> "$AR_PLATFORM_TXT"
475-
echo "compiler.c.elf.libs.$IDF_TARGET=$AR_LIBS" >> "$AR_PLATFORM_TXT"
476-
echo "compiler.c.flags.$IDF_TARGET=$C_FLAGS -MMD -c" >> "$AR_PLATFORM_TXT"
477-
echo "compiler.cpp.flags.$IDF_TARGET=$CPP_FLAGS -MMD -c" >> "$AR_PLATFORM_TXT"
478-
echo "compiler.S.flags.$IDF_TARGET=$AS_FLAGS -x assembler-with-cpp -MMD -c" >> "$AR_PLATFORM_TXT"
479-
echo "compiler.c.elf.flags.$IDF_TARGET=$LD_SCRIPTS $LD_FLAGS" >> "$AR_PLATFORM_TXT"
480-
cat 1platform_mid.txt >> "$AR_PLATFORM_TXT"
481-
rm -rf platform_start.txt platform_mid.txt 1platform_mid.txt
458+
# replace double backslashes with single one
459+
DEFINES=`echo "$DEFINES" | tr -s '\'`
460+
461+
# target flags files
462+
FLAGS_DIR="$AR_SDK/flags"
463+
mkdir -p "$FLAGS_DIR"
464+
echo -n "$DEFINES" > "$FLAGS_DIR/defines"
465+
echo -n "$REL_INC" > "$FLAGS_DIR/includes"
466+
echo -n "$C_FLAGS" > "$FLAGS_DIR/c_flags"
467+
echo -n "$CPP_FLAGS" > "$FLAGS_DIR/cpp_flags"
468+
echo -n "$AS_FLAGS" > "$FLAGS_DIR/S_flags"
469+
echo -n "$LD_FLAGS" > "$FLAGS_DIR/ld_flags"
470+
echo -n "$LD_SCRIPTS" > "$FLAGS_DIR/ld_scripts"
471+
echo -n "$AR_LIBS" > "$FLAGS_DIR/ld_libs"
472+
482473

483474
# sdkconfig
484475
cp -f "sdkconfig" "$AR_SDK/sdkconfig"

tools/copy-to-arduino.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ fi
1616

1717
echo "Installing new libraries to $ESP32_ARDUINO"
1818

19-
rm -rf $ESP32_ARDUINO/tools/sdk $ESP32_ARDUINO/tools/gen_esp32part.py $ESP32_ARDUINO/tools/platformio-build-*.py $ESP32_ARDUINO/platform.txt
19+
rm -rf $ESP32_ARDUINO/tools/sdk $ESP32_ARDUINO/tools/gen_esp32part.py $ESP32_ARDUINO/tools/platformio-build-*.py
2020

21-
cp -f $AR_OUT/platform.txt $ESP32_ARDUINO/
2221
cp -f $AR_OUT/package_esp32_index.template.json $ESP32_ARDUINO/package/package_esp32_index.template.json
2322
cp -Rf $AR_TOOLS/sdk $ESP32_ARDUINO/tools/
2423
cp -f $AR_TOOLS/gen_esp32part.py $ESP32_ARDUINO/tools/

tools/gen_tools_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"url": tool_data['url'],
8585
"archiveFileName": os.path.basename(tool_data['url']),
8686
"checksum": "SHA-256:"+tool_data['sha256'],
87-
"size": tool_data['size']
87+
"size": str(tool_data['size'])
8888
}
8989

9090
if arch == "win32":

tools/update-components.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ if [ -z $AR_BRANCH ]; then
4747
fi
4848

4949
if [ "$AR_BRANCH" ]; then
50+
echo "AR_BRANCH='$AR_BRANCH'"
5051
git -C "$AR_COMPS/arduino" checkout "$AR_BRANCH" && \
5152
git -C "$AR_COMPS/arduino" fetch && \
5253
git -C "$AR_COMPS/arduino" pull --ff-only
@@ -97,11 +98,11 @@ if [ $? -ne 0 ]; then exit 1; fi
9798
# CLONE/UPDATE ESP-DSP
9899
#
99100
echo "Updating ESP-DSP..."
100-
if [ ! -d "$AR_COMPS/esp-dsp" ]; then
101-
git clone $DSP_REPO_URL "$AR_COMPS/esp-dsp"
101+
if [ ! -d "$AR_COMPS/espressif__esp-dsp" ]; then
102+
git clone $DSP_REPO_URL "$AR_COMPS/espressif__esp-dsp"
102103
else
103-
git -C "$AR_COMPS/esp-dsp" fetch && \
104-
git -C "$AR_COMPS/esp-dsp" pull --ff-only
104+
git -C "$AR_COMPS/espressif__esp-dsp" fetch && \
105+
git -C "$AR_COMPS/espressif__esp-dsp" pull --ff-only
105106
fi
106107
if [ $? -ne 0 ]; then exit 1; fi
107108

0 commit comments

Comments
 (0)