support H4 BETA5 libphy

* phy_version: 101,1, 96576f4, Aug 5 2025
This commit is contained in:
lixiaofan
2025-06-24 20:31:07 +08:00
committed by zhuanghang
parent fbc304747b
commit d8e2d8760c
7 changed files with 27 additions and 40 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ check_lib_reversion:
- mkdir riscv32
- wget https://github.com/espressif/crosstool-NG/releases/download/esp-2021r2-patch3/riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz >/dev/null 2>&1
- tar -zxvf riscv32-esp-elf-gcc8_4_0-esp-2021r2-patch3-linux-amd64.tar.gz -C ./riscv32 >/dev/null 2>&1
- for dir in esp32c2 esp32c3 esp32c6 esp32h2; do test $(riscv32/riscv32-esp-elf/bin/riscv32-esp-elf-nm $dir/*.a | grep -w printf | wc -l) -eq 0; done;
- for dir in esp32c2 esp32c3 esp32c6 esp32h2; do test $(riscv32/riscv32-esp-elf/bin/riscv32-esp-elf-nm $dir/*.a | grep -w ets_printf | wc -l) -eq 0; done;
- for dir in esp32c2 esp32c3 esp32c6 esp32h2 esp32h4; do test $(riscv32/riscv32-esp-elf/bin/riscv32-esp-elf-nm $dir/*.a | grep -w printf | wc -l) -eq 0; done;
- for dir in esp32c2 esp32c3 esp32c6 esp32h2 esp32h4; do test $(riscv32/riscv32-esp-elf/bin/riscv32-esp-elf-nm $dir/*.a | grep -w ets_printf | wc -l) -eq 0; done;
- for dir in esp32 esp32s2 esp32s3; do test $(xtensa-esp32-elf-nm $dir/*.a | grep -w printf | wc -l) -eq 0; done;
- for dir in esp32 esp32s2 esp32s3; do test $(xtensa-esp32-elf-nm $dir/*.a | grep -w ets_printf | wc -l) -eq 0; done;
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+25 -38
View File
@@ -1,5 +1,7 @@
#!/bin/bash
for dir in esp32 esp32s2 esp32c3 esp32s3 esp32h2 esp32h4 esp32c2 esp32c6 esp32c5 esp32c61; do
chip_list=(esp32 esp32s2 esp32c3 esp32s3 esp32h2 esp32h4 esp32c2 esp32c6 esp32c5 esp32c61)
for dir in "${chip_list[@]}"; do
if [ $dir = esp32 ]; then
TOOLCHAIN="xtensa-esp32-elf"
elif [ $dir = esp32s2 ]; then
@@ -18,21 +20,6 @@ for dir in esp32 esp32s2 esp32c3 esp32s3 esp32h2 esp32h4 esp32c2 esp32c6 esp32c5
echo $dir/librtc.a fixed
$TOOLCHAIN-objcopy --redefine-sym ets_printf=rtc_printf librtc.a
fi
elif [ $dir = esp32h4 ]; then
for subdir in rev1 rev2 ; do
cd $subdir
git status libbtbb.a | grep "modified\|new file" >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo $dir/libbtbb.a fixed
$TOOLCHAIN-objcopy --redefine-sym ets_printf=phy_printf libbtbb.a
fi
git status libphy.a | grep "modified\|new file" >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo $dir/libphy.a fixed
$TOOLCHAIN-objcopy --redefine-sym ets_printf=phy_printf libphy.a
fi
cd ..
done
elif [ $dir != esp32s2 ]; then
git status libbtbb.a | grep "modified\|new file" >/dev/null 2>&1
if [ $? -eq 0 ]; then
@@ -45,28 +32,28 @@ for dir in esp32 esp32s2 esp32c3 esp32s3 esp32h2 esp32h4 esp32c2 esp32c6 esp32c5
echo $dir/libphy.a fixed
$TOOLCHAIN-objcopy --redefine-sym ets_printf=phy_printf libphy.a
fi
if [ $dir = esp32c3 ] || [ $dir = esp32s3 ] || [ $dir = esp32c2 ] || [ $dir = esp32c6 ] || [ $dir = esp32c5 ] || [ $dir = esp32c61 ] || [ $dir = esp32s2 ] || [ $dir = esp32h2 ] || [ $dir = esp32 ]; then
if [ $dir != esp32s2 ]; then
git status libbttestmode.a | grep "modified\|new file" >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo $dir/libbttestmode.a fixed
$TOOLCHAIN-objcopy --redefine-sym ets_printf=phy_printf libbttestmode.a
fi
fi
if [ $dir != esp32 ]; then
git status librfate.a | grep "modified\|new file" >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo $dir/librfate.a fixed
$TOOLCHAIN-objcopy --redefine-sym ets_printf=phy_printf librfate.a
fi
fi
git status librftest.a | grep "modified\|new file" >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo $dir/librftest.a fixed
$TOOLCHAIN-objcopy --redefine-sym ets_printf=phy_printf librftest.a
fi
fi
case "$dir" in
esp32c3|esp32s3|esp32c2|esp32c6|esp32c5|esp32c61|esp32s2|esp32h2|esp32h4|esp32)
if [ $dir != esp32s2 ]; then
git status libbttestmode.a | grep "modified\|new file" >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo $dir/libbttestmode.a fixed
$TOOLCHAIN-objcopy --redefine-sym ets_printf=phy_printf libbttestmode.a
fi
fi
if [ $dir != esp32 ]; then
git status librfate.a | grep "modified\|new file" >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo $dir/librfate.a fixed
$TOOLCHAIN-objcopy --redefine-sym ets_printf=phy_printf librfate.a
fi
fi
git status librftest.a | grep "modified\|new file" >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo $dir/librftest.a fixed
$TOOLCHAIN-objcopy --redefine-sym ets_printf=phy_printf librftest.a
fi
esac
cd ..
else
echo "$dir does not exist"