Skip to content

Fix CMake PATH parser for Windows #100

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

coskunergan
Copy link
Contributor

Description

This pull request addresses a compilation error encountered when building the Esp32c3 (RISC-V) module on Windows using the CMake build system. The issue originated from improper handling of parent folder paths (/../) in folder addresses specified within the always-run-cargo.dummy-baee278.bat file, which is utilized by CMake during the build process.

Problem

The build system failed during compilation of the Esp32c3 module on Windows due to improper resolution of paths containing /../ in always-run-cargo.dummy-baee278.bat and the get_include_dirs function in CMakeLists.txt. These paths caused CMake to misinterpret directory references, resulting in build failures.

Examples of problematic paths include:

  • C:/zephyr/zephyrproject/modules/hal/espressif/zephyr/esp32c3/../esp_shared/include
  • C:/zephyr/zephyrproject/modules/hal/espressif/zephyr/esp32c3/../esp_shared/components/include
  • C:/zephyr/zephyrproject/modules/hal/espressif/zephyr/esp32c3/../../components/efuse/include

The correct paths should be:

  • C:/zephyr/zephyrproject/modules/hal/espressif/zephyr/esp_shared/include
  • C:/zephyr/zephyrproject/modules/hal/espressif/zephyr/esp_shared/components/include
  • C:/zephyr/zephyrproject/modules/hal/espressif/components/efuse/include

Solution

This fix updates always-run-cargo.dummy-xxx.bat to use fully resolved paths and modifies the get_include_dirs function in CMakeLists.txt to properly handle /../ paths, ensuring CMake can accurately locate the necessary directories. These changes enable successful compilation of the Esp32c3 module on Windows.

coskunergan and others added 9 commits March 14, 2025 22:56
The zephyr-build DTS parser fails on Windows, due to the "\r\n" whitespace
used on that platform. Accept the "\r" in addition to the "\n" to allow it to
parse successfully.

Fixes: zephyrproject-rtos#68
See: zephyrproject-rtos#68

Signed-off-by: coskun ergan <[email protected]>
…r stm32 series.

The zephyr-build parser was missing aux_display support, which was included and used in a demo;

https://github.com/coskunergan/zephyr_rust_demo

Signed-off-by: coskun ergan <[email protected]>
…rectly.

The build system encountered an error during compilation of the Esp32c3 (RISC-V) module on Windows. The issue was traced to incorrect handling of "/../" (parent folder path) in folder addresses within the "always-run-cargo.dummy-baee278.bat" file used by CMake. This fix resolves the issue, enabling successful compilation.

Signed-off-by: Coskun Ergan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant