Closed blakjak44 closed 3 years ago
I think I came across this issue when migrating to esp-idf 4.2 too. Check out the cmakelists file in this repository. It should help with fixing the issue
Hello ,
Were you able to fix the build issue?
Just got around to this now. I tried @Johnnyjax's suggestion and tried copying the CMakeList.txt
file from that repo but still got a compilation error. I just ran the test quickly and only modified a couple lines so it's possible that I need to configure it properly. I'm going to try just cloning that repo and building from that when I have chance.
I will say that I didn't get the error add_executable cannot create target "dev_app" because another target with the same name already exists
, but that's likely because add_executable
call has been removed.
@pvyawaha I was able to get the build to work using the example repo mentioned by @Johnnyjax. Considering the cmakelists deviates quite a bit for idf v4.2, the docs in the Getting Started guide should be updated.
@blakjak44, great that you have been able to get the custom CMake project building. Thank you for notifying about the documentation issues in the guide. We will look to update the instructions soon.
Briefly summarize the issue being raised Compilation was working fine earlier this year but since switching to ESP-IDF v4.2 and updating to the newest freertos version I am getting the following compilation error:
CMake Error at freertos/vendors/espressif/boards/esp32/CMakeLists.txt:455 (add_executable): add_executable cannot create target "dev_app" because another target with the same name already exists. The existing target is an executable created in source directory "~/afr-dev".
Describe the desired outcome I expect the project to compile so that I can flash the board.
System information
References Compilation Command:
./freertos/vendors/espressif/esp-idf/tools/idf.py -DCOMPILER=xtensa-esp32 build
Compilation Log:
Code/Steps to reproduce the current status Project Structure:
CMakeLists.text:
main.c:
Additional context If I run the identical compilation command inside freertos to build the demo project, the project compiles fine. This is only when building a custom project that consumes freertos.