ESP32-C3使用ESP-IDF的I2S的时候报错

huangjun
Posts: 8
Joined: Thu May 20, 2021 2:46 am

ESP32-C3使用ESP-IDF的I2S的时候报错

Postby huangjun » Wed Aug 11, 2021 10:41 am

ESP32-C3使用ESP-IDF的I2S的时候报错,同样的代码在ESP32上运行正常
报错如下:
esp-idf-v4.3/components/driver/i2s.c:1017: undefined reference to `rtc_clk_apll_enable'
esp-idf-v4.3/components/driver/i2s.c:398: undefined reference to `rtc_clk_apll_enable'
esp-idf-v4.3/components/hal/i2s_hal.c:273: undefined reference to `I2S0'
/esp-idf-v4.3/components/hal/i2s_hal.c:273: undefined reference to `I2S0'
collect2.exe: error: ld returned 1 exit statu

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: ESP32-C3使用ESP-IDF的I2S的时候报错

Postby ESP_morris » Wed Aug 11, 2021 11:56 am

4.3还不支持,master分支已经可以跑C3的I2S了

huangjun
Posts: 8
Joined: Thu May 20, 2021 2:46 am

Re: ESP32-C3使用ESP-IDF的I2S的时候报错

Postby huangjun » Thu Aug 12, 2021 1:35 am

ESP_morris wrote:
Wed Aug 11, 2021 11:56 am
4.3还不支持,master分支已经可以跑C3的I2S了
更新到master分支以后,下载报这个错误....
Traceback (most recent call last):
File "F:\esp-idf\tools\idf.py", line 47, in <module>
from idf_py_actions.tools import executable_exists, idf_version, merge_action_lists, realpath # noqa: E402
File "F:\esp-idf\tools\idf_py_actions\tools.py", line 7, in <module>
import click
ModuleNotFoundError: No module named 'click'

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: ESP32-C3使用ESP-IDF的I2S的时候报错

Postby ESP_Gargamel » Thu Aug 12, 2021 2:24 am

./install.sh 一下

huangjun
Posts: 8
Joined: Thu May 20, 2021 2:46 am

Re: ESP32-C3使用ESP-IDF的I2S的时候报错

Postby huangjun » Thu Aug 12, 2021 2:52 am

ESP_Gargamel wrote:
Thu Aug 12, 2021 2:24 am
./install.sh 一下
我是使用ESP IDE下载的master,下载完以后在Install Tools下配置好了ESP-IDF Directory的路径。并且使用Git CMD运行了install.sh,编译代码没有提示错误,下载时还是提醒
Traceback (most recent call last):
File "F:\esp-idf\tools\idf.py", line 36, in <module>
from idf_py_actions.tools import executable_exists, idf_version, merge_action_lists, realpath # noqa: E402
File "F:\esp-idf\tools\idf_py_actions\tools.py", line 7, in <module>
import click
ModuleNotFoundError: No module named 'click'
新建工程时,新工程里面没有sdkconfig

L-KAYA
Posts: 22
Joined: Thu Aug 12, 2021 3:44 am

Re: ESP32-C3使用ESP-IDF的I2S的时候报错

Postby L-KAYA » Thu Aug 12, 2021 3:53 am

注意切换版本时需要执行以下操作:
1. 工程目录下执行rm -rf build
2. 在esp-idf目录下执行./install.sh
3. 重新打开terminal(注意在原terminal重新export不一定有用)
4. 在新terminal中执行./export.sh

huangjun
Posts: 8
Joined: Thu May 20, 2021 2:46 am

Re: ESP32-C3使用ESP-IDF的I2S的时候报错

Postby huangjun » Sat Aug 14, 2021 2:12 am

L-KAYA wrote:
Thu Aug 12, 2021 3:53 am
注意切换版本时需要执行以下操作:
1. 工程目录下执行rm -rf build
2. 在esp-idf目录下执行./install.sh
3. 重新打开terminal(注意在原terminal重新export不一定有用)
4. 在新terminal中执行./export.sh
尝试了很多次还是报错,使用的Eclipse IDE(离线安装包2.10),使用IDE下载的master工程。楼上的方法都尝试过了
Building in: C:\Users\Baoan\eclipse-workspace(1)\hello_world\build
Configuring in: C:\Users\Baoan\eclipse-workspace(1)\hello_world\build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=F:\esp-idf\esp-idf\tools\cmake\toolchain-esp32c3.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCCACHE_ENABLE=1 -DIDF_TARGET=esp32c3 C:\Users\Baoan\eclipse-workspace(1)\hello_world
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.32.0.windows.2")
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/Baoan/.espressif/tools/riscv32-esp-elf/1.24.0.123_64eb9ff-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/Baoan/.espressif/tools/riscv32-esp-elf/1.24.0.123_64eb9ff-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Users/Baoan/.espressif/tools/riscv32-esp-elf/1.24.0.123_64eb9ff-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32c3
-- Checking Python dependencies...
The following Python requirements are not satisfied:
gdbgui==0.13.2.0
pygdbmi<=0.9.0.2
python-socketio<5
kconfiglib==13.7.1
reedsolo>=1.5.3,<=1.5.4
bitstring>=3.1.6
ecdsa>=0.16.0
construct==2.10.54
esp-windows-curses; sys_platform == 'win32'
To install the missing packages, please run "F:\esp-idf\esp-idf\install.bat"
Diagnostic information:
IDF_PYTHON_ENV_PATH: C:\Users\Baoan\.espressif\python_env\idf4.3_py3.8_env
Python interpreter used: C:/Program Files (x86)/AiThinkerIDE_V1.5.2/msys32/mingw32/bin/python.exe
Warning: python interpreter not running from IDF_PYTHON_ENV_PATH
PATH: C:\Program Files (x86)\AiThinkerIDE_V1.5.2\msys32\mingw32\bin;C:\Users\Baoan\.espressif\tools\riscv32-esp-elf\1.24.0.123_64eb9ff-8.4.0\riscv32-esp-elf\bin;C:\Users\Baoan\.espressif\tools\xtensa-esp32-elf\esp-2021r1-8.4.0\xtensa-esp32-elf\bin;C:\Users\Baoan\.espressif\tools\xtensa-esp32s2-elf\esp-2021r1-8.4.0\xtensa-esp32s2-elf\bin;C:\Users\Baoan\.espressif\tools\xtensa-esp32s3-elf\esp-2021r1-8.4.0\xtensa-esp32s3-elf\bin;C:\Users\Baoan\.espressif\tools\riscv32-esp-elf\esp-2021r1-8.4.0\riscv32-esp-elf\bin;C:\Users\Baoan\.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin;C:\Users\Baoan\.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin;C:\Users\Baoan\.espressif\tools\cmake\3.20.3\bin;C:\Users\Baoan\.espressif\tools\openocd-esp32\v0.10.0-esp32-20210721\openocd-esp32\bin;C:\Users\Baoan\.espressif\tools\ninja\1.10.2\;C:\Users\Baoan\.espressif\tools\idf-exe\1.0.1\;C:\Users\Baoan\.espressif\tools\ccache\4.3\ccache-4.3-windows-64;C:\Users\Baoan\.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64;F:\esp-idf\esp-idf\tools;C:/Users/Baoan/.espressif/tools/idf-eclipse/2021-07//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_16.0.1.v20210528-1205/jre/bin/server;C:/Users/Baoan/.espressif/tools/idf-eclipse/2021-07//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_16.0.1.v20210528-1205/jre/bin;E:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\Program Files (x86)\AiThinkerIDE_V1.5.2\msys32\mingw32\bin;C:\Program Files (x86)\AiThinkerIDE_V1.5.2\msys32\opt\esp32\xtensa-esp32-elf-5.0\bin;C:\Program Files (x86)\AiThinkerIDE_V1.5.2\msys32\opt\esp8266\v5.2.0_for_3.0\bin;C:\Program Files (x86)\AiThinkerIDE_V1.5.2\msys32\usr\bin;C:\Program Files (x86)\RV32-Toolchain\bin;C:\Program Files\TortoiseSVN\bin;C:\Users\Baoan\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Bandizip\;C:\Users\Baoan\AppData\Local\Programs\Microsoft VS Code\bin;c:\JL\commtools;c:\JL\dv10\bin;c:\JL\dv12\bin;c:\JL\mc\bin;c:\JL\pi32\bin;C:\Users\Baoan\.dotnet\tools;F:\Users\Desktop\esp-idfV4.3;C:\Program Files\Git\bin;C:\Users\Baoan\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin;C:\Users\Baoan\.espressif\tools\xtensa-esp32s2-elf\esp-2020r3-8.4.0\xtensa-esp32s2-elf\bin;C:\Users\Baoan\.espressif\tools\xtensa-esp32s3-elf\esp-2020r3-8.4.0\xtensa-esp32s3-elf\bin;C:\Users\Baoan\.espressif\tools\cmake\3.16.4\bin;C:\Users\Baoan\.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401\openocd-esp32\bin;C:\Users\Baoan\.espressif\tools\ccache\3.7\;C:\Users\Baoan\.espressif\python_env\idf4.3_py3.8_env\Scripts;F:\Users\Desktop\esp-idfV4.3\tools;C:\Users\Baoan\.espressif\tools\idf-git\2.30.1\cmd
CMake Error at F:/esp-idf/esp-idf/tools/cmake/build.cmake:281 (message):
Some Python dependencies must be installed. Check above message for
-- Configuring incomplete, errors occurred!
See also "C:/Users/Baoan/eclipse-workspace(1)/hello_world/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Baoan/eclipse-workspace(1)/hello_world/build/CMakeFiles/CMakeError.log".
details.
Call Stack (most recent call first):
F:/esp-idf/esp-idf/tools/cmake/build.cmake:410 (__build_check_python)
F:/esp-idf/esp-idf/tools/cmake/project.cmake:361 (idf_build_process)
CMakeLists.txt:6 (project)


cmake --build . -- -v
ninja: error: loading 'build.ninja': 系统找不到指定的文件。


Build complete (0 errors, 0 warnings): C:\Users\Baoan\eclipse-workspace(1)\hello_world\build
Total time taken to build the project: 9,443 ms
QQ截图20210814101102.png
QQ截图20210814101102.png (10.86 KiB) Viewed 7752 times
QQ截图20210814101053.png
QQ截图20210814101053.png (46.49 KiB) Viewed 7752 times
QQ截图20210814101017.png
QQ截图20210814101017.png (22.57 KiB) Viewed 7752 times

L-KAYA
Posts: 22
Joined: Thu Aug 12, 2021 3:44 am

Re: ESP32-C3使用ESP-IDF的I2S的时候报错

Postby L-KAYA » Mon Aug 16, 2021 7:45 am

看报错好像是python环境少了一些依赖,要不试试“python -m pip install --upgrade pip”然后再执行一下那四步?最好是重新安装一下python环境,可能新版本中有一些新的依赖在install的时候没被下载

Who is online

Users browsing this forum: No registered users and 31 guests