I am trying to use Xiao BLE Sence QSPI flash as a storage, but got error like this
Any one can help?
/home/wols/Documents/Wols/zephyrproject/zephyr/samples/subsys/usb/mass/src/main.c:36:2: error: #error No supported disk driver enabled
36 | #error No supported disk driver enabled
| ^~~~~
[17/106] Building C object zephyr/lib/libc/common/CMakeFiles/lib__libc__common.dir/source/stdlib/malloc.c.obj
ninja: build stopped: subcommand failed.
Here is build cmd
west build -b xiao_ble/nrf52840/sense zephyr/samples/subsys/usb/mass -DCONFIG_APP_MSC_STORAGE_FLASH_FATFS=y
$ west build -p always --pristine -b xiao_ble/nrf52840/sense zephyr/samples/subsys/usb/mass
-- west build: making build dir /home/wols/Documents/Wols/zephyrproject/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/wols/Documents/Wols/zephyrproject/zephyr/samples/subsys/usb/mass
-- CMake version: 3.20.5
-- Found Python3: /home/wols/Documents/Wols/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/wols/.cache/zephyr
-- Zephyr version: 4.1.0-rc2 (/home/wols/Documents/Wols/zephyrproject/zephyr)
-- Found west (found suitable version "1.3.0", minimum required is "0.14.0")
-- Board: xiao_ble, qualifiers: nrf52840/sense
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.17.0 (/home/wols/zephyr-sdk-0.17.0)
-- Found toolchain: zephyr 0.17.0 (/home/wols/zephyr-sdk-0.17.0)
-- Found Dtc: /home/wols/zephyr-sdk-0.17.0/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/wols/Documents/Wols/zephyrproject/zephyr/boards/seeed/xiao_ble/xiao_ble_nrf52840_sense.dts
-- Generated zephyr.dts: /home/wols/Documents/Wols/zephyrproject/build/zephyr/zephyr.dts
-- Generated pickled edt: /home/wols/Documents/Wols/zephyrproject/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: /home/wols/Documents/Wols/zephyrproject/build/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/wols/Documents/Wols/zephyrproject/build/zephyr/dts.cmake
warning: DISK_DRIVER_FLASH (defined at drivers/disk/Kconfig.flash:4) was assigned the value 'y' but
got the value 'n'. Check these unsatisfied dependencies: DT_HAS_ZEPHYR_FLASH_DISK_ENABLED (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_DISK_DRIVER_FLASH and/or look up
DISK_DRIVER_FLASH 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.
So , You would benefit from watching the Webinars on the Dev academy training , It’s free. Number 8 shows what you are stuck at.
The message at the bottom(warning) telling you the issue, DID you open the Kconfig menu? Did you navigate to Drivers, and select the QSPI for the flash ? Probably NOT?
Your closer though, Keep going. I see this was a pristine build so that a start. You’ll need a build that includes the boot loader and the QSPI flash drivers too. Did you make a Partition manager . yaml file for the build ? Looks like your short a few steps.
hit this link and See where it went sideways…
indicates that Zephyr’s Mass Storage Class (MSC) sample is missing a proper disk driver — in this case, it’s trying to use QSPI Flash with FATFS, but the configuration or overlay likely doesn’t correctly set up the flash as a usable disk device.
Enable the CONFIG_DISK_ACCESS_FLASH and related FATFS options.
SO , In Zephyr Kconfig, dependencies override your direct config choice.
So even if you manually write CONFIG_DISK_DRIVER_FLASH=y, it gets turned off (n) if its dependency like DT_HAS_ZEPHYR_FLASH_DISK_ENABLED is n.
This is why he sees the warning — not an error, but a heads-up that the config request was ignored.
The unmet dependency is:
DT_HAS_ZEPHYR_FLASH_DISK_ENABLED (=n)
This means that the device tree does not define a “flash-disk” node (usually under /flash, or some partition label).
What’s Missing / Likely Cause:
The user did not enable or define a proper flash partition (storage node) in their Device Tree overlay (DTS).