Page 1 of 1

Large flash file system on NANO54415

Posted: Wed May 07, 2014 1:55 pm
by sulliwk06
I'm trying to set up a 3MB file system in the flash on a NANO54415, but I'm getting errors on the mount and format commands when I try to make the file system larger than about 560kb.

I'm basing this off the EFFS-STD-HTTP example for the nano.

When the file system size is around say 512kB:
fd_mountstd() will return 2 and then the drive will be formatted properly

When the file system size is larger:
fd_mountstd() will return 3
then when I try to format the drive
fd_format() will return 1

All I'm doing is modifying the FS_SIZE macro of MX25L6406E.h

I don't understand what the return code from the fd_mountstd call means.
The EFFS error code it matches up with is "F_ERR_INVALIDDIR", // 3


I'm wondering if since the file system is larger I need to allocate more than 2 descriptor blocks, or if there is some other setting I need to modify. I know the file system isn't overlapping my program space because I modified the memory range in Compcode.

Anyone have any ideas? Anyone successfully used a large file system in flash before?

Re: Large flash file system on NANO54415

Posted: Fri May 09, 2014 5:29 am
by sulliwk06
It also appears to not let me place more than 8 files in the file system, regardless of each files size. I'm quite at a loss of what to do.


I have found the HCC Embedded EFFS Implementation Guide online and I looked up the call to fs_mountdrive which is giving me the first error I don't understand. Apparently the return code should be one of these:

FS_VOL_OK successfully mounted
FS_VOL_NOTMOUNT not mounted
FS_VOL_NOTFORMATTED drive is mounted but drive is not formatted
FS_VOL_NOMEMORY not enough memory, drive is not mounted
FS_VOL_NOMORE no more drive available (FS_MAXVOLUME)
FS_VOL_DRVERROR mount driver error, not mounted

But I can find no reference to what the values of these return codes are to see which one I am getting. Is this something I should open a support ticket for? Do I need to try to contact HCC Embedded for support?

Re: Large flash file system on NANO54415

Posted: Fri May 09, 2014 9:48 am
by dciliske
Your walking into the land where mortals fear to tread... What your trying to do is somewhat ugly to accomplish, but entirely reasonable to do. Can you submit a support ticket to us about the issue?

Re: Large flash file system on NANO54415

Posted: Mon May 12, 2014 6:15 pm
by dciliske
It turns out this issue required that the filesystem have descriptors larger than a physical sector. We have modified the driver in the examples to support a multi-sector descriptor block. It requires that all descriptor blocks be set to be a power of 2 of physical sectors in size (4kB, 8kB, 16kB, 32kB, etc.).

-Dan