FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [July 2016 Threads]
Hi,
I'm trying to optimize a footprint and reduce size of Ram disk, but get error if I define it smaller than 3 mb.
Image contains backtrace, place where it fails and some local variables.
I'd appreciate any idea.
https://rslutsker-gmail.tinytake.com/sf/ODUzNjA5XzM3MTEwMTE
Thanks
Rasty
FAT imposes some minimum volume sizes. For example see the following
thread: http://superuser.com/questions/74392/minimum-volume-size-for-fat16
The minimum size for FAT12 is smaller.
How can I force it to use FAT12?
Unfortunately, the FF_Format()
routine does not (yet) support FAT12, only FAT16 and FAT32.
Two parameters indicate your preference:
xPreferFAT16
: try to use FAT16, if not possible, try FAT32
xSmallClusters
: try small clusters first, if not possibly, try larger clusters.
Larger clusters are more efficient in terms of speed, small clusters have less waste of space.
Microsoft states that:
~~~~
if( CountofClusters < 4085 )
{
/* Volume is FAT12 /
}
else if( CountofClusters < 65525 )
{
/ Volume is FAT16 /
}
else
{
/ Volume is FAT32 */
}
~~~~
+FAT is following Microsoft's guidelines to get a maximum compatibility. However, you are not going to exchange your RAM disk with another system.
You could try the following in ff_format.c
:
~~~~
ifdef ffconfigMINCLUSTERSFAT16
#define MIN_CLUSTERS_FAT16 ffconfigMIN_CLUSTERS_FAT16
else
#define MIN_CLUSTERS_FAT16 ( 4085 + 1 )
endif
~~~~
And define ffconfigMIN_CLUSTERS_FAT16
in your FreeRTOSFATConfig.h
with a smaller value of e.g. :
~~~~
#define ffconfigMINCLUSTERSFAT16 1800
~~~~
Regards.
Just tested in the WIN32 demo project and it works as expected.
A 2MB RAM-disk will get 4023 clusters, a 1MB disk gets1991 clusters. In these cases, each cluster will contain a single sector of 512 bytes.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.