Forum Discussion
Nios II ISS
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, joo2122 Replies
- Altera_Forum
Honored Contributor
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 - Altera_Forum
Honored Contributor
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 - Altera_Forum
Honored Contributor
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 - Altera_Forum
Honored Contributor
joo21,
Use your debugger and pause the processor, now which function are you stuck in? - Altera_Forum
Honored Contributor
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 - Altera_Forum
Honored Contributor
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 - Altera_Forum
Honored Contributor
Has anyone ran the zip file system on a PC running on windows OS?.
Please reply ASAP. Cheers, joo21 - Altera_Forum
Honored Contributor
Yes it's actually the platform it was developped on, though the example is platform independant.
- Altera_Forum
Honored Contributor
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 - Altera_Forum
Honored Contributor
<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!