Large flash file system on NANO54415

Discussion to talk about software related topics only.
Post Reply
sulliwk06
Posts: 118
Joined: Tue Sep 17, 2013 7:14 am

Large flash file system on NANO54415

Post 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?
sulliwk06
Posts: 118
Joined: Tue Sep 17, 2013 7:14 am

Re: Large flash file system on NANO54415

Post 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?
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: Large flash file system on NANO54415

Post 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?
Dan Ciliske
Project Engineer
Netburner, Inc
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: Large flash file system on NANO54415

Post 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
Dan Ciliske
Project Engineer
Netburner, Inc
Post Reply