Sign in

username:

password:



Not a member?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi



Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | Rabbit-Semi | Requires the FAT filesystem module be installed.

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions, flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.

Requires the FAT filesystem module be installed. - Jon L - Nov 3 14:00:25 2009

I want to run the example program fat_create.c

and it says at the top:

Requires the FAT filesystem module be installed.

how do I do that?

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )


Re: Requires the FAT filesystem module be installed. - Scott Henion - Nov 3 14:08:42 2009

Jon L wrote:
> I want to run the example program fat_create.c
>
> and it says at the top:
>
> Requires the FAT filesystem module be installed.
>
> how do I do that?
>
>

What version of DC? After version 9.5x or so, the FAT library is included.
--
------------------------------------------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------------------------------------------

today's fortune
"I made the decision to name the Justice Department building after Robert
Kennedy because he's deservant."

George W. Bush
November 20, 2001
Speaking to reporters in the Oval Office about his decision to name the
Justice Dept. building after former U.S. Attorney General, Robert Kennedy.
Aired on CNN.

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Requires the FAT filesystem module be installed. - Jon L - Nov 3 14:45:22 2009


Thanks,

yea I just figured that out by searching around on the web and getting to:

http://www.rabbit.com/support/downloads/modules/fat.shtml

Its brand new, 10.56 DC with the new BL4s200 and I was a bit confused when I saw that there example package didn't include a FAT disk example.

The board's documentation details a test program sdflash_inspect.c which takes the SD card and has it partitioned raw in 512 byte blocks (I think, the documentation switches between "pages"/"sectors"/and "blocks" I'm not sure yet if these three terms are interchangable or not) as best I can make out. Everything is a bit in pieces.

So I've got two ways to proceed now, 1) the sdflash_inspect.c example with is raw 512 byte blocks, or the 2) fat_create.c example which seems to be at a much higher programming level. Fat.create.c should leave the mini sd card in a state that I should be able to pull the card and read it by a PC, so that is very attractive. I'm just a bit perplexed as to why the fact_create.c example is shown as the test case for the SD reader/writer.

--- In r...@yahoogroups.com, Scott Henion wrote:
>
> Jon L wrote:
> > I want to run the example program fat_create.c
> >
> > and it says at the top:
> >
> > Requires the FAT filesystem module be installed.
> >
> > how do I do that?
> >
> >
>
> What version of DC? After version 9.5x or so, the FAT library is included.
> --
> ------------------------------------------
> | Scott G. Henion| shenion@... |
> | Consultant | Stone Mountain, GA |
> | SHDesigns http://www.shdesigns.org |
> ------------------------------------------
>
> today's fortune
> "I made the decision to name the Justice Department building after Robert
> Kennedy because he's deservant."
>
> George W. Bush
> November 20, 2001
> Speaking to reporters in the Oval Office about his decision to name the
> Justice Dept. building after former U.S. Attorney General, Robert Kennedy.
> Aired on CNN.
>

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Re: Requires the FAT filesystem module be installed. - Scott Henion - Nov 3 14:53:07 2009

Jon L wrote:
> Thanks,
>
> yea I just figured that out by searching around on the web and getting to:
>
> http://www.rabbit.com/support/downloads/modules/fat.shtml
>
> Its brand new, 10.56 DC with the new BL4s200 and I was a bit confused when I saw that there example package didn't include a FAT disk example.
>
> The board's documentation details a test program sdflash_inspect.c which takes the SD card and has it partitioned raw in 512 byte blocks (I think, the documentation switches between "pages"/"sectors"/and "blocks" I'm not sure yet if these three terms are interchangable or not) as best I can make out. Everything is a bit in pieces.
>
> So I've got two ways to proceed now, 1) the sdflash_inspect.c example with is raw 512 byte blocks, or the 2) fat_create.c example which seems to be at a much higher programming level. Fat.create.c should leave the mini sd card in a state that I should be able to pull the card and read it by a PC, so that is very attractive. I'm just a bit perplexed as to why the fact_create.c example is shown as the test case for the SD reader/writer.
>
>

The samples were written when the FAT library was needed to be purchased
separately. Now it is included, so they will work without the extra step.
--
------------------------------------------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------------------------------------------

today's fortune
Be careful when you bite into your hamburger.
-- Derek Bok

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Requires the FAT filesystem module be installed. - Jon L - Nov 3 16:49:50 2009


> > The samples were written when the FAT library was needed to be purchased
> separately. Now it is included, so they will work without the extra step.
> --
> ------------------------------------------
> | Scott G. Henion| shenion@... |
> | Consultant | Stone Mountain, GA |
> | SHDesigns http://www.shdesigns.org |
> ------------------------------------------
>
> today's fortune
> Be careful when you bite into your hamburger.
> -- Derek Bok
>
Got it. thanks. Can you think of any reason Rabbit is showing the sdflash_inspect.c example program and not the fat_create.c?

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Re: Requires the FAT filesystem module be installed. - Tom Collins - Nov 8 13:10:47 2009

