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] [December 2006 Threads] Integrating a file systemPosted by Colin Stanley on December 6, 2006 I'm looking for a few pointers or suggestions on the best way to implement a file system to Freertos. I have version 4.1.3 successfully running with the lwip stack on an AT91SAM7X board. All works well. I've ported over the EFSL FAT library, and all seems to work well with flash cards over SPI in a stand alone mode. My questions is how to best integrate this within the OS. I can see several ways to go about this, but is there a prefered or recommended method. Should the file system be a separate task, or a shared resource (in which case anyone know if EFSL is reentrant?). Since I would like any running task to access a file, I assume there should be some type of queue on requests to open files. Then on the back end the file system needs to wait for the SPI DMA to complete, is this best done with semaphores or another queue?. Anyone have any thoughts or pointers or been down this path before.
Colin
RE: Integrating a file systemPosted by Nobody/Anonymous on December 6, 2006 I think it depends a lot on whether or not your file system (EFSL) is designed to be re entrant or not. If you opened two files from two different tasks causes it to corrupt, then you are going to need some form of gate keeper task - a task that handles all file IO. The implementation of this in turn depends on whether your application requires blocking reads and writes.
The ideal solution would be to have the mutual exclusion only around access to the hardware. For example the SPI bus if using an SD card. And have the rest of the code re entrant. Then only blocks occur when accessing the actual hardware.
RE: Integrating a file systemPosted by Jokke on January 9, 2007 I am using FreeRTOS and efsl on a relatively small (1 MB) SPI flash for some time, with the following experience: -I use a semaphore to make sure only one is using the file system at a time. The efsl functions are not reentrant. -I suspect there are problems keeping files open and letting others access the file system. I am not sure about this, but until now I always close a file before leaving the semaphore. I would be interested in other experiences around this. -It looks like development has stopped for this fs? Very little activity on their forum and home page. Does anyone know another good file system?
Regards
Jokke
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|