zephyr: Windows compilation error

Discussed in https://github.com/zephyrproject-rtos/zephyr/discussions/85747

<div type='discussions-op-text'>

Originally posted by ofirshe February 13, 2025 Hi, I’ve rebased onto the latest Zephyr commit (8b80c209446d8bbe9b454b91773ace14ac40d4c2) and I’m encountering compilation errors related to YAML and JSON escaping that I’ve never seen before.

Can someone help me debug this?

C:\Users\ofirs\bsp>west build -b mimxrt1060_evk
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/Users/ofirs/bsp
-- CMake version: 3.29.1
-- Found Python3: C:/Python312/python.exe (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: C:/Users/ofirs/bsp/zephyr/.cache
-- Zephyr version: 4.0.99 (C:/Users/ofirs/bsp/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
CMake Warning at zephyr/cmake/modules/boards.cmake:110 (message):
  Deprecated BOARD=mimxrt1060_evk specified, board automatically changed to:
  mimxrt1060_evk/mimxrt1062/qspi.
Call Stack (most recent call first):
  zephyr/cmake/modules/zephyr_default.cmake:133 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:37 (find_package)


-- Board: mimxrt1060_evk, Revision: C, qualifiers: mimxrt1062/qspi
-- Found host-tools: zephyr 0.16.8 (C:/Users/ofirs/bsp/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (C:/Users/ofirs/bsp/zephyr-sdk-0.16.8)
-- Found Dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: C:/Users/ofirs/bsp/zephyr/boards/nxp/mimxrt1060_evk/mimxrt1060_evk_mimxrt1062_qspi.dts
-- Found devicetree overlay: C:/Users/ofirs/bsp/zephyr/boards/nxp/mimxrt1060_evk/mimxrt1060_evk_mimxrt1062_qspi_C.overlay
-- Generated zephyr.dts: C:/Users/ofirs/bsp/build/zephyr/zephyr.dts
-- Generated pickled edt: C:/Users/ofirs/bsp/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: C:/Users/ofirs/bsp/build/zephyr/include/generated/zephyr/devicetree_generated.h

-- Including generated dts.cmake file: C:/Users/ofirs/bsp/build/zephyr/dts.cmake
Parsing C:/Users/ofirs/bsp/zephyr/Kconfig
Loaded configuration 'C:/Users/ofirs/bsp/zephyr/boards/nxp/mimxrt1060_evk/mimxrt1060_evk_mimxrt1062_qspi_defconfig'
Merged configuration 'C:/Users/ofirs/bsp/project_configuration/prj.conf'
Merged configuration 'C:/Users/ofirs/bsp/project_configuration/ethernet-phy-overlay.conf'
Configuration saved to 'C:/Users/ofirs/bsp/build/zephyr/.config'
Kconfig header saved to 'C:/Users/ofirs/bsp/build/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: c:/users/ofirs/bsp/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/ofirs/bsp/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
Load components for MIMXRT1062:
driver_common component is included.
driver_reset component is included.
device_CMSIS component is included.
CMSIS_Include_core_cm component is included.
device_system component is included.
driver_trng component is included.
driver_enet component is included.
driver_lpi2c component is included.
driver_lpspi component is included.
driver_lpuart component is included.
driver_igpio component is included.
driver_flexspi component is included.
driver_cache_armv7_m7 component is included.
driver_ocotp component is included.
-- Configuring done (11.4s)
-- Generating done (0.7s)
-- Build files have been written to: C:/Users/ofirs/bsp/build
←[92m-- west build: building application
[1/293] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.0.99 (C:/Users/ofirs/bsp/zephyr), build: v4.0.0-5273-gaea9db6e1d08
[2/293] Generating ../build_info.yml
FAILED: build_info.yml C:/Users/ofirs/bsp/build/build_info.yml
C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Users\ofirs\bsp\build\zephyr && "C:\Program Files\CMake\bin\cmake.exe" -DJSON_FILE="build_info_1.json" -DYAML_FILE="C:/Users/ofirs/bsp/build/build_info.yml" -DTEMP_FILES="build_info_1.json" -P C:/Users/ofirs/bsp/zephyr/cmake/yaml-filter.cmake"
-- Found Python3: C:/Python312/python.exe (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: C:/Users/ofirs/bsp/zephyr/cmake/..//.cache
CMake Error at C:/Users/ofirs/bsp/zephyr/cmake/modules/yaml.cmake:548 (string):
  string sub-command JSON failed parsing json string: * Line 69, Column 24

    Bad escape sequence in string

  See Line 69, Column 1675 for detail.

  .
Call Stack (most recent call first):
  C:/Users/ofirs/bsp/zephyr/cmake/yaml-filter.cmake:27 (to_yaml)


[3/293] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\Users\ofirs\bsp\build'
```</div>

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

@tejlmand

zephyr_include_directories($ENV{PROJECT_PATH}/include/utils)
zephyr_include_directories($ENV{PROJECT_PATH}/include/drivers/e1_spi)

where PROJECT_PATH is set to project root:

C:\Users\ofirs\bsp>echo %PROJECT_PATH%
C:\Users\ofirs\bsp

Discussed in release WG meeting and rising priority to release blocker as this sounds like this impacts multiple users.

@pillo79 I include the entire include directory by adding target_include_directories(app PRIVATE include) in my CMakeLists.txt.

Build output:

C:\Users\ofirs\bsp>west build -b mimxrt1060_evkb -- -DE1_STUB=1
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/Users/ofirs/bsp
-- CMake version: 3.29.1
-- Found Python3: C:/Python312/python.exe (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: C:/Users/ofirs/bsp/zephyr/.cache
-- Zephyr version: 4.0.99 (C:/Users/ofirs/bsp/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
CMake Warning at zephyr/cmake/modules/boards.cmake:110 (message):
  Deprecated BOARD=mimxrt1060_evkb specified, board automatically changed to:
  mimxrt1060_evk@B/mimxrt1062/qspi.
Call Stack (most recent call first):
  zephyr/cmake/modules/zephyr_default.cmake:133 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:37 (find_package)


-- Board: mimxrt1060_evk, Revision: B, qualifiers: mimxrt1062/qspi
-- Found host-tools: zephyr 0.16.8 (C:/Users/ofirs/bsp/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (C:/Users/ofirs/bsp/zephyr-sdk-0.16.8)
-- Found Dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: C:/Users/ofirs/bsp/zephyr/boards/nxp/mimxrt1060_evk/mimxrt1060_evk_mimxrt1062_qspi.dts
-- Found devicetree overlay: C:/Users/ofirs/bsp/zephyr/boards/nxp/mimxrt1060_evk/mimxrt1060_evk_mimxrt1062_qspi_B.overlay
-- Generated zephyr.dts: C:/Users/ofirs/bsp/build/zephyr/zephyr.dts
-- Generated pickled edt: C:/Users/ofirs/bsp/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: C:/Users/ofirs/bsp/build/zephyr/include/generated/zephyr/devicetree_generated.h

-- Including generated dts.cmake file: C:/Users/ofirs/bsp/build/zephyr/dts.cmake
Parsing C:/Users/ofirs/bsp/zephyr/Kconfig
Loaded configuration 'C:/Users/ofirs/bsp/zephyr/boards/nxp/mimxrt1060_evk/mimxrt1060_evk_mimxrt1062_qspi_defconfig'
Merged configuration 'C:/Users/ofirs/bsp/project_configuration/prj.conf'
Merged configuration 'C:/Users/ofirs/bsp/project_configuration/ethernet-phy-overlay.conf'
Configuration saved to 'C:/Users/ofirs/bsp/build/zephyr/.config'
Kconfig header saved to 'C:/Users/ofirs/bsp/build/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: c:/users/ofirs/bsp/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Users/ofirs/bsp/zephyr-sdk-0.16.8/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
Load components for MIMXRT1062:
driver_common component is included.
driver_reset component is included.
device_CMSIS component is included.
CMSIS_Include_core_cm component is included.
device_system component is included.
driver_trng component is included.
driver_enet component is included.
driver_lpi2c component is included.
driver_lpspi component is included.
driver_lpuart component is included.
driver_igpio component is included.
driver_flexspi component is included.
driver_cache_armv7_m7 component is included.
driver_ocotp component is included.
llext-cflags genex      : -D$<JOIN:KERNEL$<SEMICOLON>__ZEPHYR__=1$<SEMICOLON>$<TARGET_PROPERTY:compiler,security_fortify_compile_time>$<SEMICOLON>__LINUX_ERRNO_EXTENSIONS__$<SEMICOLON>PICOLIBC_DOUBLE_PRINTF_SCANF$<SEMICOLON>XIP_EXTERNAL_FLASH$<SEMICOLON>XIP_BOOT_HEADER_ENABLE=1$<SEMICOLON>BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024$<SEMICOLON>XIP_BOOT_HEADER_DCD_ENABLE=1$<SEMICOLON>__PROGRAM_START$<SEMICOLON>CPU_MIMXRT1062DVL6A$<SEMICOLON>NDEBUG$<SEMICOLON>K_HEAP_MEM_POOL_SIZE=1280,$<SEMICOLON>-D>;-DLL_EXTENSION_BUILD;$<FILTER:$<FILTER:$<JOIN:$<1:$<TARGET_PROPERTY:compiler,no_strict_aliasing>>$<SEMICOLON>-Os$<SEMICOLON>$<TARGET_PROPERTY:compiler,imacros>$<SEMICOLON>C:/Users/ofirs/bsp/build/zephyr/include/generated/zephyr/autoconf.h$<SEMICOLON>$<TARGET_PROPERTY:compiler,no_common>$<SEMICOLON>$<TARGET_PROPERTY:compiler,debug>$<SEMICOLON>$<TARGET_PROPERTY:compiler,diagnostic>$<SEMICOLON>-mcpu=cortex-m7$<SEMICOLON>-mthumb$<SEMICOLON>-mabi=aapcs$<SEMICOLON>-mfp16-format=ieee$<SEMICOLON>-mtp=soft$<SEMICOLON>--sysroot=C:/Users/ofirs/bsp/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi$<SEMICOLON>$<TARGET_PROPERTY:compiler,imacros>$<SEMICOLON>C:/Users/ofirs/bsp/zephyr/include/zephyr/toolchain/zephyr_stdint.h$<SEMICOLON>$<1:$<TARGET_PROPERTY:compiler,warning_base>>$<SEMICOLON>$<TARGET_PROPERTY:compiler,warning_extended>$<SEMICOLON>$<1:$<TARGET_PROPERTY:compiler,warning_error_implicit_int>>$<SEMICOLON>$<1:$<TARGET_PROPERTY:compiler,no_position_independent>>$<SEMICOLON>-fno-asynchronous-unwind-tables$<SEMICOLON>-ftls-model=local-exec$<SEMICOLON>-fno-reorder-functions$<SEMICOLON>--param=min-pagesize=0$<SEMICOLON>-fno-defer-pop$<SEMICOLON>-fmacro-prefix-map=C:/Users/ofirs/bsp=CMAKE_SOURCE_DIR$<SEMICOLON>-fmacro-prefix-map=C:/Users/ofirs/bsp/zephyr=ZEPHYR_BASE$<SEMICOLON>-fmacro-prefix-map=C:/Users/ofirs/bsp=WEST_TOPDIR$<SEMICOLON>-ffunction-sections$<SEMICOLON>-fdata-sections$<SEMICOLON>$<$<BOOL:$<TARGET_PROPERTY:compiler,specs>>:$<TARGET_PROPERTY:compiler,specs>picolibc.specs>$<SEMICOLON>-D_POSIX_THREADS$<SEMICOLON>$<1:$<TARGET_PROPERTY:compiler,cstd>c99>,$<SEMICOLON>>,EXCLUDE,^-fno-pic$|^-fno-pie$|^-ffunction-sections$|^-fdata-sections$|^-Os$>,EXCLUDE,^--sysroot=.*$|^-fmacro-prefix-map=.*$|^-g.*$>;-mlong-calls;-mthumb;-nodefaultlibs
-- Configuring done (11.8s)
-- Generating done (0.7s)
-- Build files have been written to: C:/Users/ofirs/bsp/build
←[92m-- west build: building application
[1/293] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.0.99 (C:/Users/ofirs/bsp/zephyr), build: v4.0.0-5273-ge5c7849a807d
[2/293] Generating ../build_info.yml
FAILED: build_info.yml C:/Users/ofirs/bsp/build/build_info.yml
C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Users\ofirs\bsp\build\zephyr && "C:\Program Files\CMake\bin\cmake.exe" -DJSON_FILE="build_info_1.json" -DYAML_FILE="C:/Users/ofirs/bsp/build/build_info.yml" -DTEMP_FILES="build_info_1.json" -P C:/Users/ofirs/bsp/zephyr/cmake/yaml-filter.cmake"
-- Found Python3: C:/Python312/python.exe (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: C:/Users/ofirs/bsp/zephyr/cmake/..//.cache
CMake Error at C:/Users/ofirs/bsp/zephyr/cmake/modules/yaml.cmake:548 (string):
  string sub-command JSON failed parsing json string: * Line 69, Column 24

    Bad escape sequence in string

  See Line 69, Column 1675 for detail.

  .
Call Stack (most recent call first):
  C:/Users/ofirs/bsp/zephyr/cmake/yaml-filter.cmake:27 (to_yaml)


[3/293] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' --build 'C:\Users\ofirs\bsp\build'

print_llext_cflags output:

 C:\Users\ofirs\bsp>west build -t print_llext_cflags
-- west build: running target print_llext_cflags
[1/1] C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Users\ofirs...SIX_THREADS;-std=c99 -mlong-calls -mthumb -nodefaultlibs""
-DKERNEL;-D__ZEPHYR__=1;-D__LINUX_ERRNO_EXTENSIONS__;-DPICOLIBC_DOUBLE_PRINTF_SCANF;-DXIP_EXTERNAL_FLASH;-DXIP_BOOT_HEADER_ENABLE=1;-DBOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024;-DXIP_BOOT_HEADER_DCD_ENABLE=1;-D__PROGRAM_START;-DCPU_MIMXRT1062DVL6A;-DNDEBUG;-DK_HEAP_MEM_POOL_SIZE=1280 -DLL_EXTENSION_BUILD -fno-strict-aliasing;-imacros;C:/Users/ofirs/bsp/build/zephyr/include/generated/zephyr/autoconf.h;-fno-common;-fdiagnostics-color=always;-mcpu=cortex-m7;-mthumb;-mabi=aapcs;-mfp16-format=ieee;-mtp=soft;-imacros;C:/Users/ofirs/bsp/zephyr/include/zephyr/toolchain/zephyr_stdint.h;-Wall;-Wformat;-Wformat-security;-Wformat;-Wno-format-zero-length;-Wdouble-promotion;-Wno-pointer-sign;-Wpointer-arith;-Wexpansion-to-defined;-Wno-unused-but-set-variable;-Werror=implicit-int;-fno-asynchronous-unwind-tables;-ftls-model=local-exec;-fno-reorder-functions;--param=min-pagesize=0;-fno-defer-pop;-specs=picolibc.specs;-D_POSIX_THREADS;-std=c99 -mlong-calls -mthumb -nodefaultlibs

print_llext_includes output:

C:\Users\ofirs\bsp>west build -t print_llext_includes
-- west build: running target print_llext_includes
[1/1] C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Users\ofirs...lude/utils;C:\Users\ofirs\bsp/include/drivers/e1_spi""
C:/Users/ofirs/bsp/build/zephyr/include/generated/zephyr;C:/Users/ofirs/bsp/zephyr/include;C:/Users/ofirs/bsp/build/zephyr/include/generated;C:/Users/ofirs/bsp/zephyr/soc/nxp/imxrt;C:/Users/ofirs/bsp/zephyr/lib/libc/common/include;C:/Users/ofirs/bsp/zephyr/include/zephyr/posix;C:/Users/ofirs/bsp/zephyr/soc/nxp/imxrt/imxrt10xx/.;C:/Users/ofirs/bsp/zephyr/soc/nxp/imxrt/.;C:/Users/ofirs/bsp/zephyr/soc/nxp/imxrt/imxrt10xx;C:/Users/ofirs/bsp/zephyr/subsys/net/l2;C:/Users/ofirs/bsp/modules/hal/cmsis/CMSIS/Core/Include;C:/Users/ofirs/bsp/zephyr/modules/cmsis/.;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT1062;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT1062/drivers;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/devices/MIMXRT1062/xip;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/common;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/trng;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/enet;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/lpi2c;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/lpspi;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/lpuart;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/igpio;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/flexspi;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/flexspi;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/cache/armv7-m7;C:/Users/ofirs/bsp/modules/hal/nxp/mcux/mcux-sdk/drivers/ocotp;C:/Users/ofirs/bsp/zephyr/modules/hal_nxp/.;C:\Users\ofirs\bsp/include/drivers/regulator;C:\Users\ofirs\bsp/include/drivers/pmbus;C:\Users\ofirs\bsp/include/utils;C:\Users\ofirs\bsp/include/drivers/e1_spi

@tejlmand On the latest Zephyr main branch, this issue is no longer reproducible (I assume recent changes have resolved it).

Note that I already have a related PR https://github.com/zephyrproject-rtos/zephyr/pull/85624 (pending review/approval…)

Which I guess will just downgrade this issue from medium to minor 😛

Wondering how that happened…

@pillo79 Right, it was not the file written to disk, but the input that was going into GENERATE, but it is still the genex’es which seems to expand to some invalid JSON formatting, and thus breaking the build step, when that JSON is converted to yaml. Should have phrased it a bit different 😉

@ofirshe thanks for the CMake trace.

Both from the original issue error log and your trace I have traced down the issue to be related to the generator expressions used by the llext subsys here: https://github.com/zephyrproject-rtos/zephyr/blob/ee37a94aa81f0f98879f615dd31c8cab4d322240/CMakeLists.txt#L2239

The genex expression is part of a file(GENERATE ...) to create a build_info_1.json which is processed at build time to create a final build_info.yaml. The input to generating the build_info_1.json is:

  "cmake" : 
  {
    "application" : 
    {
      "configuration-dir" : "C:/Users/ofirs/bsp",
      "source-dir" : "C:/Users/ofirs/bsp"
    },
    "board" : 
    {
      "name" : "mimxrt1060_evk",
      "path" : [ "C:/Users/ofirs/bsp/zephyr/boards/nxp/mimxrt1060_evk" ],
      "qualifiers" : "mimxrt1062/qspi",
      "revision" : "B"
    },
    "devicetree" : 
    {
      "bindings-dirs" : 
      [
        "C:/Users/ofirs/bsp/dts/bindings",
        "C:/Users/ofirs/bsp/zephyr/dts/bindings"
      ],
      "files" : 
      [
        "C:/Users/ofirs/bsp/zephyr/boards/nxp/mimxrt1060_evk/mimxrt1060_evk_mimxrt1062_qspi.dts",
        "C:/Users/ofirs/bsp/zephyr/boards/nxp/mimxrt1060_evk/mimxrt1060_evk_mimxrt1062_qspi_B.overlay"
      ],
      "include-dirs" : 
      [
        "C:/Users/ofirs/bsp/modules/hal/atmel/include",
        "C:/Users/ofirs/bsp/modules/hal/gigadevice/include",
        "C:/Users/ofirs/bsp/modules/hal/microchip/include",
        "C:/Users/ofirs/bsp/modules/hal/microchip/dts",
        "C:/Users/ofirs/bsp/modules/hal/nuvoton/dts",
        "C:/Users/ofirs/bsp/modules/hal/nxp/dts",
        "C:/Users/ofirs/bsp/modules/hal/stm32/dts",
        "C:/Users/ofirs/bsp/include",
        "C:/Users/ofirs/bsp/dts",
        "C:/Users/ofirs/bsp/zephyr/include",
        "C:/Users/ofirs/bsp/zephyr/include/zephyr",
        "C:/Users/ofirs/bsp/zephyr/dts/common",
        "C:/Users/ofirs/bsp/zephyr/dts/x86",
        "C:/Users/ofirs/bsp/zephyr/dts/xtensa",
        "C:/Users/ofirs/bsp/zephyr/dts/sparc",
        "C:/Users/ofirs/bsp/zephyr/dts/riscv",
        "C:/Users/ofirs/bsp/zephyr/dts/posix",
        "C:/Users/ofirs/bsp/zephyr/dts/nios2",
        "C:/Users/ofirs/bsp/zephyr/dts/arm64",
        "C:/Users/ofirs/bsp/zephyr/dts/arm",
        "C:/Users/ofirs/bsp/zephyr/dts/arc",
        "C:/Users/ofirs/bsp/zephyr/dts"
      ]
    },
    "kconfig" : 
    {
      "extra-user-files" : [ "project_configuration/ethernet-phy-overlay.conf" ],
      "files" : 
      [
        "C:/Users/ofirs/bsp/zephyr/boards/nxp/mimxrt1060_evk/mimxrt1060_evk_mimxrt1062_qspi_defconfig",
        "C:/Users/ofirs/bsp/project_configuration/prj.conf",
        "C:/Users/ofirs/bsp/project_configuration/ethernet-phy-overlay.conf"
      ],
      "user-files" : [ "project_configuration/prj.conf" ]
    },
    "llext-edk" : 
    {
      "cflags" : "@YAML-LIST@;-D$<JOIN:KERNEL$<SEMICOLON>__ZEPHYR__=1$<SEMICOLON>$<TARGET_PROPERTY:compiler,security_fortify_compile_time>$<SEMICOLON>__LINUX_ERRNO_EXTENSIONS__$<SEMICOLON>PICOLIBC_DOUBLE_PRINTF_SCANF$<SEMICOLON>XIP_EXTERNAL_FLASH$<SEMICOLON>XIP_BOOT_HEADER_ENABLE=1$<SEMICOLON>BOARD_FLASH_SIZE=CONFIG_FLASH_SIZE*1024$<SEMICOLON>XIP_BOOT_HEADER_DCD_ENABLE=1$<SEMICOLON>__PROGRAM_START$<SEMICOLON>CPU_MIMXRT1062DVL6A$<SEMICOLON>NDEBUG$<SEMICOLON>K_HEAP_MEM_POOL_SIZE=1280,$<SEMICOLON>-D>;-DLL_EXTENSION_BUILD;$<FILTER:$<FILTER:$<JOIN:$<1:$<TARGET_PROPERTY:compiler,no_strict_aliasing>>$<SEMICOLON>-Os$<SEMICOLON>$<TARGET_PROPERTY:compiler,imacros>$<SEMICOLON>C:/Users/ofirs/bsp/build/zephyr/include/generated/zephyr/autoconf.h$<SEMICOLON>$<TARGET_PROPERTY:compiler,no_common>$<SEMICOLON>$<TARGET_PROPERTY:compiler,debug>$<SEMICOLON>$<TARGET_PROPERTY:compiler,diagnostic>$<SEMICOLON>-mcpu=cortex-m7$<SEMICOLON>-mthumb$<SEMICOLON>-mabi=aapcs$<SEMICOLON>-mfp16-format=ieee$<SEMICOLON>-mtp=soft$<SEMICOLON>--sysroot=C:/Users/ofirs/bsp/zephyr-sdk-0.16.8/arm-zephyr-eabi/arm-zephyr-eabi$<SEMICOLON>$<TARGET_PROPERTY:compiler,imacros>$<SEMICOLON>C:/Users/ofirs/bsp/zephyr/include/zephyr/toolchain/zephyr_stdint.h$<SEMICOLON>$<1:$<TARGET_PROPERTY:compiler,warning_base>>$<SEMICOLON>$<TARGET_PROPERTY:compiler,warning_extended>$<SEMICOLON>$<1:$<TARGET_PROPERTY:compiler,warning_error_implicit_int>>$<SEMICOLON>$<1:$<TARGET_PROPERTY:compiler,no_position_independent>>$<SEMICOLON>-fno-asynchronous-unwind-tables$<SEMICOLON>-ftls-model=local-exec$<SEMICOLON>-fno-reorder-functions$<SEMICOLON>--param=min-pagesize=0$<SEMICOLON>-fno-defer-pop$<SEMICOLON>-fmacro-prefix-map=C:/Users/ofirs/bsp=CMAKE_SOURCE_DIR$<SEMICOLON>-fmacro-prefix-map=C:/Users/ofirs/bsp/zephyr=ZEPHYR_BASE$<SEMICOLON>-fmacro-prefix-map=C:/Users/ofirs/bsp=WEST_TOPDIR$<SEMICOLON>-ffunction-sections$<SEMICOLON>-fdata-sections$<SEMICOLON>$<$<BOOL:$<TARGET_PROPERTY:compiler,specs>>:$<TARGET_PROPERTY:compiler,specs>picolibc.specs>$<SEMICOLON>-D_POSIX_THREADS$<SEMICOLON>$<1:$<TARGET_PROPERTY:compiler,cstd>c99>,$<SEMICOLON>>,EXCLUDE,^-fno-pic$|^-fno-pie$|^-ffunction-sections$|^-fdata-sections$|^-Os$>,EXCLUDE,^--sysroot=.*$|^-fmacro-prefix-map=.*$|^-g.*$>;-mlong-calls;-mthumb;-nodefaultlibs",
      "file" : "C:/Users/ofirs/bsp/build/zephyr/llext-edk.tar.xz",
      "include-dirs" : "@YAML-LIST@;$<TARGET_PROPERTY:zephyr_interface,INTERFACE_INCLUDE_DIRECTORIES>"
    },
    "toolchain" : 
    {
      "name" : "zephyr",
      "path" : "C:/Users/ofirs/bsp/zephyr-sdk-0.16.8"
    },
    "zephyr" : 
    {
      "version" : "4.0.99",
      "zephyr-base" : "C:/Users/ofirs/bsp/zephyr"
    }
  },
  "version" : "0.1.0",
  "west" : 
  {
    "command" : "C:\\Users\\ofirs\\AppData\\Roaming\\Python\\Python312\\Scripts\\west build -b mimxrt1060_evkb -- -DE1_STUB=1 --trace-expand",
    "topdir" : "C:\\Users\\ofirs\\bsp",
    "version" : "1.2.0"
  }
}

and it seems to be the expansion of the genex in cmake::llext-edk::cflags afaict that is causing the issue later, when converting to yaml.

However, I cannot tell from the trace itself what the genex expanded into. So in order to see if there are some non-escaped special chars which impact the build stage I will need you to provide some extra details.

I have made a small a debug patch file to help further investigate this issue. Store the content as a file debug_85774.patch and apply it using:

$ git apply debug_85774.patch
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 16a471ae6ee..93701dea7bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2238,6 +2238,9 @@ list(APPEND llext_edk_cflags ${LLEXT_EDK_APPEND_FLAGS})
 build_info(llext-edk file PATH ${llext_edk_file})
 build_info(llext-edk cflags VALUE ${llext_edk_cflags})
 build_info(llext-edk include-dirs VALUE "$<TARGET_PROPERTY:zephyr_interface,INTERFACE_INCLUDE_DIRECTORIES>")
+message("llext-cflags genex      : ${llext_edk_cflags}")
+add_custom_target(print_llext_cflags   COMMAND ${CMAKE_COMMAND} -E echo \"${llext_edk_cflags}\")
+add_custom_target(print_llext_includes COMMAND ${CMAKE_COMMAND} -E echo \"$<TARGET_PROPERTY:zephyr_interface,INTERFACE_INCLUDE_DIRECTORIES>\")
 
 add_custom_command(
     OUTPUT ${llext_edk_file}

This patch provides to custom targets which helps us understand exactly how the genex are expanded on your system. I have unfortunately not been able to reproduce on my Windows machine.

To get the expanded values, then run:

$ cd <build-folder>
$ ninja print_llext_cflags
<output>
$ ninja print_llext_includes
<output>

and provide the output in this issue.

You can also do it using west build, like west build -t print_llext_cflags ( and -t print_llext_includes)after you have created the build directory.

FYI @pillo79 seems we have some issues on Windows with expanding genex’es in certain cases.