esp32c3 set-target

borisbergman
Posts: 4
Joined: Mon Feb 27, 2023 4:24 pm

esp32c3 set-target

Postby borisbergman » Mon Feb 27, 2023 5:45 pm

I use vscode, esp-idf 5.0.1 and ubuntu 22.04. When I open an Example (gatt_client in this case, but also hello_world), and try to adjust the target to esp32c3 (or any other esp32 patform) I get this message. IDF_TARGET variable points to "esp32". What goes wrong and how to I fix this?

Code: Select all

$ idf.py set-target esp32c3
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory '/home/bergm006/esp-projects/hello_world/build' not found. Nothing to clean.
Executing action: set-target
Set Target to: esp32c3, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old.
Running cmake in directory /home/bergm006/esp-projects/hello_world/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/bergm006/.espressif/python_env/idf5.0_py3.10_env/bin/python -DESP_PLATFORM=1 -DIDF_TARGET=esp32c3 -DCCACHE_ENABLE=0 /home/bergm006/esp-projects/hello_world"...
CMake Error at /home/bergm006/esp/esp-idf/tools/cmake/targets.cmake:19 (message):
  IDF_TARGET in CMake cache does not match IDF_TARGET environment variable.
  To change the target, clear the build directory and sdkconfig file, and
  build the project again
Call Stack (most recent call first):
  /home/bergm006/esp/esp-idf/tools/cmake/project.cmake:7 (__target_init)
  CMakeLists.txt:5 (include)


-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the /home/bergm006/esp-projects/hello_world/build/log/idf_py_stderr_output_529336 and /home/bergm006/esp-projects/hello_world/build/log/idf_py_stdout_output_529336

ESP_Sprite
Posts: 9769
Joined: Thu Nov 26, 2015 4:08 am

Re: esp32c3 set-target

Postby ESP_Sprite » Tue Feb 28, 2023 1:02 am

Did you try clearing (or removing entirely) the build directory, as the message said?

borisbergman
Posts: 4
Joined: Mon Feb 27, 2023 4:24 pm

Re: esp32c3 set-target

Postby borisbergman » Tue Feb 28, 2023 8:02 am

Well as far as I can see the message sais no build directory found, nothing to clean, which corresponds to having no build directory. I found out it's caused by the vscode esp-idf terminal window. When I open a regular terminal and run . ~/esp/esp-idf/export.sh the conversion works fine.

Who is online

Users browsing this forum: No registered users and 91 guests