4729RE: SmartFS unusable in git source
- Nov 15, 2013Hi, 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.You are right! That list enables support for file file systems that require block drivers.
> 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)
> #if defined(CONFIG_FS_FAT) || defined(CONFIG_FS_ROMFS) || defined(CONFIG_FS_SMARTFS)
> 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.
- << Previous post in topic Next post in topic >>