zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.82k stars 6.6k forks source link

NXP Boards that do not build hello_world #79027

Closed EmilioCBen closed 4 weeks ago

EmilioCBen commented 1 month ago

Describe the bug A small section of boards from boards/nxp do not seem to build hello_world. This was tested on the latest commit of main1fe904539d32b5b7d18361d63acc7a47c9171400

imx8mn_evk/mimx8mn6/m7 imx8mq_mimx8mq6/a53 imx8qm_mek/mimx8qm6/a72 imx8qm_mek/mimx8qm6/a53 imx8qm_mek/mimx8qm6/m4 imx8qxp_mek/mimx8qx6/a35 imx8qxp_mek/mimx8qx6/m4 imx8ulp_evk/mimx8ud7/f1_dsp imx8ulp_evk/mimx8ud7/a35

To Reproduce west build -p always -b /path/to/samples/hello_world

Expected behavior A successful build of hello world for

Impact Delay of CI confirmation and platform testing when PR for Issue [https://github.com/zephyrproject-rtos/zephyr/issues/78353] is posted.

Logs and console output My Environment

Example output: /> west build -p always -b imx8mn_evk/mimx8mn6/m7 ./zephyr/samples/hello_world -- west build: making build dir /home/emilio/zephyrproject/build pristine -- west build: generating a build system Loading Zephyr default modules (Zephyr base). -- Application: /home/emilio/zephyrproject/zephyr/samples/hello_world -- CMake version: 3.29.2 -- Found Python3: /home/emilio/zephyrproject/.venv/bin/python3 (found suitable version "3.10.12", minimum required is "3.10") found components: Interpreter -- Cache files will be written to: /home/emilio/.cache/zephyr -- Zephyr version: 3.7.99 (/home/emilio/zephyrproject/zephyr) -- Found west (found suitable version "1.2.0", minimum required is "0.14.0") -- Board: imx8mn_evk, qualifiers: mimx8mn6/m7 -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK -- Found host-tools: zephyr 0.16.5 (/home/emilio/zephyr-sdk-0.16.5) -- Found toolchain: zephyr 0.16.5 (/home/emilio/zephyr-sdk-0.16.5) -- Found Dtc: /home/emilio/zephyr-sdk-0.16.5/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6") -- Found BOARD.dts: /home/emilio/zephyrproject/zephyr/boards/common/stub.dts -- Generated zephyr.dts: /home/emilio/zephyrproject/build/zephyr/zephyr.dts -- Generated pickled edt: /home/emilio/zephyrproject/build/zephyr/edt.pickle -- Generated zephyr.dts: /home/emilio/zephyrproject/build/zephyr/zephyr.dts -- Generated devicetree_generated.h: /home/emilio/zephyrproject/build/zephyr/include/generated/zephyr/devicetree_generated.h -- Including generated dts.cmake file: /home/emilio/zephyrproject/build/zephyr/dts.cmake Parsing /home/emilio/zephyrproject/zephyr/Kconfig Loaded configuration '/home/emilio/zephyrproject/zephyr/samples/hello_world/prj.conf' Configuration saved to '/home/emilio/zephyrproject/build/zephyr/.config' Kconfig header saved to '/home/emilio/zephyrproject/build/zephyr/include/generated/zephyr/autoconf.h' CMake Error at /home/emilio/zephyrproject/zephyr/cmake/modules/arch_v2.cmake:36 (message): ARCH not defined. Check that BOARD=imx8mn_evk, is selecting an appropriate SoC in Kconfig, SoC=, and that the SoC is selecting the correct architecture. Call Stack (most recent call first): /home/emilio/zephyrproject/zephyr/cmake/modules/zephyr_default.cmake:133 (include) /home/emilio/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include) /home/emilio/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate) CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/home/emilio/zephyrproject/.venv/bin/python3 -B/home/emilio/zephyrproject/build -GNinja -DBOARD=imx8mn_evk/mimx8mn6/m7 -S/home/emilio/zephyrproject/zephyr/samples/hello_world

Environment (please complete the following information):

LaurentiuM1234 commented 1 month ago

Interesting.... imx8, imx8x, and imx8ulp should only support the ADSP-based builds, yet the soc.yml file contains other cpu clusters as well.....

dleach02 commented 1 month ago

@hakehuang

hakehuang commented 1 month ago

@dleach02 , @EmilioCBen those platform is not listed in the baords/nxp//board.yaml so they are not supposed to be supported, and I see #79028 is just remove those core, am I right?

EmilioCBen commented 1 month ago

It seems there was some slight confusion, but confusion none the less. It would seem that when you build for an invalid target of the boards I have listed, these options do come up, so I only assumed they were suppose to build. I believe #79028 will take care of this. Under the same series of steps, the preview of how to generate a build with revision of a target say "s32z2xxdc2@D/s32z270/rtu0 is not a displayed example of a target.

hakehuang commented 1 month ago

It seems there was some slight confusion, but confusion none the less. It would seem that when you build for an invalid target of the boards I have listed, these options do come up, so I only assumed they were suppose to build. I believe #79028 will take care of this. Under the same series of steps, the preview of how to generate a build with revision of a target say "s32z2xxdc2@D/s32z270/rtu0 is not a displayed example of a target.

this is also discussed in today's test working group meeting, and #77250 is to resolve this confusion.

JiafeiPan commented 1 month ago

It seems there was some slight confusion, but confusion none the less. It would seem that when you build for an invalid target of the boards I have listed, these options do come up, so I only assumed they were suppose to build. I believe #79028 will take care of this. Under the same series of steps, the preview of how to generate a build with revision of a target say "s32z2xxdc2@D/s32z270/rtu0 is not a displayed example of a target.

this is also discussed in today's test working group meeting, and #77250 is to resolve this confusion.

So #77250 is used to fix this issue, and no need for #79028, right? Per my understand, soc.yml lists all the hardware clusters but not clusters currently have been supported.

nashif commented 1 month ago

77250 will not solve the problem if I understand things correctly. This is an issue in hwmv2 in general, the build systems and scripts will generate automatic board targets for clusters and consider them supported targets even if the board target was not implemented or configured. So removing the clusters is the proper solution IMO. FYI @tejlmand @nordicjm