On Nov 3, 2009, at 12:04 PM, Jon L wrote:
> Got it. thanks. Can you think of any reason Rabbit is showing the
> sdflash_inspect.c example program and not the fat_create.c?

The sdflash_inspect.c sample only works on boards with an SD Card
(RCM4300 series and the SBC based on the RCM4310). The fat_create.c
sample works on all boards that have FAT filesystem support -- for SD
Card, NAND flash, Atmel data flash and even a portion of the serial
boot flash on the BL4S100 series SBCs.

-Tom



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Re: Requires the FAT filesystem module be installed. - Jonathan Leslie - Nov 9 14:25:51 2009

Got it thanks.   I got the example program fat_create.c to work on my single board computer, the BL4S200

So given that the example program works, how do I open the text file for append?  

fat_create.c opens the file as so:

  rc = fat_Open(
                 first_part,    // First partition pointer from fat_AutoMount()
                 "HELLO.TXT",    // Name of file.  Always an absolute path name.
                 FAT_FILE,        // Type of object, i.e. a file.
                 FAT_CREATE,    // Create the file if it does not exist.
                 &my_file,        // Fill in this structure with file details
                 &prealloc        // Number of bytes to allocate.
                );

which implies that if the file is already there, the file is should be in append mode. however successive runs of the program fat_create.c do not add additonal lines to the file "hello.txt."  Do I have to move the file pointer to the end of the file before a call to fat_write? ala:
fat_Seek (&my_file, -1, SEEK_END);

???

--- On Sun, 11/8/09, Tom Collins wrote:

From: Tom Collins
Subject: Re: [rabbit-semi] Re: Requires the FAT filesystem module be installed.
To: r...@yahoogroups.com
Date: Sunday, November 8, 2009, 1:10 PM

On Nov 3, 2009, at 12:04 PM, Jon L wrote:Got it. thanks. Can you think of any reason Rabbit is showing the sdflash_inspect. c example program and not the fat_create.c?
The sdflash_inspect.c sample only works on boards with an SD Card (RCM4300 series and the SBC based on the RCM4310).  The fat_create.c sample works on all boards that have FAT filesystem support -- for SD Card, NAND flash, Atmel data flash and even a portion of the serial boot flash on the BL4S100 series SBCs.
-Tom



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Re: Requires the FAT filesystem module be installed. - Jonathan Leslie - Nov 9 15:39:26 2009

answered my own question. the answer is yes you need to seek to the end of the file as so:

fat_Seek (&my_file, 0, SEEK_END);

note the 0 not -1.

--- On Mon, 11/9/09, Jonathan Leslie wrote:

From: Jonathan Leslie
Subject: Re: [rabbit-semi] Re: Requires the FAT filesystem module be installed.
To: r...@yahoogroups.com
Date: Monday, November 9, 2009, 2:24 PM

Got it thanks.   I got the example program fat_create.c to work on my single board computer, the BL4S200

So given that the example program works, how do I open the text file for append?  

fat_create.c opens the file as so:

  rc = fat_Open(
                 first_part,    // First partition pointer from fat_AutoMount()
                 "HELLO.TXT",    // Name of file.  Always an absolute path name.
                 FAT_FILE,        // Type of object, i.e. a
file.
                 FAT_CREATE,    // Create the file if it does not exist.
                 &my_file,        // Fill in this structure with file details
                 &prealloc        // Number of bytes to allocate.
                );

which implies that if the file is already there, the file is should be in append mode. however successive runs of the program fat_create.c do not add additonal lines to the file "hello.txt."  Do I have to move the file pointer to the end of the file before a call to fat_write? ala:
fat_Seek (&my_file, -1, SEEK_END);

???

--- On Sun, 11/8/09, Tom Collins wrote:

From: Tom Collins
Subject: Re: [rabbit-semi] Re: Requires the FAT filesystem module be installed.
To: r...@yahoogroups.com
Date: Sunday, November 8, 2009, 1:10 PM

On Nov 3, 2009, at 12:04 PM, Jon L wrote:Got it. thanks. Can you think of any reason Rabbit is showing the sdflash_inspect. c example program and not the fat_create.c?
The sdflash_inspect.c sample only works on boards with an SD Card (RCM4300 series and the SBC based on the RCM4310).  The fat_create.c sample works on all boards that have FAT filesystem support -- for SD Card, NAND flash, Atmel data flash and even
a portion of the serial boot flash on the BL4S100 series SBCs.
-Tom

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )