CONFIG_SPI_NOR was assigned the value y, but got the value n.

Hello,

I am trying to implement littlefs in my external flash memory. I am using nrf52832 and try to implement the littlefs sample code. 

When I am trying to enable Config_spi_nor then I found CONFIG_SPI_NOR was assigned the value y, but got the value n. Could you please help me how I can enable this configuration? 

I am also attaching my overlay file and prj file. Please have a look. 

 

Thank you.

Best regards

FS

CONFIG_FLASH=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y

CONFIG_MAIN_STACK_SIZE=4096

# Let __ASSERT do its job
CONFIG_DEBUG=y

CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y

CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y

CONFIG_SETTINGS=y
CONFIG_SETTINGS_FS=y
CONFIG_SETTINGS_FS_DIR="/lfs/settings"
CONFIG_SETTINGS_FS_FILE="/lfs/settings/run"

  • That is spi1, but in your below overlay, it looks like your configuration is connected to spi2?

  •  SPI2 status is also okay. 

    Moreover I try SPI1 in the overlay as well. Still get the same issue.

  • Looks like maybe the overlay is not included in the build?

    Try to make an obvious error in the overlay file and see if that crashes the build?

  • I make a obvious error in the overlay. 

    Change the compatible "nordic,nrf-spi" to 'jedec,spi-nor' . 

    It crashes the build. I am attaching the error massage here. 

    [89/149] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/spi_nor.c.obj
    FAILED: zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/spi_nor.c.obj 
    F:\NRF\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF52832_XXAA -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -IF:/NRF/v2.6.1/zephyr/include -IF:/NRF/v2.5.0/zephyr/samples/basic/littlefs_2/build/zephyr/include/generated -IF:/NRF/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf52 -IF:/NRF/v2.6.1/zephyr/soc/common/nordic_nrf/. -IF:/NRF/v2.6.1/zephyr/soc/arm/nordic_nrf/common/. -IF:/NRF/v2.6.1/nrf/include -IF:/NRF/v2.6.1/nrf/tests/include -IF:/NRF/v2.6.1/modules/hal/cmsis/CMSIS/Core/Include -IF:/NRF/v2.6.1/zephyr/modules/cmsis/. -IF:/NRF/v2.6.1/modules/hal/nordic/nrfx -IF:/NRF/v2.6.1/modules/hal/nordic/nrfx/drivers/include -IF:/NRF/v2.6.1/modules/hal/nordic/nrfx/mdk -IF:/NRF/v2.6.1/zephyr/modules/hal_nordic/nrfx/. -IF:/NRF/v2.6.1/modules/debug/segger/SEGGER -IF:/NRF/v2.6.1/modules/debug/segger/Config -isystem F:/NRF/v2.6.1/zephyr/lib/libc/common/include -Wshadow -fno-strict-aliasing -Og -imacros F:/NRF/v2.5.0/zephyr/samples/basic/littlefs_2/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=F:/NRF/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros F:/NRF/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -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=F:/NRF/v2.5.0/zephyr/samples/basic/littlefs_2=CMAKE_SOURCE_DIR -fmacro-prefix-map=F:/NRF/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=F:/NRF/v2.6.1=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 F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c
    In file included from F:/NRF/v2.6.1/zephyr/include/zephyr/toolchain.h:50,
                     from F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util.h:18,
                     from F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:26,
                     from F:/NRF/v2.6.1/zephyr/include/zephyr/device.h:12,
                     from F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/flash.h:28,
                     from F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:14:
    F:/NRF/v2.6.1/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)
          |                                    ^~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1468:1: note: in expansion of macro 'BUILD_ASSERT'
     1468 | BUILD_ASSERT(DT_INST_NODE_HAS_PROP(0, jedec_id),
          | ^~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "jedec,spi-nor size required for non-runtime SFDP page layout"
       87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                    ^~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1477:1: note: in expansion of macro 'BUILD_ASSERT'
     1477 | BUILD_ASSERT(DT_INST_NODE_HAS_PROP(0, size),
          | ^~~~~~~~~~~~
    F:/NRF/v2.5.0/zephyr/samples/basic/littlefs_2/build/zephyr/include/generated/devicetree_generated.h:2168:35: error: 'DT_N_S_soc_S_spi_40004000_P_size' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_spi_40004000_P_reg'?
     2168 | #define DT_N_INST_0_jedec_spi_nor DT_N_S_soc_S_spi_40004000
          |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/toolchain/gcc.h:87:51: note: in definition of macro 'BUILD_ASSERT'
       87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:615:32: note: in expansion of macro 'DT_CAT3'
      615 | #define DT_PROP(node_id, prop) DT_CAT3(node_id, _P_, prop)
          |                                ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:3521:34: note: in expansion of macro 'DT_PROP'
     3521 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                  ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_N_INST_0_jedec_spi_nor'
      105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
          |                                    ^
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:334:31: note: in expansion of macro 'UTIL_CAT'
      334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:3319:27: note: in expansion of macro 'DT_INST'
     3319 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:3521:42: note: in expansion of macro 'DT_DRV_INST'
     3521 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                          ^~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1481:23: note: in expansion of macro 'DT_INST_PROP'
     1481 | #define INST_0_BYTES (DT_INST_PROP(0, size) / 8)
          |                       ^~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1487:29: note: in expansion of macro 'INST_0_BYTES'
     1487 | #define LAYOUT_PAGES_COUNT (INST_0_BYTES / CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE)
          |                             ^~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1489:55: note: in expansion of macro 'LAYOUT_PAGES_COUNT'
     1489 | BUILD_ASSERT((CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE * LAYOUT_PAGES_COUNT)
          |                                                       ^~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1489:14: error: expression in static assertion is not an integer
     1489 | BUILD_ASSERT((CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE * LAYOUT_PAGES_COUNT)
          |              ^
    F:/NRF/v2.6.1/zephyr/include/zephyr/toolchain/gcc.h:87:51: note: in definition of macro 'BUILD_ASSERT'
       87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
          |                                                   ^~~~
    In file included from F:/NRF/v2.6.1/zephyr/include/zephyr/toolchain/gcc.h:98:
    F:/NRF/v2.6.1/zephyr/include/zephyr/device.h:89:41: error: '__device_dts_ord_DT_N_S_soc_S_spi_40004000_BUS_ORD' undeclared here (not in a function)
       89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
      137 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    F:/NRF/v2.6.1/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
       89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
      216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:388:24: note: in expansion of macro 'DEVICE_DT_GET'
      388 |                 .bus = DEVICE_DT_GET(DT_BUS(node_id)),               \
          |                        ^~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:404:9: note: in expansion of macro 'SPI_DT_SPEC_GET'
      404 |         SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
          |         ^~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1528:16: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
     1528 |         .spi = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8),
          |                ^~~~~~~~~~~~~~~~~~~~
    F:/NRF/v2.5.0/zephyr/samples/basic/littlefs_2/build/zephyr/include/generated/devicetree_generated.h:2168:35: error: 'DT_N_S_soc_S_spi_40004000_P_spi_max_frequency' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_spi_40003000_P_max_frequency'?
     2168 | #define DT_N_INST_0_jedec_spi_nor DT_N_S_soc_S_spi_40004000
          |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:4343:29: note: in definition of macro 'DT_CAT3'
     4343 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3
          |                             ^~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:332:30: note: in expansion of macro 'DT_PROP'
      332 |                 .frequency = DT_PROP(node_id, spi_max_frequency),       \
          |                              ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:389:27: note: in expansion of macro 'SPI_CONFIG_DT'
      389 |                 .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
          |                           ^~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:404:9: note: in expansion of macro 'SPI_DT_SPEC_GET'
      404 |         SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
          |         ^~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_N_INST_0_jedec_spi_nor'
      105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
          |                                    ^
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:334:31: note: in expansion of macro 'UTIL_CAT'
      334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:3319:27: note: in expansion of macro 'DT_INST'
     3319 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:404:25: note: in expansion of macro 'DT_DRV_INST'
      404 |         SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
          |                         ^~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1528:16: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
     1528 |         .spi = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8),
          |                ^~~~~~~~~~~~~~~~~~~~
    F:/NRF/v2.5.0/zephyr/samples/basic/littlefs_2/build/zephyr/include/generated/devicetree_generated.h:2168:35: error: 'DT_N_S_soc_S_spi_40004000_P_duplex' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_spi_40004000_P_reg'?
     2168 | #define DT_N_INST_0_jedec_spi_nor DT_N_S_soc_S_spi_40004000
          |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:4343:29: note: in definition of macro 'DT_CAT3'
     4343 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3
          |                             ^~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:334:25: note: in expansion of macro 'DT_PROP'
      334 |                         DT_PROP(node_id, duplex) |                      \
          |                         ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:389:27: note: in expansion of macro 'SPI_CONFIG_DT'
      389 |                 .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
          |                           ^~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:404:9: note: in expansion of macro 'SPI_DT_SPEC_GET'
      404 |         SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
          |         ^~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_N_INST_0_jedec_spi_nor'
      105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
          |                                    ^
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:334:31: note: in expansion of macro 'UTIL_CAT'
      334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:3319:27: note: in expansion of macro 'DT_INST'
     3319 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:404:25: note: in expansion of macro 'DT_DRV_INST'
      404 |         SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
          |                         ^~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1528:16: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
     1528 |         .spi = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8),
          |                ^~~~~~~~~~~~~~~~~~~~
    F:/NRF/v2.5.0/zephyr/samples/basic/littlefs_2/build/zephyr/include/generated/devicetree_generated.h:2168:35: error: 'DT_N_S_soc_S_spi_40004000_P_frame_format' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_spi_40004000_P_interrupts'?
     2168 | #define DT_N_INST_0_jedec_spi_nor DT_N_S_soc_S_spi_40004000
          |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:4343:29: note: in definition of macro 'DT_CAT3'
     4343 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3
          |                             ^~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:335:25: note: in expansion of macro 'DT_PROP'
      335 |                         DT_PROP(node_id, frame_format) |                        \
          |                         ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:389:27: note: in expansion of macro 'SPI_CONFIG_DT'
      389 |                 .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
          |                           ^~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:404:9: note: in expansion of macro 'SPI_DT_SPEC_GET'
      404 |         SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
          |         ^~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_N_INST_0_jedec_spi_nor'
      105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
          |                                    ^
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:334:31: note: in expansion of macro 'UTIL_CAT'
      334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:3319:27: note: in expansion of macro 'DT_INST'
     3319 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:404:25: note: in expansion of macro 'DT_DRV_INST'
      404 |         SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
          |                         ^~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1528:16: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
     1528 |         .spi = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8),
          |                ^~~~~~~~~~~~~~~~~~~~
    In file included from F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:19:
    F:/NRF/v2.5.0/zephyr/samples/basic/littlefs_2/build/zephyr/include/generated/devicetree_generated.h:2174:57: warning: unsigned conversion from 'int' to 'short unsigned int' changes value from '1073758208' to '16384' [-Woverflow]
     2174 | #define DT_N_S_soc_S_spi_40004000_REG_IDX_0_VAL_ADDRESS 1073758208 /* 0x40004000 */
          |                                                         ^~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:4345:33: note: in expansion of macro 'DT_N_S_soc_S_spi_40004000_REG_IDX_0_VAL_ADDRESS'
     4345 | #define DT_CAT4(a1, a2, a3, a4) a1 ## a2 ## a3 ## a4
          |                                 ^~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:2202:9: note: in expansion of macro 'DT_CAT4'
     2202 |         DT_CAT4(node_id, _REG_IDX_, idx, _VAL_ADDRESS)
          |         ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:2225:30: note: in expansion of macro 'DT_REG_ADDR_BY_IDX'
     2225 | #define DT_REG_ADDR(node_id) DT_REG_ADDR_BY_IDX(node_id, 0)
          |                              ^~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:339:26: note: in expansion of macro 'DT_REG_ADDR'
      339 |                 .slave = DT_REG_ADDR(node_id),                          \
          |                          ^~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:389:27: note: in expansion of macro 'SPI_CONFIG_DT'
      389 |                 .config = SPI_CONFIG_DT(node_id, operation_, delay_) \
          |                           ^~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:404:9: note: in expansion of macro 'SPI_DT_SPEC_GET'
      404 |         SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
          |         ^~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_N_INST_0_jedec_spi_nor'
      105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
          |                                    ^
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:334:31: note: in expansion of macro 'UTIL_CAT'
      334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:3319:27: note: in expansion of macro 'DT_INST'
     3319 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/drivers/spi.h:404:25: note: in expansion of macro 'DT_DRV_INST'
      404 |         SPI_DT_SPEC_GET(DT_DRV_INST(inst), operation_, delay_)
          |                         ^~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1528:16: note: in expansion of macro 'SPI_DT_SPEC_INST_GET'
     1528 |         .spi = SPI_DT_SPEC_INST_GET(0, SPI_WORD_SET(8),
          |                ^~~~~~~~~~~~~~~~~~~~
    F:/NRF/v2.5.0/zephyr/samples/basic/littlefs_2/build/zephyr/include/generated/devicetree_generated.h:2168:35: error: 'DT_N_S_soc_S_spi_40004000_P_jedec_id' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_spi_40004000_P_reg'?
     2168 | #define DT_N_INST_0_jedec_spi_nor DT_N_S_soc_S_spi_40004000
          |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:4343:29: note: in definition of macro 'DT_CAT3'
     4343 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3
          |                             ^~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:3521:34: note: in expansion of macro 'DT_PROP'
     3521 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                  ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_N_INST_0_jedec_spi_nor'
      105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
          |                                    ^
    F:/NRF/v2.6.1/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
      104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
          |                          ^~~~~~~~~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:334:31: note: in expansion of macro 'UTIL_CAT'
      334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
          |                               ^~~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:3319:27: note: in expansion of macro 'DT_INST'
     3319 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
          |                           ^~~~~~~
    F:/NRF/v2.6.1/zephyr/include/zephyr/devicetree.h:3521:42: note: in expansion of macro 'DT_DRV_INST'
     3521 | #define DT_INST_PROP(inst, prop) DT_PROP(DT_DRV_INST(inst), prop)
          |                                          ^~~~~~~~~~~
    F:/NRF/v2.6.1/zephyr/drivers/flash/spi_nor.c:1545:21: note: in expansion of macro 'DT_INST_PROP'
     1545 |         .jedec_id = DT_INST_PROP(0, jedec_id),
          |                     ^~~~~~~~~~~~
    [94/149] Building C object zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_nrfx_common.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'F:\NRF\toolchains\cf2149caf2\opt\bin\cmake.EXE' --build 'f:\NRF\v2.5.0\zephyr\samples\basic\littlefs_2\build'
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 
    

  • I tried on my end.

    To build the hello world sample with the overlay and prj.conf you supplied earlier in this ticket. Building for nrf52dk_nrf52832.

    And it builds without error on my side.
    Do you see the same if you do this with the hello world sample?

Related