Skip to content

litex: flash: spi_nor: build fails #76621

@maass-hamburg

Description

@maass-hamburg

Describe the bug

Builds using the litex_vexriscv board and the spi_nor driver fail, when CONFIG_SPI_NOR_SFDP_DEVICETREE=y or CONFIG_SPI_NOR_SFDP_MINIMAL=y.

Build

To Reproduce

Steps to reproduce the behavior:

  1. west build -b litex_vexriscv samples/drivers/jesd216
  2. see error

Expected behavior
No build failures

Impact
CI fails

Logs and console output

ccache /opt/toolchains/zephyr-sdk-0.16.8/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gcc -DKERNEL -DK_HEAP_MEM_POOL_SIZE=4096 -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -I/__w/zephyr/zephyr/twister-out/litex_vexriscv/samples/drivers/jesd216/sample.drivers.jesd216/zephyr/include/generated/zephyr -I/__w/zephyr/zephyr/include -I/__w/zephyr/zephyr/twister-out/litex_vexriscv/samples/drivers/jesd216/sample.drivers.jesd216/zephyr/include/generated -I/__w/zephyr/zephyr/soc/litex/litex_vexriscv -I/__w/zephyr/zephyr/soc/litex/litex_vexriscv/. -isystem /__w/zephyr/zephyr/lib/libc/common/include -Wshadow -fno-strict-aliasing -Werror -Os -imacros /__w/zephyr/zephyr/twister-out/litex_vexriscv/samples/drivers/jesd216/sample.drivers.jesd216/zephyr/include/generated/zephyr/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mabi=ilp32 -march=rv32im_zicsr_zifencei --sysroot=/opt/toolchains/zephyr-sdk-0.16.8/riscv64-zephyr-elf/riscv64-zephyr-elf -imacros /__w/zephyr/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=/__w/zephyr/zephyr/samples/drivers/jesd216=CMAKE_SOURCE_DIR -fmacro-prefix-map=/__w/zephyr/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/__w/zephyr=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/spi_nor.c.obj -MF zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/spi_nor.c.obj.d -o zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/spi_nor.c.obj -c /__w/zephyr/zephyr/drivers/flash/spi_nor.c
In file included from /__w/zephyr/zephyr/include/zephyr/sys/util_macro.h:34,
                 from /__w/zephyr/zephyr/include/zephyr/irq_multilevel.h:16,
                 from /__w/zephyr/zephyr/include/zephyr/devicetree.h:20,
                 from /__w/zephyr/zephyr/include/zephyr/device.h:12,
                 from /__w/zephyr/zephyr/include/zephyr/drivers/flash.h:28,
                 from /__w/zephyr/zephyr/drivers/flash/spi_nor.c:14:
/__w/zephyr/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "jedec,spi-nor jedec-id required for non-runtime SFDP"
   87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert((EXPR), "" MSG)
      |                                    ^~~~~~~~~~~~~~

see here: https://github.com/zephyrproject-rtos/zephyr/actions/runs/10200810946/job/28232026751?pr=75948

Environment (please complete the following information):

  • OS: Ubuntu 22.04, CI
  • Toolchain: Zephyr SDK 0.16.8
  • Commit SHA or Version used: current main

Additional context
Got introduced with: #73446

Metadata

Metadata

Assignees

Labels

bugThe issue is a bug, or the PR is fixing a bugplatform: LiteX

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions