Skip to content

menuconfig fails on Windows when using multiple shields #105265

Description

@Piziwate

Describe the bug

On Windows, running west build -t menuconfig fails if multiple shields are specified (e.g., --shield shield1 --shield shield2).

The issue occurs because the SHIELD_AS_LIST environment variable, which contains a semicolon-separated list of shields, is not correctly handled when passed to the Kconfig python scripts via cmake -E env within the Ninja build rules.

The Windows shell (cmd.exe) appears to misinterpret the semicolon-separated list, causing cmake -E env to treat the subsequent shield names as the command to execute.

Steps to reproduce

Using a Windows environment, select any board and specify at least two shields.

Run the following command:

west build -b <board_name> --shield <shield1> --shield <shield2> -t menuconfig

Observe the error:

no such file or directory
FAILED: CMakeFiles/menuconfig

The build system fails with a "no such file or directory" error because the command line for the menuconfig target is improperly parsed by the shell.

Impact

Significant blocker for multi-shield development on Windows; prevents the use of interactive configuration tools.

Environment

  • OS: Windows
  • Build Tool: Ninja / CMake
  • Zephyr Version: 4.x (main)

Activity

  1. added
    bugThe issue is a bug, or the PR is fixing a bug
    on Mar 11, 2026
  2. added theissue type on Mar 11, 2026
  3. CharlesDias commented on Mar 26, 2026

    @CharlesDias
    Contributor

    Hi everyone.

    This problem also occurs in Ubuntu 24.04 LTS. I'm using the Zephyr version: 4.4.0-rc1 (commit 3628e91)

    I can build
    west build -p -b nucleo_f401re --shield x_nucleo_idb05a1 --shield x_nucleo_iks01a1 samples/hello_world

    But I get an error for
    west build -t menuconfig

    Thank you.

  4. Piziwate commented on Apr 14, 2026

    @Piziwate
    ContributorAuthor

    I have tested PR #106791 and I confirm that it fixes the issue encountered. Thank you for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions