Altera_Forum
Honored Contributor
19 years agoFAT on Compact Flash
Hello,
I just found how to implement FAT file System on my Compact Flash without any OS, on the 1C20 Evaluation Kit and I think anybody is interresed by this subject. Sorry for my english, I'm french.... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif You need to download: * compact flash hardware & software examples for nios ii 5.0 (http://forum.niosforum.com/downloads/cflash/cf5_0.zip) from Jesse in Tested IP from this forum. * (the dosfs distribution archive (http://www.zws.com/products/dosfs/index.html)) You need to modify the DOSFS distribution archive: delete "dosemu.h" and "dosemu.c". in "dosfs.h" add an include to "cddiskutils.h" add : #define dfs_readsector(unit,buffer,sector,count) readlogicalsector(( unsigned long) sector, (unsigned long) count,(unsigned short *)buffer);# define dfs_writesector(unit,buffer,sector,count) writelogicalsector(( unsigned long) sector, (unsigned long) count,
(unsigned short *)buffer); compile and look at the error : Replace all type define in DOSFS distribution archive by the equivalent alt_u8, alt_u16 and alt_u32, for all the type. It's ok for me, fat 12, fat 16 and fat 32 in CHS and LBA. If anybody want some details, you can contact me.... @+ Olivier http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif