heinbali01 wrote on Wednesday, March 22, 2017:
Hi Michael,
that would be an option
Even though I would need a solution for windows as well.
As well? You can create the C source file under Linux and compile under Windows. The nice thing is that the Linux process can easily be automated with a script.
And is it possible to reduce the cluster size to 256byte,
as this is the minimum write size the LPC1758 allows?
I’m afraid that the 512-byte size is almost hard-coded into the library. The reason is that most media use 512-byte sectors.
My initial motivation to implement +FAT was, that the +TCP http server requires it per default.
How much work would it be to change it for e.g. the uip http-fs?
If your embedded web page is very simple, then you might just store a few HTTP files in flash and simulate the calls to ff_fopen()
, ff_fread()
, and ff_fclose()
.
I have heard of uIP, but not “uip http-fs”.
The minimum FAT16 size is 4.1MB.
Does this account for the +FAT implementation as well?
+FAT uses ffconfigMIN_CLUSTERS_FAT16
and ffconfigMIN_CLUSTERS_FAT32
to decrease these boundaries. By default, their values are 4086 and 65525 (clusters).
Might FAT12 be a solution?
+FAT also has FAT12 included, but to be honest, I don’t know user’s experiences with it. I rarely use it my self.
Also the limited 32kb RAM is a problem, regarding all the buffers used for caching.
A HTTP server, a +FAT driver, and a small RAM disk?
To put it positively, that’s quite a challenge!
/* Some parameters to reduce the RAM foot-print of +TCP.
Settings are not yet tested. */
#define ipconfigNETWORK_MTU 552 /* To get an MSS of 512 bytes. */
#define ipconfigUSE_TCP_WIN 0 /* No TCP sliding windows. */
#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 3
#define ipconfigTCP_RX_BUFFER_LENGTH ( 2 * ipconfigTCP_MSS )
#define ipconfigTCP_TX_BUFFER_LENGTH ( 2 * ipconfigTCP_MSS )
Regards.