Skip to content
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

imx93_evk/mimx9352/a55 fails build_all/gpio test #72619

Closed
ycsin opened this issue May 11, 2024 · 0 comments · Fixed by #72644
Closed

imx93_evk/mimx9352/a55 fails build_all/gpio test #72619

ycsin opened this issue May 11, 2024 · 0 comments · Fixed by #72644
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP

Comments

@ycsin
Copy link
Collaborator

ycsin commented May 11, 2024

Describe the bug
imx93_evk/mimx9352/a55 fails to build the build_all/gpio test, and is failing the CI in main branch. See this

To Reproduce
Steps to reproduce the behavior:

  1. west build -p -b imx93_evk/mimx9352/a55 zephyr/tests/drivers/build_all/gpio

Expected behavior
Should build fine

Impact
Blocking #72589 and possibly other PRs

Logs and console output

west build -p -b imx93_evk/mimx9352/a55 zephyr/tests/drivers/build_all/gpio -t rom_report
-- west build: making build dir /Users/ycsin/zephyrproject/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /Users/ycsin/zephyrproject/zephyr/tests/drivers/build_all/gpio
-- CMake version: 3.26.3
-- Found Python3: /Users/ycsin/zephyrproject/.venv/bin/python3.11 (found suitable version "3.11.3", minimum required is "3.8") found components: Interpreter 
-- Cache files will be written to: /Users/ycsin/Library/Caches/zephyr
-- Zephyr version: 3.6.99 (/Users/ycsin/zephyrproject/zephyr)
-- Found west (found suitable version "1.0.0", minimum required is "0.14.0")
-- Board: imx93_evk, qualifiers: mimx9352/a55
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.5 (/Users/ycsin/zephyr-sdk-0.16.5-1)
-- Found toolchain: zephyr 0.16.5 (/Users/ycsin/zephyr-sdk-0.16.5-1)
-- Found Dtc: /Users/ycsin/homebrew/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6") 
-- Found BOARD.dts: /Users/ycsin/zephyrproject/zephyr/boards/nxp/imx93_evk/imx93_evk_mimx9352_a55.dts
-- Found devicetree overlay: /Users/ycsin/zephyrproject/zephyr/tests/drivers/build_all/gpio/app.overlay
-- Generated zephyr.dts: /Users/ycsin/zephyrproject/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/ycsin/zephyrproject/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: /Users/ycsin/zephyrproject/build/zephyr/dts.cmake

