Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got CMake issues with set-target ESP32C6 command (IDFGH-9456) #10823

Closed
3 tasks done
Quynh-Nguyen opened this issue Feb 22, 2023 · 15 comments
Closed
3 tasks done

Got CMake issues with set-target ESP32C6 command (IDFGH-9456) #10823

Quynh-Nguyen opened this issue Feb 22, 2023 · 15 comments
Assignees
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@Quynh-Nguyen
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.1-master-045163a2ec99eb3cb7cc69e2763afd145156c4cf

Operating System used.

macOS

How did you build your project?

Command line with CMake

If you are using Windows, please specify command line type.

None

What is the expected behavior?

Able to set-target to the chip. It's working well with version 4.3
But version 4.3 not supported ESP32C6 yet.

What is the actual behavior?

Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/connectedhomeip/.environment/pigweed-venv/bin/python -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=0 /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world"...
-- Found Git: /opt/homebrew/bin/git (found version "2.34.0")
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/whyn4/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/whyn4/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc - 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: /Users/whyn4/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
CMake Error at /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/tools/cmake/build.cmake:542 (message):
  usage: __main__.py [-h] [--project_dir PROJECT_DIR]

                     [--interface_version {0,1}]
                     {prepare_dependencies,inject_requirements,inject_requrements}
                     ...

  __main__.py: error: argument --interface_version: invalid choice: 2 (choose
  from 0, 1)

Call Stack (most recent call first):
  /Users/whyn4/Projects/RESEARCH/MATTER_IDF_MASTER/esp-idf/tools/cmake/project.cmake:453 (idf_build_process)
  CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
See also "/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1, output of the command is in the /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build/log/idf_py_stderr_output_12445 and /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build/log/idf_py_stdout_output_12445
The test for idf_size has failed. Please examine the artifacts.

Steps to reproduce.

  1. Execute ./install.sh
  2. Execute ./export.sh
  3. Run the command: ./tools/test_idf_size/test.sh

Build or installation Logs.

-- sys -------------------------------------------------------
               coverage_version: 7.1.0
                coverage_module: /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/connectedhomeip/.environment/pigweed-venv/lib/python3.11/site-packages/coverage/__init__.py
                         tracer: -none-
                        CTracer: available
           plugins.file_tracers: -none-
            plugins.configurers: -none-
      plugins.context_switchers: -none-
              configs_attempted: .coveragerc
                                 setup.cfg
                                 tox.ini
                                 pyproject.toml
                   configs_read: -none-
                    config_file: None
                config_contents: -none-
                      data_file: -none-
                         python: 3.11.2 (main, Feb 13 2023, 03:26:52) [Clang 14.0.0 (clang-1400.0.29.202)]
                       platform: macOS-12.0-arm64-arm-64bit
                 implementation: CPython
                     executable: /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/connectedhomeip/.environment/pigweed-venv/bin/python
                   def_encoding: utf-8
                    fs_encoding: utf-8
                            pid: 12425
                            cwd: /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf
                           path: /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf
                                 /opt/homebrew/Cellar/python@3.11/3.11.2/Frameworks/Python.framework/Versions/3.11/lib/python311.zip
                                 /opt/homebrew/Cellar/python@3.11/3.11.2/Frameworks/Python.framework/Versions/3.11/lib/python3.11
                                 /opt/homebrew/Cellar/python@3.11/3.11.2/Frameworks/Python.framework/Versions/3.11/lib/python3.11/lib-dynload
                                 /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/connectedhomeip/.environment/pigweed-venv/lib/python3.11/site-packages
                    environment: CONDA_PYTHON_EXE = /Users/whyn4/opt/anaconda3/bin/python
                                 HOME = /Users/whyn4
                                 IDF_PYTHON_ENV_PATH = /Users/whyn4/.espressif/python_env/idf5.1_py3.8_env
                                 PW_PYTHON_CIPD_INSTALL_DIR = /Users/whyn4/Projects/RESEARCH/MATTER_IDF_MASTER/connectedhomeip/.environment/cipd/packages/python
                                 VIRTUALENVWRAPPER_PYTHON = /usr/local/bin/python3
                   command_line: /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/connectedhomeip/.environment/pigweed-venv/lib/python3.11/site-packages/coverage/__main__.py debug sys
         sqlite3_sqlite_version: 3.40.1
             sqlite3_temp_store: 0
        sqlite3_compile_options: ATOMIC_INTRINSICS=1, COMPILER=clang-14.0.0, DEFAULT_AUTOVACUUM,
                                 DEFAULT_CACHE_SIZE=-2000, DEFAULT_FILE_FORMAT=4,
                                 DEFAULT_JOURNAL_SIZE_LIMIT=-1, DEFAULT_MMAP_SIZE=0, DEFAULT_PAGE_SIZE=4096,
                                 DEFAULT_PCACHE_INITSZ=20, DEFAULT_RECURSIVE_TRIGGERS,
                                 DEFAULT_SECTOR_SIZE=4096, DEFAULT_SYNCHRONOUS=2,
                                 DEFAULT_WAL_AUTOCHECKPOINT=1000, DEFAULT_WAL_SYNCHRONOUS=2,
                                 DEFAULT_WORKER_THREADS=0, ENABLE_COLUMN_METADATA, ENABLE_FTS3,
                                 ENABLE_FTS3_PARENTHESIS, ENABLE_FTS4, ENABLE_FTS5, ENABLE_GEOPOLY,
                                 ENABLE_MATH_FUNCTIONS, ENABLE_PREUPDATE_HOOK, ENABLE_RTREE, ENABLE_SESSION,
                                 MALLOC_SOFT_LIMIT=1024, MAX_ATTACHED=10, MAX_COLUMN=2000,
                                 MAX_COMPOUND_SELECT=500, MAX_DEFAULT_PAGE_SIZE=8192, MAX_EXPR_DEPTH=1000,
                                 MAX_FUNCTION_ARG=127, MAX_LENGTH=1000000000, MAX_LIKE_PATTERN_LENGTH=50000,
                                 MAX_MMAP_SIZE=0x7fff0000, MAX_PAGE_COUNT=1073741823, MAX_PAGE_SIZE=65536,
                                 MAX_SQL_LENGTH=1000000000, MAX_TRIGGER_DEPTH=1000,
                                 MAX_VARIABLE_NUMBER=250000, MAX_VDBE_OP=250000000, MAX_WORKER_THREADS=8,
                                 MUTEX_PTHREADS, SYSTEM_MALLOC, TEMP_STORE=1, THREADSAFE=1
~/Projects/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world ~/Projects/RESEARCH/MATTER_IDF_MASTER/esp-idf
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory '/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build' not found. Nothing to clean.
Executing action: set-target
Set Target to: esp32, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old.
Running cmake in directory /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/connectedhomeip/.environment/pigweed-venv/bin/python -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=0 /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world"...
-- Found Git: /opt/homebrew/bin/git (found version "2.34.0")
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/whyn4/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/whyn4/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc - 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: /Users/whyn4/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
CMake Error at /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/tools/cmake/build.cmake:542 (message):
  usage: __main__.py [-h] [--project_dir PROJECT_DIR]

                     [--interface_version {0,1}]
                     {prepare_dependencies,inject_requirements,inject_requrements}
                     ...

  __main__.py: error: argument --interface_version: invalid choice: 2 (choose
  from 0, 1)

Call Stack (most recent call first):
  /Users/whyn4/Projects/RESEARCH/MATTER_IDF_MASTER/esp-idf/tools/cmake/project.cmake:453 (idf_build_process)
  CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
See also "/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1, output of the command is in the /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build/log/idf_py_stderr_output_12445 and /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build/log/idf_py_stdout_output_12445
The test for idf_size has failed. Please examine the artifacts.

More Information.

No response

@Quynh-Nguyen Quynh-Nguyen added the Type: Bug bugs in IDF label Feb 22, 2023
@github-actions github-actions bot changed the title Got CMake issues with set-target ESP32C6 command Got CMake issues with set-target ESP32C6 command (IDFGH-9456) Feb 22, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label Feb 22, 2023
@dobairoland
Copy link
Collaborator

Hi @Quynh-Nguyen.

The reported issues are not even happening for ESP32-C6. All of them are for ESP32:

-- Building ESP-IDF components for target esp32

BTW, why would you want to run ./tools/test_idf_size/test.sh? That is an internal test script.

If you want to try ESP32-C6 support then please got to an ESP-IDF project, e.g. https://github.com/espressif/esp-idf/tree/master/examples/get-started/hello_world and run there idf.py --preview set-target esp32c6. It should work.

