Loading ...
Sorry, an error occurred while loading the content.

4729RE: SmartFS unusable in git source

Expand Messages
  • spudarnia
    Nov 15, 2013
    • 0 Attachment
      Hi, Daniel,

      Welcome to the group,

      > I've recently been using NuttX in an STM32 project and I'm using SmartFS to store some files on an external SPI flash.
      >
      > Unless I've missed something it's not actually possible to use SmartFS in the vanilla source checked out from git. With SmartFS only enabled you can't mount it.. I suspect line 71 of nuttx/fs/fs_mount.c should be changed from:
      >
      > #if defined(CONFIG_FS_FAT) || defined(CONFIG_FS_ROMFS)
      >
      > to
      >
      > #if defined(CONFIG_FS_FAT) || defined(CONFIG_FS_ROMFS) || defined(CONFIG_FS_SMARTFS)

      You are right!  That list enables support for file file systems that require block drivers.

      > Then in nuttx/drivers/mtd/smart.c there are a few places that enable support to write that are wrapped in #ifdef CONFIG_FS_WRITABLE and CONFIG_FS_WRITABLE doesn't seem to be settable anywhere in the menuconfig system.

      No, this cone is sneaky.  CONFIG_FS_WRITABLE is defined automatically in include/nuttx/config.h by the tool at tools/mkconfig.c if any writable file systems are enabled.  This really would work better if just selected in a Kconfig file, but there are lots of old pre-Kconfig configurations that still depend on these definitions.

      I have updated tools/mkconfig.c.  If you remove the old mkconfig executable from tools/ it should get re-built.

      > I have hacked these bits into my local checkout and the fs itself seems to be working pretty well. :)

      Good.  I am glad that these issues did not hold you up.  I suspect no one saw the problem before because some other write-able, block driver file system was always enabled as well.  That would completely mask the problem.

      Thanks,
      Greg
    • Show all 4 messages in this topic