warning: REGULATOR_FIXED_INIT_PRIORITY (defined at drivers/regulator/Kconfig.fixed:14) was assigned
the value '82' but got the value ''. Check these unsatisfied dependencies: REGULATOR_FIXED (=n),
REGULATOR (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_REGULATOR_FIXED_INIT_PRIORITY and/or look
up REGULATOR_FIXED_INIT_PRIORITY in the menuconfig/guiconfig interface. The Application Development
Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual
might be helpful too.

Parsing /Users/ycsin/zephyrproject/zephyr/Kconfig
Loaded configuration '/Users/ycsin/zephyrproject/zephyr/boards/nxp/imx93_evk/imx93_evk_mimx9352_a55_defconfig'
Merged configuration '/Users/ycsin/zephyrproject/zephyr/tests/drivers/build_all/gpio/prj.conf'
Configuration saved to '/Users/ycsin/zephyrproject/build/zephyr/.config'
Kconfig header saved to '/Users/ycsin/zephyrproject/build/zephyr/include/generated/autoconf.h'
-- Found GnuLd: /Users/ycsin/zephyr-sdk-0.16.5-1/aarch64-zephyr-elf/aarch64-zephyr-elf/bin/ld.bfd (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: /Users/ycsin/zephyr-sdk-0.16.5-1/aarch64-zephyr-elf/bin/aarch64-zephyr-elf-gcc
Load components for MIMX9352_ca55:
driver_common component is included.
driver_reset component is included.
device_CMSIS component is included.
CMSIS_Include_core_ca component is included.
driver_lpuart component is included.
driver_rgpio component is included.
-- Using ccache: /Users/ycsin/homebrew/bin/ccache
-- Configuring done (9.2s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/ycsin/zephyrproject/build
-- west build: running target rom_report
[1/184] Preparing syscall dependency handling

[3/184] Generating include/generated/version.h
-- Zephyr version: 3.6.99 (/Users/ycsin/zephyrproject/zephyr), build: v3.6.0-3753-gbe682e22e166
[89/184] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_adp5585.c.obj
FAILED: zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_adp5585.c.obj 
ccache /Users/ycsin/zephyr-sdk-0.16.5-1/aarch64-zephyr-elf/bin/aarch64-zephyr-elf-gcc -DCPU_MIMX9352CVUXK_ca55 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0 -DPICOLIBC_DOUBLE_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -I/Users/ycsin/zephyrproject/zephyr/include -I/Users/ycsin/zephyrproject/build/zephyr/include/generated -I/Users/ycsin/zephyrproject/zephyr/soc/nxp/imx -I/Users/ycsin/zephyrproject/zephyr/soc/nxp/imx/imx9/. -I/Users/ycsin/zephyrproject/zephyr/soc/nxp/imx/imx9/a55 -I/Users/ycsin/zephyrproject/zephyr/soc/nxp/imx/. -I/Users/ycsin/zephyrproject/zephyr/soc/nxp/imx/imx9 -I/Users/ycsin/zephyrproject/zephyr/soc/nxp/imx/imx9/include -I/Users/ycsin/zephyrproject/zephyr/subsys/testsuite/include -I/Users/ycsin/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMX9352 -I/Users/ycsin/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/devices/MIMX9352/drivers -I/Users/ycsin/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/CMSIS/Core_AArch64/Include -I/Users/ycsin/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/drivers/common -I/Users/ycsin/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/drivers/lpuart -I/Users/ycsin/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/drivers/rgpio -I/Users/ycsin/zephyrproject/zephyr/modules/hal_nxp/. -isystem /Users/ycsin/zephyrproject/zephyr/lib/libc/common/include -Wshadow -fno-strict-aliasing -Os -imacros /Users/ycsin/zephyrproject/build/zephyr/include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-a55 -mabi=lp64 --sysroot=/Users/ycsin/zephyr-sdk-0.16.5-1/aarch64-zephyr-elf/aarch64-zephyr-elf -imacros /Users/ycsin/zephyrproject/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/Users/ycsin/zephyrproject/zephyr/tests/drivers/build_all/gpio=CMAKE_SOURCE_DIR -fmacro-prefix-map=/Users/ycsin/zephyrproject/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/Users/ycsin/zephyrproject=WEST_TOPDIR -ffunction-sections -fdata-sections -mno-outline-atomics -moverride=tune=no_ldp_stp_qregs --specs=picolibc.specs -std=c99 -MD -MT zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_adp5585.c.obj -MF zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_adp5585.c.obj.d -o zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_adp5585.c.obj -c /Users/ycsin/zephyrproject/zephyr/drivers/gpio/gpio_adp5585.c
In file included from /Users/ycsin/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:34,
                 from /Users/ycsin/zephyrproject/zephyr/include/zephyr/sys/util.h:17,
                 from /Users/ycsin/zephyrproject/zephyr/include/zephyr/sys/atomic.h:18,
                 from /Users/ycsin/zephyrproject/zephyr/include/zephyr/kernel_includes.h:25,
                 from /Users/ycsin/zephyrproject/zephyr/include/zephyr/kernel.h:17,
                 from /Users/ycsin/zephyrproject/zephyr/drivers/gpio/gpio_adp5585.c:7:
/Users/ycsin/zephyrproject/zephyr/include/zephyr/device.h:91:41: error: '__device_dts_ord_143' undeclared here (not in a function); did you mean '__device_dts_ord_193'?
   91 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                         ^~~~~~~~~
/Users/ycsin/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:72:26: note: in definition of macro '__DEBRACKET'
   72 | #define __DEBRACKET(...) __VA_ARGS__
      |                          ^~~~~~~~~~~
/Users/ycsin/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
   64 |         __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
      |         ^~~~~~~~~~~~~~~~~~~~
/Users/ycsin/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
   59 |         __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
      |         ^~~~~~~~~~~
/Users/ycsin/zephyrproject/zephyr/include/zephyr/sys/util_macro.h:180:9: note: in expansion of macro 'Z_COND_CODE_1'
  180 |         Z_COND_CODE_1(_flag, _if_1_code, _else_code)
      |         ^~~~~~~~~~~~~
/Users/ycsin/zephyrproject/zephyr/include/zephyr/devicetree.h:4305:9: note: in expansion of macro 'COND_CODE_1'
 4305 |         COND_CODE_1(DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT),   \
      |         ^~~~~~~~~~~
/Users/ycsin/zephyrproject/zephyr/include/zephyr/toolchain/common.h:138:23: note: in expansion of macro '_DO_CONCAT'
  138 | #define _CONCAT(x, y) _DO_CONCAT(x, y)
      |                       ^~~~~~~~~~
/Users/ycsin/zephyrproject/zephyr/include/zephyr/device.h:91:33: note: in expansion of macro '_CONCAT'
   91 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                 ^~~~~~~
/Users/ycsin/zephyrproject/zephyr/include/zephyr/device.h:228:37: note: in expansion of macro 'DEVICE_NAME_GET'
  228 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
/Users/ycsin/zephyrproject/zephyr/include/zephyr/device.h:245:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
  245 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~
/Users/ycsin/zephyrproject/zephyr/drivers/gpio/gpio_adp5585.c:461:28: note: in expansion of macro 'DEVICE_DT_GET'
  461 |                 .mfd_dev = DEVICE_DT_GET(DT_INST_PARENT(inst)),                       \
      |                            ^~~~~~~~~~~~~
/Users/ycsin/zephyrproject/build/zephyr/include/generated/devicetree_generated.h:27797:51: note: in expansion of macro 'GPIO_ADP5585_INIT'
27797 | #define DT_FOREACH_OKAY_INST_adi_adp5585_gpio(fn) fn(0)
      |                                                   ^~
/Users/ycsin/zephyrproject/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_FOREACH_OKAY_INST_adi_adp5585_gpio'
  105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
      |                                    ^
/Users/ycsin/zephyrproject/zephyr/drivers/gpio/gpio_adp5585.c:469:1: note: in expansion of macro 'DT_INST_FOREACH_STATUS_OKAY'
  469 | DT_INST_FOREACH_STATUS_OKAY(GPIO_ADP5585_INIT)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
[98/184] Building C object zephyr/drivers/mfd/CMakeFiles/drivers__mfd.dir/mfd_axp192.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /Users/ycsin/homebrew/bin/cmake --build /Users/ycsin/zephyrproject/build --target rom_report

Environment (please complete the following information):

  • OS: Linux / MacOS
  • Toolchain: Zephyr SDK
  • v3.6.0-3753-gbe682e22e166
@ycsin ycsin added bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP labels May 11, 2024
@JiafeiPan JiafeiPan self-assigned this May 13, 2024
JiafeiPan added a commit to nxp-upstream/zephyr that referenced this issue May 13, 2024
This commit is to fix some GPIO test case build issue:
zephyrproject-rtos#72619

In fact, the issue is introduce by expander GPIO PR:
zephyrproject-rtos#69330
It is used to add GPIO expander support,  in this PR, dts node layout is:
lpi2c {
	MFD driver {
		gpio driver {
		}
	}
}
The initial idea is to disable all these node by default in order to keep
a minimal default image, but expander GPIO PR only disabled lpi2c and MFD
driver node, but enabled gpio driver node, so gpio driver will report
building error as it depends on expander and i2c which are disabled, so
this fix is to disable gpio node.  If we want to use expander gpio, we
need to enable i2c, expander and gpio nodes simultaneously.

Some GPIO test cases have been enabled on i.mx93 EVK board by enabling
onchip GPIO controller in the overlay, for example:
tests/drivers/gpio/gpio_basic_api/boards/imx93_evk_mimx9352_a55.overlay

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
carlescufi pushed a commit that referenced this issue May 13, 2024
This commit is to fix some GPIO test case build issue:
#72619

In fact, the issue is introduce by expander GPIO PR:
#69330
It is used to add GPIO expander support,  in this PR, dts node layout is:
lpi2c {
	MFD driver {
		gpio driver {
		}
	}
}
The initial idea is to disable all these node by default in order to keep
a minimal default image, but expander GPIO PR only disabled lpi2c and MFD
driver node, but enabled gpio driver node, so gpio driver will report
building error as it depends on expander and i2c which are disabled, so
this fix is to disable gpio node.  If we want to use expander gpio, we
need to enable i2c, expander and gpio nodes simultaneously.

Some GPIO test cases have been enabled on i.mx93 EVK board by enabling
onchip GPIO controller in the overlay, for example:
tests/drivers/gpio/gpio_basic_api/boards/imx93_evk_mimx9352_a55.overlay

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
coreboot-org-bot pushed a commit to coreboot/zephyr-cros that referenced this issue May 14, 2024
This commit is to fix some GPIO test case build issue:
zephyrproject-rtos/zephyr#72619

In fact, the issue is introduce by expander GPIO PR:
zephyrproject-rtos/zephyr#69330
It is used to add GPIO expander support,  in this PR, dts node layout is:
lpi2c {
	MFD driver {
		gpio driver {
		}
	}
}
The initial idea is to disable all these node by default in order to keep
a minimal default image, but expander GPIO PR only disabled lpi2c and MFD
driver node, but enabled gpio driver node, so gpio driver will report
building error as it depends on expander and i2c which are disabled, so
this fix is to disable gpio node.  If we want to use expander gpio, we
need to enable i2c, expander and gpio nodes simultaneously.

Some GPIO test cases have been enabled on i.mx93 EVK board by enabling
onchip GPIO controller in the overlay, for example:
tests/drivers/gpio/gpio_basic_api/boards/imx93_evk_mimx9352_a55.overlay

(cherry picked from commit 153255f)

Original-Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
GitOrigin-RevId: 153255f
Change-Id: I766d8d66a5b005c9ab654d7f7c6f0710b9b0034a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5534604
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Tested-by: Yuval Peress <peress@google.com>
Commit-Queue: Yuval Peress <peress@google.com>
Reviewed-by: Yuval Peress <peress@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP
Projects
None yet
3 participants