How to enable littlefs in mcuboot (not in the app)

My project needs to enable Litlefs to read files in the bootloader. I added it in the configuration file of mcuboot

CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_LITTLEFS=y

But when these errors occur ,I can't find the reason

Can you help me solve this problem? (I think it is feasible to enable LFS in bootloader)

Thank you.

Parents Reply Children
  • Thank you for your prompt reply.

    I removed the current build folder and rebuilt it again. If LFS is not enabled in the bootloader, the build is successful, but if Litlefs is enabled in the bootloader's config, the build will fail.Now that these error messages have been output, it seems that it is because there is no function required by LFS in the bootloader?

    What should I do next to cooperate with you to solve this problem?

  • It seems that the LittleFS subsystem implementation depends on some multithreading APIs. It should work if you enable multithreading for MCUboot.

    I see that you have a new case today where LittleFS is already working fine. Can I assume that this issue is overcome? Could you please share the solution for future readers?

  • Hi Hieu

    Thank you for your reply. This is indeed the correct method. Enabling multithreading in the configuration of mcuboot can solve this problem.

    My original method was to comment out the undefined functions mentioned in the error message and have them return 0 directly.

    This way, LFS can also be used normally, but there may be unknown errors.

    Thank you again for helping me solve the problem

Related