Forum Discussion
Altera_Forum
Honored Contributor
21 years agoWrite/Read file to Compact Flash
Hello:
I am a software newb trying to get my hands on a program that writes and reads a file to and from the compact flash on a Cyclone board using Nios II IDE. I have gotten the the hardware part and the software part to run for the "Compact Flash monitor/debug demonstration program" under the IP section of this website. In a readme file there is description how there is additional support for the compact flash in the ecos release for nios ii 5.0, and micrium microc/fs file system. I am unfamiliar with ecos or micrium, and I assume they are operating systems? Could someone explain what they are, and what I need to execute to get them working for my board? JC6 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by zcao@Aug 30 2005, 03:31 PM hello:i am a software newb trying to get my hands on a program that writes and reads a file to and from the compact flash on a cyclone board using nios ii ide. i have gotten the the hardware part and the software part to run for the "compact flash monitor/debug demonstration program" under the ip section of this website. in a readme file there is description how there is additional support for the compact flash in the ecos release for NIOS II 5.0, and Micrium MicroC/FS file system.[/b] I am unfamiliar with ecos or micrium, and I assume they are operating systems? Could someone explain what they are, and what I need to execute to get them working for my board? JC <div align='right'><{post_snapback}> (index.php?act=findpost&pid=9424) --- Quote End --- [/b] --- Quote End --- Hello, I am at the same problem. If you have found out a solution, could you tell me something? I will do the same for you, JP
- Altera_Forum
Honored Contributor
I could suggest the best solution to your problem is "Work on Linux, and build nios2 uClinux". There is nothing to fear about Linux. I had been a DOS/WIndows user long a ago. But Linux is very easy to use and understand. You can learn so much from GNU/Linux, those are close to what we study in school.
Try add a PC to run Linux. Try http://www.ubuntulinux.org/ (http://www.ubuntulinux.org/) or others. You can develop hardware using quartus and nios2 on Windows. Then develop software on Linux. Follow this link to build tools/kernel/apps on Linux. http://forum.niosforum.com/forum/index.php?showtopic=3174 (http://forum.niosforum.com/forum/index.php?showtopic=3174) - Altera_Forum
Honored Contributor
Thank you. I will try this. But then, how can I read the files from the CF card? I am not accostumed to use Linux...
JP - Altera_Forum
Honored Contributor
With proper drivers configured, the kernel will detect the CF drive's partitions. You will use "mount" command to map the file system on the CF drive to a dir. Then you can access CF's data under that mount dir.
eg, you have FAT16 formatted the partition 1 of the CF drive, it will become /dev/hda1 . Then "mount -t vfat /dev/hda1 /mnt" will map the CF drive to dir /mnt . After you have finished the access, "umount /mnt" will unmap the CF drive. - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by zcao@Aug 30 2005, 03:31 PM hello:I am unfamiliar with ecos or micrium, and I assume they are operating systems? Could someone explain what they are, and what I need to execute to get them working for my board? JC <div align='right'><{post_snapback}> (index.php?act=findpost&pid=9424) --- Quote End --- [/b] --- Quote End --- Hi JC, ecos and Micro-C/OS-II are simple, small-footprint multitasking RTOSes. Mircrium is the company that distributes Micro-C/OS-II. I don't know that much about ecos but uC/OS-II is a very small OS that's easy to port. You can't really compare it to Linux, it has much fewer features and drivers but on the flipside you can run it on tiny processors, really depends on what you're after. We have the full version of NIOS so it's just a matter of selecting the uc/OS-II option when setting up the project in the IDE. I'm not sure if the lesser versions of NIOS allow that as well but probably they do. Andrew
- Altera_Forum
Honored Contributor
Please note, uC/OS2 is not FREE. You need a license for commerial use.