- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everybody,
Am trying to prototype how I can effectively use the niosII read-only zip filing system. Am currently using the example that came with the development board and I have followed the instructions on how to create and run the zip file in the IDE. Am currently trying to verify whether the zip file could be read by running the software as an ISS. When I tried to run the software as an ISS, I get the error "file could not be opened". Does anybody know what I can do so that the file could be read?. Cheers, joo21Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a flash based filing system, there is no model for the flash on the ISS. I sugest you try this on a board.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, I will try it right away. Please, do you know what the "Mount-Point" means?. Is the mount-point the installation directory?.
Cheers, joo21- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The mount point is how the file appears from the viewpoint of the CPU e.g. /mnt/rozipfs/. It's a general term, dropping it into google
brings up this, which shoudl help www.comptechdoc.org/os/linux/manual1/mountpoints.html- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I tried running the software as a nios II harwdare with the development board and am still having the same problem "Cannot open file".
From the url link you posted about mount point, it seems that the mount point is the directory where the files will be exported!. Do you know what else I can do?. Cheers, joo21- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I forget to mention that am using a PC running windows OS. It seems that this mount-point has something to do with linux OS!!!
Cheers, joo21- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The mount point is a UNIX paradigm, which is being used for the target software i.e. the code running on the Nios, it's nothing to do with your PC. I suggest you read chapter 12 of the Nios II Software Developers Handbook.
The mountpoint of for example /mnt/rozipfs, means that when you use fopen (on the Nios), the file will be opened as /mnt/rozipfs/my_file- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
fp=fopen ("/mnt/rozipfs/file1.txt", "r");
You said your system is Widows OS. So you have to modify the path like below: fp=fopen ("c:\\myfile\\file1.txt", "r"); You can try it. GL!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE </div>
--- Quote Start --- fp=fopen ("/mnt/rozipfs/file1.txt", "r"); You said your system is Widows OS. So you have to modify the path like below: fp=fopen ("c:\\myfile\\file1.txt", "r"); You can try it. GL![/b] --- Quote End --- No you don't! The problem joo21 was having was not on a PC, where your change would work. It's on the target i.e. Nios where a UNIX model is used- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi GL,
Thanks for the info. I did as you said but I still get the error "Cannot open file". Does any body knows any way out?. Since am running the Nios II IDE on windows OS, I think the mount point specified in the IDE project system library should reflect this OS. Obviously, somebody must have implemented this zip filing system on a machine running windows OS instead of linux/unix. Please, I need help. Cheers, joo21- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you programmed the flash with your ZIP file contents? If you haven't or you don't know what I'm talking about, then that's a good place to start.
- slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Slacker, I tried programing the zip file into flash before running it as a nios II hardware. After programming into flash, when I tried to run it, the IDE appears to hangs and I get the following:
nios2-terminal: connected to hardware target using JTAG UART on cable nios2-terminal: "USB-Blaster [USB-0]", device 1, instance 0 nios2-terminal: (Use the IDE stop button or Ctrl-C to terminate) Reading file 'file1.txt' from ZipFS... It just gets stuck here, until I terminates it. It does'nt read the content of "file1.txt". What do you think is the problem?. Kind regards, joo21- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
joo21,
You really need to be more specific. It just gets stuck here is not a lot to go on. Can you tell us exactly where in the code it get's stuck i.e. function name and where in the function it gets stuck- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the info. Here is a copy of part of the zip file example code:
int main(void) { FILE* fp = NULL; /* * Open and print contents of ZipFS file 1. */ printf("Reading file 'file1.txt' from ZipFS...\n"); fp = fopen("/mnt/rozipfs/file1.txt", "r"); if (fp == NULL) { printf ("Cannot open file.\n"); exit (1); } print_file_contents(fp); fclose (fp); . . . . return 0; } It got stucked at the " printf("Reading file 'file1.txt' from ZipFS...\n");" function and it does'nt advances beyound this point. Cheers, joo21- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
joo21,
Use your debugger and pause the processor, now which function are you stuck in?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmmm, am having problems with the debugger. I just checked properly now, and I think the problem am having is because am using "open-core evaluation license for the nios II processor". We do not have a full license!.
Do you think this is the problem?. Cheers, Jude- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, am having problem with the debugger now. I just checked properly now, and I think the problem am having is to do with my license. We are currently using "open-core evaluation license". We don't have the full license at the moment.
Do you think this is the cause of the problem?. Cheers, joo21- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone ran the zip file system on a PC running on windows OS?.
Please reply ASAP. Cheers, joo21- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes it's actually the platform it was developped on, though the example is platform independant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. I have being having problems running the zip file system example on my system. The content of the zip file could'nt be open. I have followed all the procedure in the manual on how to use the altera zip file system. What do you think I should do?. Could you please let me know how you ran it on your system?. How did you specified your mount point?. Did you use absoluite paths?.
Please reply ASAP. Cheers, joo21- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE </div>
--- Quote Start --- rugbybloke, joo21 has sent you this email from http://www.niosforum.com/forum/index.php (http://www.niosforum.com/forum/index.php). Thanks rubbybloke. I have being having problems running the zip file system example on my system. The content of the zip file could'nt be open. I have followed all the procedure in the manual on how to use the altera zip file system. What do you think I should do?. Could you please let me know how you ran it on your system?. How did you specified your mount point?. Did you use absoluite paths?. Please reply ASAP. Cheers, joo21[/b] --- Quote End --- joo21, As I have explained before in a private message, I will not enter into a private discussion with you about your problem. The benefit of forums is that if you post a question and someone else solves it then other people get to benefit from the solution, plus many people can see the question and hopefully answer it. You seem to be getting all confused about completely unrelated things, such as the operating system of your PC and mount points. To get a simple file system example follow the instructions below, which I have just tried with Release 5.0 on a 1c20 board. 1. In the Nios II IDE select File->New Project 2. Select C/C++ Application 3. Select Zip Filing System 4. Select a PTF for your system, in my case this was "D:\altera\kits\nios2\examples\verilog\niosII_cyclone_1c20\standard\std_1c20.ptf" 5. Press Finish 6. Right click on your project and select Build 7. Select Tools->Flash Programmer 8. Press New 9. Press the Program Flash Button 10. Press Yes 11. Right click on your application project and select Debug As Hardware 12. Depending upon whether you have the correct hardware you may get a Quartus Programming window to program the hardware into the board 13. Press the Go Arrow and you'll get Reading file 'file1.txt' from ZipFS... Hello from ZipFS File 1! Reading file 'file2.txt' from ZipFS... Hello from ZipFS File 2!- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page