Closed kokas-a closed 6 months ago
Bumped into this issue as well (reported in https://github.com/zephyrproject-rtos/zephyr/issues/68999), in our case I ended up removing the depenency of ARCH from our cmake file, not sure if it can be done in your case but I'm also not sure whether it's possible to get ARCH at that stage in the current architecture.
@tejlmand or @nordicjm , @57300 can you please take a look at this?
@kokas-a After https://github.com/zephyrproject-rtos/zephyr/pull/71163 was merged, can this be closed?
Describe the bug Build with ARC MWDT became broken after HWMv2 was implemented.
ARC MWDT toolchain doesn't contain it's own DTC-preprocessor. It uses preprocessor, which is a part of Zephyr-SDK. In current implementailon
${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/target.cmake
file should be included on very early build stages to obtain the preprocessor via CROSS_COMPILE variable (it defined inside pointed .cmake file). Modules call sequence:zephyr_default->dtc->FindHostTools->toolchain/arcmwdt/generic.cmake->${ZEPHYR_SDK_INSTALL_DIR}/cmake/zephyr/target.cmake
The point is target.cmake requires ARCH variable to be defined. New HWMv2 defines ARCH variable much more later in arch_v2 module via CONFIG_ARCH.
In case of MWDT such construction as
set(ARCH ${CONFIG_ARCH})
is not applicable as Kconifg module was not yes initialized. And it at the same time requires dtc, and we get circullar dependence.So, here I'd like to ask for a advice how to fix the issue in the correct way.
To Reproduce
Expected behavior Build not fails:
Impact Showstopper
Logs and console output
Environment (please complete the following information):
Additional context