Open UnforeseenOcean opened 1 month ago
I recommend using the IDF release/v5.2 version. It worked normally for me.
I figured out the sequence of steps to take to undo the damage mixed versions cause.
git config --global core.symlinks true
git clone -b v4.4-a2dp-sink-codecs https://github.com/cfint/esp-idf.git --recurse-submodules
git clone https://github.com/cfint/esp32-a2dp-sink.git --recurse-submodules
./.vscode/c_cpp_properties.json (check compilerPath, includePath and browse path to make sure both IDF and ADF paths are included)
./.vscode/settings.json (check idf.espIdfPath, idf.espIdfPathWin, idf.espAdfPath, idf.espAdfPathWin, idf.pythonBinPathWin, idf.customExtraPaths, OPENOCD_SCRIPTS, idf.gitPathWin)
Pay VERY close attention to idf.customExtraPaths
as they contain paths to ALL required tools. You'll encounter all sorts of weird errors if you make a typo or leave something outdated here.
NOTE: Make sure you add path to the ESP-IDF Python environment and while doing so, make sure to use the py_env
version of the path for Python (i.e. C:\Users\User\.espressif\python_env\idf4.4_py3.8_env\Scripts
) else you will encounter errors.
PROJECT_NAME := your_project_name
include $(IDF_PATH)/project.mk
# Change to: include $(ADF_PATH)/project.mk
cmake_minimum_required(VERSION 3.5)
include($ENV{ADF_PATH}/CMakeLists.txt)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(your_project_name)
While doing this, you might want to use a tool named Voidtools Everything as this makes finding those folders and executables extremely easy.
If the build failed (evidenced by the FreeRTOS include failures), you need to remove the build
folder too.
>ESP-IDF: Run idf.py reconfigure task
>C/C++: Rescan workspace
>C/C++: Reset IntelliSense database
It seems like if you use a custom version or something installed outside of the extension for the ESP-IDF environment, the default version of the tools installed after it is fixed to v5.0 instead of v4.4 as it should be, even if you have .git
folder. This causes another layer of path confusion.
You're right, very cool work!
Environment
Problem Description
Using any part of ESP-ADF in the project will cause "cannot open source file" error (such as
audio_common.h
)However, using idf.py to test its installation status works fine.
Expected Behavior
The header files are included with no issues.
Actual Behavior
Visual Studio Code refuses to accept the
components
folder and causes compile errors when any of the ESP-ADF components are used.Steps to Reproduce
install.bat
for ESP-IDFexport.bat
for ESP-IDFinstall.bat
for ESP-ADFexport.bat
for ESP-ADFCode to Reproduce This Issue
sdkconfig