Tool/software:
I am using the following: CCS 8.3.0, TIRTOS 2.16.1.14, compiler 5.2.7, XDC 3.31.1333, TM4C1294NCPDT, ndk_2_25_00_09
Currently I have code that can read and write a small external flash chip using a single SPI on the Tiva. I can send and receive the data to and from the small flash via TFTP to and from a remote system so I have a functional implementation. The small flash holds 2 different files of known size and type and the memory is pre partitioned according to the expected sizes of the two expected files. Example: file1.txt is max 400k in size and file2.bin is 5 Meg so the flash is partitioned to allocate say 500K for the first file and 6Meg for the second file. This may not be ideal, but it works and meets the needs.
I am adding a large 1G Byte flash chip to a single channel SPI channel (SPI channel 3) on the Tiva for more external storage. It would be nice to use 4 channel SPI but the pins that would be used for the other 3 channels are currently used on the Tiva so using 4 channel SPI is not a option.
I am considering if there is the better way to implement a small lightweight file system for external flash memory but since the Tiva is a small micro with limited resources, I don’t want to implement something that’s going to consume all the RAM and flash space in the Tiva for the firmware. I do have code I can reuse as described above that can send and receive using TFTP. I can pre allocate the 1G Byte flash space like I did with the small flash by pre defining for example 10 sections in the 1GByte flash and I can only have up to 10 files.
The long term plan for the flash is we only need to add a few more files but a few files may be 35Meg each in size so it is never expected to ever have many small files of varying sizes so pre partition would probably be fine but it would limit the flexibility long term.
Is there a better way I should consider implement this?
I see that TI RTOS has a RAM disk but I don’t know if there is anything else in the TI RTOS I should be considering for flash or if there is a better approach I should be using?
Thanks,
Doug