Hello Xiang,

Thank you for your quick response.

How do I manage the format of a littlefs 'disk' from programming (not
nutshell) ?

I am looking for something similar to 'mksmatfs' function.

Or only the flash_eraseall function is enough? Or should I add the "-o
autoformat" option on the last parameter of the mount() function?

Best regards,

Flavio


Em qua., 28 de abr. de 2021 às 09:33, Xiang Xiao
<xiaoxiang781...@gmail.com> escreveu:
>
> LittleFS can talk directly with the standard MTD driver, so you just need:
>
>    1. Call register_mtddriver in your board file
>    2. Run mount from nsh like this:
>
>            mount -t littlefs -o autoformat /dev/mtd /mnt
>
>
> On Wed, Apr 28, 2021 at 8:03 PM Flavio Castro Alves Filho <
> flavio.al...@gmail.com> wrote:
>
> > Hello,
> >
> > Today my application uses SmartFS associated with MX25L SPI Dataflash.
> >
> > I intend to replace the SmartFS to LittleFS.
> >
> > In the filesystem section of menuconfig, I can disable
> > CONFIG_FS_SMARTFS and enable CONFIG_FS_SMARTFS.
> >
> > But when I go to "Device Drivers" --> "Memory Technology Device (MTD)
> > Support", there is an option CONFIG_MTD_SMART.
> >
> > Is there any equivalent configuration for LittleFS?
> >
> > After enabling the LittleFS, is there anything that must be done at
> > the board code to enable it?
> >
> > Best Regards,
> >
> > Flavio
> >
> >
> > --
> > Flavio de Castro Alves Filho
> >
> > flavio.al...@gmail.com
> > Twitter: http://twitter.com/#!/fraviofii
> > LinkedIn profile: www.linkedin.com/in/flaviocastroalves
> >



-- 
Flavio de Castro Alves Filho

flavio.al...@gmail.com
Twitter: http://twitter.com/#!/fraviofii
LinkedIn profile: www.linkedin.com/in/flaviocastroalves

Reply via email to