Forum Discussion
Altera_Forum
Honored Contributor
19 years agoOkey Dokey,
You have alot of reading and work to do. You need to start with getting the Compact Flash hardware and example software working. This involves using SOPC builder to put the Compact Flash hardware in your NIOS II configuration. Since I am a software programmer... I cannot help you with the details on that. Once you have the Compact Flash hardware in the FPGA you need to connect your FPGA to your physical hardware (a compact flash slot/connector and a compact flash card). Use the NIOS II IDE to make a new blank project based on your NIOS II configuration. Then copy the example files *.c and *.h that came with the Compact Flash IP. You should then be able to compile and run the example code. Once the example code is working you then will need to hook in the FAT file system code. I would suggest starting a new blank project based on your existing system library (so you don't mess up the working code). Copy all of your *.c and *.h files to your new blank project. You will need to then hook in your FAT code to your compact flash code. Read the example project and FAT code documentation to figure out exactly what you need. Summary of what you need: IDE_initialize IDE_deinitialize readLogicalSector writeLogicalSector Those are the basic functions fron cf_ideutils.c that you will need for the FAT file system code to work... there maybe others ... Then you can rewrite the main() function in the cf_test.c file to open a FAT file... write something to it... and close the file. Once you get this working you can then move the essential code over to your real program... or if it is simple enough just write it in cf_test.c... That is essentially it. Remember to get the example code working first... this is very very very important! Without it working the FAT file system code will never work and you will not accomplish your goals. Have Fun!