- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know, dose anyone have the same problem with me??
MY problem is this... I want to printf the data from my NIOS II IDE to the *.txt file I try to use the "fopen" like this... --------------------------------------------------------------- FILE *fpl; fpl=fopen("..\\qq.txt","w"); fprintf(fpl,"111 %d\n",velocity); fclose(fpl); --------------------------------------------------------------- But, it is not workable. Should I have to set anything in the SOPC builder or NIOS II IDE?? So, Does anyone could help me?? Thank you very much...Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Take a look at the host filing system for Nios II. It only works when debugging and is quite slow, but might suit your needs.
-slacker- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
right click on project,
System Library Properties->Software Components->Altera Host Based File System , check "Add this software component" File will be created in chosen mount point.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- right click on project, System Library Properties->Software Components->Altera Host Based File System , check "Add this software component" File will be created in chosen mount point. --- Quote End --- Thank you for your suggest. But, How to assign the mount-point?? Does that mean the file that I creat??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Take a look at the host filing system for Nios II. It only works when debugging and is quite slow, but might suit your needs. -slacker --- Quote End --- Thank you for your suggest, but could you tell me how to use this method?? or Do you have any document, could you give me some advice??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Choose a writable mount point (user folder), folder must exist, and run your Application
FILE *fpl;
fpl=fopen("qq.txt","w");
fprintf(fpl,"111 %d\n",velocity);
fclose(fpl);
File qq.txt should reside there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Choose a writable mount point (user folder), folder must exist, and run your Application
FILE *fpl;
fpl=fopen("qq.txt","w");
fprintf(fpl,"111 %d\n",velocity);
fclose(fpl);
File qq.txt should reside there. --- Quote End --- Thank you. I have to try this code, but it seill doesn't work. May I ask some question, Should I have to set up anything in NIOS II or file?? MY verisonal is NIOS II 9.0v, and I try that code directly. I write in my c file of NIOS II, But it doesn't work. and I try to Build the *.txt file first. It sill doesn't work . Could you help me other advice. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you activate the host file system?
right click on project, System Library Properties->Software Components->Altera Host Based File System , check "Add this software component" After running your program file will be created in chosen mount point.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Did you activate the host file system? right click on project, System Library Properties->Software Components->Altera Host Based File System , check "Add this software component" After running your program file will be created in chosen mount point. --- Quote End --- I just find the file of Host file system. Because my NIOS II IDE is 9.0v So, I never used that you said. And, may I ask you?? Do you have any example? I try to find the example,but I didn't find that. and I try to use the Host file system. that open another project file. Dose that mean I have to write my c-code to the Host file system file??? Or, I can build blank project and include the Host file system project or write the Host file into the function? And then, call the function in main function? Thank you for your help, Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just activate Host File System in your project as I explained. After this, your program should work.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page