SPI: warning: SSD1333 (defined at [...]/drivers/Kconfig.ssd1333:6) was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies...

Hello,

I'm trying to figure out why I get this warning that seems to block the compilation process but a bit of context first :

I'm resuming a project that was paused almost 2 years now on the nrf52840. I was developping on MacOS and I'm trying now to get things work again.

Meanwhile, I had to reinstall my dev environment because of switching from Intel chip to Mac chip architecture and also had to upgrade to latest toolchain and Zephyr SDK versions available (both v3.0.2 now).

Ever since, it shows this warning along with CONFIG_LV_* symbols that seems to be now "undefined" (but that's for another story).

Now, I created a build configuration with the following :

SDK : nRF Connect SDK v3.0.2

Toolchain : nRF Connect SDK Toolchain v3.0.2

Board target : nrf52840_quantum ("compatible" option checked)

Base configuration files (Kconfig fragments) : prj.conf

Base Devicetree Overlays : boards/arm/nrf52840_quantum.overlay

prj.conf:

CONFIG_GPIO=y
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_DEBUG_THREAD_INFO=y
CONFIG_INIT_STACKS=y
CONFIG_FPU=y
CONFIG_NRFX_POWER=y
CONFIG_POWER_DOMAIN=y

CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
CONFIG_CBPRINTF_FP_SUPPORT=y

#CONFIG_THREAD_STACK_INFO=y

CONFIG_HEAP_MEM_POOL_SIZE=50536
# CONFIG_IDLE_STACK_SIZE=8192
# CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_SYS_HEAP_RUNTIME_STATS=y

CONFIG_PRINTK=y
CONFIG_CONSOLE=y

CONFIG_THREAD_NAME=y


# USB
#CONFIG_USB=y
#CONFIG_USB_DEVICE_STACK=y
#CONFIG_USB_DEVICE_PRODUCT="DFKI zephyr SPI sample"
#CONFIG_USB_UART_CONSOLE=y
#CONFIG_USB_UART_DTR_WAIT=y

# ADC
CONFIG_ADC=y
CONFIG_ADC_ASYNC=n

CONFIG_SSD1333=y

CONFIG_DISPLAY=y

CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=4
# CONFIG_DISPLAY_LOG_LEVEL_DBG=y

CONFIG_LVGL=y
CONFIG_LV_USE_LARGE_COORD=y
CONFIG_LV_MEM_CUSTOM=n
#CONFIG_LV_Z_MEM_POOL_NUMBER_BLOCKS=8
CONFIG_LV_USE_LOG=y
CONFIG_LV_LOG_PRINTF=y
CONFIG_LV_LOG_LEVEL_WARN=y
# CONFIG_LV_LOG_LEVEL_TRACE=y
CONFIG_LV_USE_LABEL=y
CONFIG_LV_USE_BTN=y
CONFIG_LV_USE_IMG=y
# CONFIG_LV_USE_METER=y
CONFIG_LV_USE_CHART=y
CONFIG_LV_USE_LIST=y
CONFIG_LV_USE_ROLLER=y
CONFIG_LV_DRAW_COMPLEX=y
CONFIG_LV_Z_POINTER_KSCAN=n
CONFIG_LV_COLOR_DEPTH_16=y
CONFIG_LV_COLOR_16_SWAP=y
CONFIG_LV_THEME_DEFAULT_DARK=y
CONFIG_LV_USE_FONT_SUBPX=y
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x0000FF
CONFIG_LV_DISP_DEF_REFR_PERIOD=500

# I2C
CONFIG_I2C=n

# SPI (I tried a bit everything)
CONFIG_NORDIC_QSPI=y
CONFIG_QSPI=y
CONFIG_SPI_NRFX=y
CONFIG_SPI_ASYNC=y
CONFIG_SPI_NRFX_QSPI=y
CONFIG_SPI_NRFX_QSPI_DMA=y
CONFIG_SPI=y

Kconfig:

rsource "Kconfig.quantum"

Kconfig.quantum:

menu "Quantum"

rsource "drivers/Kconfig.ssd1333"

endmenu

drivers/Kconfig.ssd1333:

menuconfig SSD1333
	bool "SSD1333 display driver"
	depends on SPI || QSPI || I2C
	help
	  Enable driver for SSD1333 display driver.

if SSD1333
[...]

boards/arm/nrf52840_quantum.dts (spi3 / qspi section):

&spi3 {
  compatible = "nordic,nrf-spim";
  status = "disabled";
  pinctrl-0 = <&spi3_default>;
  pinctrl-1 = <&spi3_sleep>;
  pinctrl-names = "default", "sleep";
};

&qspi {
  status = "okay";
  pinctrl-0 = <&qspi_default>;
  pinctrl-1 = <&qspi_sleep>;
  pinctrl-names = "default", "sleep";
  mx25r64: mx25r6435f@0 {
    compatible = "nordic,qspi-nor";
    reg = <0>;
    /* MX25R64 supports only pp and pp4io */
    writeoc = "pp4io";
    /* MX25R64 supports all readoc options */
    readoc = "read4io";
    sck-frequency = <8000000>;
    label = "MX25R64";
    jedec-id = [ c2 28 17  ];
    sfdp-bfp = [ e5 20 f1 ff ff ff ff 03 44 eb 08 6b 08 3b 04 bb ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52 10 d8 00 ff 23 72 f5 00 82 ed 04 cc 44 83 68 44 30 b0 30 b0 f7 c4 d5 5c 00 be 29 ff f0 d0 ff ff  ];
    size = <67108864>;
    has-dpd;
    t-enter-dpd = <10000>;
    t-exit-dpd = <35000>;
  };
};

boards/arm/nrf52840_quantum.overlay (spi3 section):

&spi3 {
  compatible = "nordic,nrf-spim";
  status = "okay";
  pinctrl-0 = <&spi3_default>;
  pinctrl-1 = <&spi3_sleep>;
  cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
  // mosi-pin = <32>;
  // sck-pin = <41>;
  pinctrl-names = "default", "sleep";
  clock-frequency = <8000000>;

  ssd1333: ssd1333@0 {
    compatible = "solomon,ssd1333";
    label = "SSD1333";
    spi-max-frequency = <8000000>;
    reg = <0>;
    data-ctrl-gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
    reset-gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
    width = <160>;
    height = <128>;
  };
};

Almost-full error:

 *  Executing task: nRF Connect: Generate config nrf52840_quantum for /Users/developpement/Quantum 

Building Quantum
west build --build-dir /Users/developpement/Quantum/build /Users/developpement/Quantum --pristine --board nrf52840_quantum -- -DCONF_FILE=prj.conf -DDTC_OVERLAY_FILE=boards/arm/nrf52840_quantum/nrf52840_quantum.overlay -DBOARD_ROOT=/Users/developpement/Quantum

-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: /opt/nordic/ncs/toolchains/ef4fc6722e/opt/[email protected]/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
-- Cache files will be written to: /Users/Library/Caches/zephyr
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf52840_quantum
Parsing /opt/nordic/ncs/v3.0.2/zephyr/share/sysbuild/Kconfig
Loaded configuration '/Users/developpement/Quantum/build/_sysbuild/empty.conf'
Merged configuration '/Users/developpement/Quantum/build/_sysbuild/empty.conf'
Configuration saved to '/Users/developpement/Quantum/build/zephyr/.config'
Kconfig header saved to '/Users/developpement/Quantum/build/_sysbuild/autoconf.h'
CMake Error at /opt/nordic/ncs/v3.0.2/nrf/sysbuild/CMakeLists.txt:111 (list):
  list GET given empty list
Call Stack (most recent call first):
  cmake/modules/sysbuild_extensions.cmake:583 (nrf_PRE_CMAKE)
  cmake/modules/sysbuild_extensions.cmake:583 (cmake_language)
  cmake/modules/sysbuild_images.cmake:36 (sysbuild_module_call)
  cmake/modules/sysbuild_default.cmake:21 (include)
  /opt/nordic/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  /opt/nordic/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  /opt/nordic/ncs/v3.0.2/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  template/CMakeLists.txt:10 (find_package)


-- 
   *****************************
   * Running CMake for Quantum *
   *****************************

Loading Zephyr default modules (Zephyr base).
-- Application: /Users/developpement/Quantum
-- CMake version: 3.21.0
-- Found Python3: /opt/nordic/ncs/toolchains/ef4fc6722e/bin/python (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
-- Cache files will be written to: /Users/Library/Caches/zephyr
-- Zephyr version: 4.0.99 (/opt/nordic/ncs/v3.0.2/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: nrf52840_quantum
-- Found host-tools: zephyr 0.17.0 (/opt/nordic/ncs/toolchains/ef4fc6722e/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.17.0 (/opt/nordic/ncs/toolchains/ef4fc6722e/opt/zephyr-sdk)
-- Found Dtc: /opt/nordic/ncs/toolchains/ef4fc6722e/bin/dtc (found suitable version "1.6.1", minimum required is "1.4.6") 
-- Found BOARD.dts: /Users/developpement/Quantum/boards/arm/nrf52840_quantum/nrf52840_quantum.dts
-- Found devicetree overlay: boards/arm/nrf52840_quantum/nrf52840_quantum.overlay
-- Generated zephyr.dts: /Users/developpement/Quantum/build/Quantum/zephyr/zephyr.dts
-- Generated pickled edt: /Users/developpement/Quantum/build/Quantum/zephyr/edt.pickle
-- Generated zephyr.dts: /Users/developpement/Quantum/build/Quantum/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /Users/developpement/Quantum/build/Quantum/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /Users/developpement/Quantum/build/Quantum/zephyr/dts.cmake
CMake Warning at /opt/nordic/ncs/v3.0.2/zephyr/cmake/modules/dts.cmake:428 (message):
  dtc raised one or more warnings:

  
  /Users/developpement/Quantum/build/Quantum/zephyr/zephyr.dts:72.25-77.5:
  Warning (unique_unit_address_if_enabled): /soc/clock@40000000: duplicate
  unit-address (also used in node /soc/power@40000000)

  
  /Users/developpement/Quantum/build/Quantum/zephyr/zephyr.dts:379.21-383.5:
  Warning (unique_unit_address_if_enabled): /soc/acl@4001e000: duplicate
  unit-address (also used in node /soc/flash-controller@4001e000)

Call Stack (most recent call first):
  /opt/nordic/ncs/v3.0.2/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
  /opt/nordic/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /opt/nordic/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:5 (find_package)



warning: SSD1333 (defined at /Users/developpement/Quantum/drivers/Kconfig.ssd1333:6) was
assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: (SPI || QSPI ||
I2C) (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SSD1333 and/or look up
SSD1333 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.


/Users/developpement/Quantum/boards/arm/nrf52840_quantum/nrf52840_quantum_defconfig:4: warning: attempt to assign the value 'y' to the undefined symbol SOC_SERIES_NRF52X
// And so on...

What I already did :

  • Deleting the associated build folder to generate a new one from VSCode's NRF Connect plugin ;
  • Adding `CONFIG_SPI=y` or `config SPI -> default y` at every Kconfig / *.defconfig project file (including the board) I could think of on the inclusion path ;
  • Making sure I define SPI / QSPI blocks on dts and overlay files ;
  • Check the .config file on the build directory but I only see `SB_*` vars defined

Has something changed since some versions when configuring/enabling SPI ? Can you point me out where I missed something or how could I debug this ?

Thanks in advance !

Related