Closed AshUK closed 2 years ago
The problem is that we used to add clang compiler to a distribution of the GCC toolchain (since we didn't have the standalone clang based toolchain yet.)
If instead of adding clang to the PATH manually you let idf_tools.py install the clang toolchain, it should work:
$IDF_PATH/tools/idf_tools.py install xtensa-clang
. $IDF_PATH/export.sh
idf.py fullclean #just in case
idf.py clang-check
This way, the GCC toolchain expected by the build system will be first in the PATH, so CMake will find it. And clang will still be available, just later in the PATH.
In IDF v5.x we are adding support for clang toolchain in the build system, so the need for such a "Frankenstein" toolchain is removed. (There is a related issue https://github.com/espressif/clang-tidy-runner/issues/8)
this resolves the issues thank you
ESP_IDF=4.4.2 macOS=12.5.1
Add clang tool chain to the path:
PATH="/Users/ash/.espressif/tools/xtensa-clang/12.0.1-d9341b81fc/xtensa-esp32-elf-clang/bin:$PATH"
run-clang-tidy-py
andexclude-paths
options appears to be have now been removed.Our run command is as follows:
idf.py clang-check
Not sure where is esp-2021r1 is coming from as my machine only has the latest esp-idf-4.4.2 installed.