On a sunny day (Fri, 07 Apr 2006 09:25:33 -0400) it happened Eli Hughes
<emh203@psu.edu> wrote in <e15p8e$1hji$1@f04n12.cac.psu.edu>:
>sachink321@gmail.com wrote:
>> Environment in which system works:
>>
>> Microblaze softcore processor on spartan 3 fpga board
>> compact flash, acting as a mass storage.
>>
>> How to access the compact flash in embedded applications
>> write to and read from the compact flash? how to access the FAT table?
>> to which sector i need to write, which address?
>>
>> which mode of addressing is easy way out
>> CHS or LBA??
>>
>> I got no clue how to access, it would be great help if i could
>> understand in and out of doing tht becoz i need to write a code in C
>>
>> Thanks in advance
>>
>
>
>If you use the SYSTEM Ace controller chip , you can easily get to FAT
>file system access! There is actually a nice piece of IP that comes
>with the EDk that gives you basic file access.
I dunno, but 100 years ago or so when I moved from CP/M to MSDOS
I hacked together a simple file transfer function in C.
It is 'clean room', but then I did have MS floppies to test.
ftp://panteltje.com/pub/ms_fat.bz2
Not even sure that will work with current FAT, have to try some day.
But it has some test routines....
At the center of it it has a routine rwsabs()
rwsabs(sabs,dma,rwf) /*read or write sector abs*/
int sabs;/*absolute sector, starting at 0*/
unsigned dma; // memory address
Could be informative perhaps, ignore the sys14 routine calls.
Now to hope the richest man in the world does not sue me :-)