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

Cannot build i2s_basic demos on Windows (IDFGH-13912) #14751

Closed
3 tasks done
xobs opened this issue Oct 18, 2024 · 2 comments
Closed
3 tasks done

Cannot build i2s_basic demos on Windows (IDFGH-13912) #14751

xobs opened this issue Oct 18, 2024 · 2 comments
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@xobs
Copy link
Contributor

xobs commented Oct 18, 2024

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.4-dev-3602-ga97a7b0962

Operating System used.

Windows

How did you build your project?

Command line with idf.py

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

PowerShell

What is the expected behavior?

I should be able to build and run commands like idf.py menuconfig

What is the actual behavior?

[9:17:41 pm] ~/esp/esp-idf/examples/peripherals/i2s/i2s_basic/i2s_std> idf.py build
Executing action: all (aliases: build)
Running cmake in directory C:\Users\Sean\esp\esp-idf\examples\peripherals\i2s\i2s_basic\i2s_std\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=C:\Espressif\python_env\idf5.4_py3.10_env\Scripts\python.exe -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 C:\Users\Sean\esp\esp-idf\examples\peripherals\i2s\i2s_basic\i2s_std"...
-- IDF_TARGET not set, using default target: esp32
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.40.0.windows.1")
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/xtensa-esp-elf/esp-14.2.0_20240906/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Espressif/tools/xtensa-esp-elf/esp-14.2.0_20240906/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc.exe - 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: C:/Espressif/tools/xtensa-esp-elf/esp-14.2.0_20240906/xtensa-esp-elf/bin/xtensa-esp32-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
CMake Error at build/component_requires.temp.cmake:4 (__component_set_property):
  Syntax error in cmake code at

    C:/Users/Sean/esp/esp-idf/examples/peripherals/i2s/i2s_basic/i2s_std/build/component_requires.temp.cmake:4

  when parsing string

    .;C:\Users\Sean\esp\esp-idf/examples/peripherals/i2s/common

  Invalid character escape '\U'.
Call Stack (most recent call first):
  C:/Users/Sean/esp/esp-idf/tools/cmake/component.cmake:258 (include)
  C:/Users/Sean/esp/esp-idf/tools/cmake/build.cmake:643 (__component_get_requirements)
  C:/Users/Sean/esp/esp-idf/tools/cmake/project.cmake:710 (idf_build_process)
  CMakeLists.txt:8 (project)


-- Configuring incomplete, errors occurred!
cmake failed with exit code 1, output of the command is in the C:\Users\Sean\esp\esp-idf\examples\peripherals\i2s\i2s_basic\i2s_std\build\log\idf_py_stderr_output_65328 and C:\Users\Sean\esp\esp-idf\examples\peripherals\i2s\i2s_basic\i2s_std\build\log\idf_py_stdout_output_65328
[9:17:51 pm] ~/esp/esp-idf/examples/peripherals/i2s/i2s_basic/i2s_std>

Steps to reproduce.

  1. Try ro build examples/peripherals/i2s/i2s_basic/i2s_std on Windows

Build or installation Logs.

No response

More Information.

This is likely caused by importing $ENV{IDF_PATH} directly into INCLUDE_DIRS, which makes the variable as follows:

__component_set_property(___idf_main INCLUDE_DIRS ".;C:\Users\Sean\esp\esp-idf/examples/peripherals/i2s/common")

It's complaining about C:\U

@xobs xobs added the Type: Bug bugs in IDF label Oct 18, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Oct 18, 2024
@github-actions github-actions bot changed the title Cannot build i2s_basic demos on Windows Cannot build i2s_basic demos on Windows (IDFGH-13912) Oct 18, 2024
@dothanhdat1413
Copy link

This is due to the reference address in Window. I fixed this by replacing the $ENV{IDF_PATH} in main/CMakeLists.txt with the real address in my computer. It works but I think that this way is just a temporary solution to run the example once.

idf_component_register(SRCS "${srcs}"
PRIV_REQUIRES esp_driver_i2s esp_driver_gpio
INCLUDE_DIRS "." "$ENV{IDF_PATH}/examples/peripherals/i2s/common")

replace $ENV{IDF_PATH} with the address in computer

@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed and removed Status: Opened Issue is new labels Dec 10, 2024
@L-KAYA
Copy link
Collaborator

L-KAYA commented Dec 10, 2024

Hi @xobs, thanks for your feedback! Indeed, the absolute include path has slash & backslash issue on windows. It will be fixed by making the common dependencies an example common component.

cc @dothanhdat1413 , thanks for your answer!

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Reviewing Issue is being reviewed labels Dec 12, 2024
espressif-bot pushed a commit that referenced this issue Dec 25, 2024
Closes #14751

Make the common I2S dependencies as an example common component,
so that to avoid slash & backslash issue on windows
when use absolute include path.
espressif-bot pushed a commit that referenced this issue Dec 25, 2024
Closes #14751

Make the common I2S dependencies as an example common component,
so that to avoid slash & backslash issue on windows
when use absolute include path.
espressif-bot pushed a commit that referenced this issue Jan 7, 2025
Closes #14751

Make the common I2S dependencies as an example common component,
so that to avoid slash & backslash issue on windows
when use absolute include path.
espressif-bot pushed a commit that referenced this issue Jan 15, 2025
Closes #14751

Make the common I2S dependencies as an example common component,
so that to avoid slash & backslash issue on windows
when use absolute include path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

4 participants