USB Mass Storage sample not building with LittleFS on SDK 2.9 (nrf52840)

I'm trying to get the USB Mass Storage sample working on the nRF52840 using SDK 2.9. I followed the official guide here:
https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/samples/subsys/usb/mass/README.html

My goal is to use LittleFS as the storage backend for the USB Mass Storage device. However, when I try to build the sample using the following command:

west build -b nrf52840dk/nrf52840 samples/subsys/usb/mass -- -DCONFIG_APP_MSC_STORAGE_FLASH_LITTLEFS=y

I get a build error. I also tried with SDK 2.7 just in case, but I ran into the same issue.


I came across a similar question on the forums:
https://devzone.nordicsemi.com/f/nordic-q-a/117539/fs_sample-doesn-t-work-in-my-nrf52840-dk
But in that case, the suggested workaround was to use RAM instead of flash for storage, which doesn't quite fit my use case.

Am I missing something in the configuration? Is LittleFS currently supported as a backend for the USB MSC sample on nRF52840?

Thanks in advance

Parents
  • USB MSC is a dumb interface that only cares about raw blocks and lets the host deal with any filesystem issues. Consequently you can't really use the data with a host connected over USB since it could cache stuff.

    No host OS that I am aware of knows how to handle littlefs device out-of-the-box. Are use using something unusual? Windows for example would just ask the user to format the device with FAT(12).

    USB MSC should be able to use the flash device that contains littlefs as a backend when configured correctly (see other post about PM), but the NRF MCU must not use anything stored there with USB connected.

Reply
  • USB MSC is a dumb interface that only cares about raw blocks and lets the host deal with any filesystem issues. Consequently you can't really use the data with a host connected over USB since it could cache stuff.

    No host OS that I am aware of knows how to handle littlefs device out-of-the-box. Are use using something unusual? Windows for example would just ask the user to format the device with FAT(12).

    USB MSC should be able to use the flash device that contains littlefs as a backend when configured correctly (see other post about PM), but the NRF MCU must not use anything stored there with USB connected.

Children
No Data
Related