Please be aware that full ESP32-C6 support is not ready yet (see #10423). This chip will be supported in ESP-IDF v5.1 which will be released in a couple of Months.

@Quynh-Nguyen
Copy link
Author

Quynh-Nguyen commented Feb 23, 2023

@dobairoland

I'm getting the same issue with the hello_word get started step.
The test run also pointing to hello_word example too, @dobairoland

MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world > master  idf.py --preview set-target esp32c6                                      
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory '/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build' not found. Nothing to clean.
Executing action: set-target
Set Target to: esp32c6, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old.
Running cmake in directory /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/connectedhomeip/.environment/pigweed-venv/bin/python -DESP_PLATFORM=1 -DIDF_TARGET=esp32c6 -DCCACHE_ENABLE=0 /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world"...
-- Found Git: /opt/homebrew/bin/git (found version "2.34.0")
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /Users/whyn4/.espressif/tools/riscv32-esp-elf/esp-2022r1-11.2.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/whyn4/.espressif/tools/riscv32-esp-elf/esp-2022r1-11.2.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc - 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: /Users/whyn4/.espressif/tools/riscv32-esp-elf/esp-2022r1-11.2.0/riscv32-esp-elf/bin/riscv32-esp-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32c6
CMake Error at /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/tools/cmake/build.cmake:542 (message):
  usage: __main__.py [-h] [--project_dir PROJECT_DIR]

                     [--interface_version {0,1}]
                     {prepare_dependencies,inject_requirements,inject_requrements}
                     ...

  __main__.py: error: argument --interface_version: invalid choice: 2 (choose
  from 0, 1)

Call Stack (most recent call first):
  /Users/whyn4/Projects/RESEARCH/MATTER_IDF_MASTER/esp-idf/tools/cmake/project.cmake:453 (idf_build_process)
  CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
See also "/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1, output of the command is in the /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build/log/idf_py_stderr_output_72083 and /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build/log/idf_py_stdout_output_72083

@Quynh-Nguyen
Copy link
Author

@dobairoland
Do we have any under-development branch able to work with, especially ESP32C6, Roland?

@dobairoland
Copy link
Collaborator

Have you run install.sh and source export.sh in the terminal where you are attempting to run idf.py set-target?

Do we have any under-development branch able to work with, especially ESP32C6

That would be the master branch you already using.

@Quynh-Nguyen
Copy link
Author

@dobairoland

Have you run install.sh and source export.sh in the terminal where you are attempting to run idf.py set-target?

Yes, I did with no error, Roland.

@dobairoland
Copy link
Collaborator

What is the output of python -m pip freeze | grep component?

Maybe the following will solve the issue:

python -m pip install -U  idf-component-manager

@Quynh-Nguyen
Copy link
Author

Yes,

This is the result

python -m pip freeze | grep component
idf-component-manager==1.1.4

@Quynh-Nguyen
Copy link
Author

@dobairoland
Oh wow, it worked when I upgraded IDF manager.
But I'm getting another error with kconfgen module, which I am trying to resolve it now.

@Quynh-Nguyen
Copy link
Author

This is the issue I got

 No module named kconfgen.__main__; 'kconfgen' is a package and cannot be directly executed
CMake Error at /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/tools/cmake/kconfig.cmake:176 (message):
  Failed to run kconfgen
  (/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/connectedhomeip/.environment/pigweed-venv/bin/python;-m;kconfgen;--list-separator=semicolon;--kconfig;/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/Kconfig;--sdkconfig-rename;/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/sdkconfig.rename;--config;/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/sdkconfig;--env-file;/usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/examples/get-started/hello_world/build/config.env).
  Error 1
Call Stack (most recent call first):
  /usr/local/var/www/RESEARCH/MATTER_IDF_MASTER/esp-idf/tools/cmake/build.cmake:613 (__kconfig_generate_config)
  /Users/whyn4/Projects/RESEARCH/MATTER_IDF_MASTER/esp-idf/tools/cmake/project.cmake:453 (idf_build_process)
  CMakeLists.txt:6 (project)

@dobairoland
Copy link
Collaborator

You can try the same:

python -m pip freeze | grep kconfig

and

python -m pip install -U esp-idf-kconfig

@dobairoland
Copy link
Collaborator

Note: The component manager issue was resolved by setting idf-component-manager~=1.2 at https://dl.espressif.com/dl/esp-idf/espidf.constraints.v5.1.txt. The change will appear soon.

@Quynh-Nguyen
Copy link
Author

@dobairoland
Thank you so much, Roland
It's worked well now.

@dobairoland
Copy link
Collaborator

Oh, great!

@espressif-bot espressif-bot added Resolution: Won't Do This will not be worked on Status: Done Issue is done internally and removed Status: Opened Issue is new labels Feb 24, 2023
@jiapei100
Copy link

@dobairoland
@Quynh-Nguyen

Any other work-around if I insist on using idf-component-manager>=1.4 ??

@dobairoland
Copy link
Collaborator

dobairoland commented Feb 5, 2024

Re-running the install script will install the latest version of the component manager.

Ok, lets discuss this in your issue report: #13102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Won't Do This will not be worked on Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

4 participants