- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I was wondering if there is a way to print to output file from NIOS2. I have a program that generates 64K worth of data, and I wanted to print them out for comparison. I am using Nio2 and Quartus 7.2 with sp3. Thanks.Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi, I was wondering if there is a way to print to output file from NIOS2. I have a program that generates 64K worth of data, and I wanted to print them out for comparison. I am using Nio2 and Quartus 7.2 with sp3. Thanks. --- Quote End --- Yes. "Altera Host-Based File System" provides this facility. It is available in "Software Components" in the "System Library Properties" of the project. By default it is not enabled, so you must enable it. Also, it can only be used in the Debug mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
nice, thank you very much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Yes. "Altera Host-Based File System" provides this facility. It is available in "Software Components" in the "System Library Properties" of the project. By default it is not enabled, so you must enable it. Also, it can only be used in the Debug mode. --- Quote End --- Thank you for your post. I have enabled "Altera Host-Based File System" in NIOS2 and tried to debug the following code to generate some output:
FILE *fp;
fp = fopen("log.txt", "w");
int i = 0;
for (i = 0; i < 65536; i++)
{
fprintf(fp, "%d\n", i);
}
fclose(fp);
And then I tried to find the log.txt file at the mount point. However, it doesn't matter if I explicitly or implicitly specified the path of the log, ie. "/mnt/host/log.txt" or "log.txt" or used differnet paths "/home/lc2454/Documents/log.txt", I wasn't able to find the generated file. I even tried to create the log.txt file myself and made it chmod a+rw but still it wasn't written. Therefore, I was wondering if you can elaborate on how we can use this or point out a tutorial of some sort. Thanks in advance!

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