Integrating custom littleFS libary mounted on External NOR Flash

Hi Morse Micro Team,

We are currently building an application using the mm_iot_sdk on platform IO. Our use case requires using and external nor flash and we are mounting a littlefs filesystem on this. The sdk already has a littlefs component with the file system on the internal mcu flash. We want to omit the inbuilt mmiot littlefs component from our build and use a custom library instead. The problem is when we delete the littlefs component from the custom_mm_iot_components list in the platfom.ini file , we still get build errors stating that “lfs.h” is missing (Image 1 attached). A bit of digging reveals that there are some shim layer source files, “mmosal_shim_fileio.c” and “mmhal_littlefs.c”, that reference this. Modifying the platform make file in the sdk to filter out these source files still leads to build errors when we try to build (Image 2). Please advise on the best way to go about making this change. Thank you


Hi @doludiran

As far as I can tell you are on the right track for removing those files from the build. As these are only specific to a few of our examples, it should be safe to exclude them from the build.

I ran through the same thing with our ping example for the mm-ekh08-u575 and was able to successfully compile an image after adding those two files to the exclusion list.

The second image indicates it’s still trying to compile those files - try performing a full clean, in case there is an underlying Scons cache which needs to be cleared. However I note that this was not necessary for me.

1 Like

Thanks for your help @ajudge the issue is resolved