Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

fopen don't create

Altera_Forum
Honored Contributor II
1,108 Views

Hi ! 

 

I was trying to use (fopen) & (fclose) to dump data to PC in Nios IDE. The file was never created. 

 

I didn't understand. I have the Nios II 8.0, and in this version doesn't have the host_filesystem example (I saw this in other thread). 

I downloaded this, but it doesn't appear in the templates options menu, when I will create a new project. 

 

Somobody can help me ?
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
374 Views

Obs.: I use the Cyclone III, and the host_filesystem runs in cyclone II,cyclone I and stratix...

0 Kudos
Altera_Forum
Honored Contributor II
374 Views

The host filing system only works when you're debugging. It uses a feature of GDB to implement the host-side filesystem. 

 

Cheers, 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
374 Views

Thanks friend. 

 

But I resolved my problem. 

 

Go to project folder in Nios II-->>System Library Properties ->> System library >> Software Components>> set the box "add this software component" 

 

And finished, now I can use fopen() and fclose(), in Debug mode.
0 Kudos
Altera_Forum
Honored Contributor II
374 Views

how did you manage to use the calls fopen and fclose and fwrite ??

0 Kudos
Altera_Forum
Honored Contributor II
374 Views

ittiam, 

 

The only way to get this to work directly to your PC is to use the host filing system. It's not fast, so don't expect excellent performance...adequate for debug only...In fact, it can only be used in Debug mode! 

 

Cheers, 

 

-slacker
0 Kudos
Altera_Forum
Honored Contributor II
374 Views

slacker, 

 

Well i couldnt get this workingin the debug mode also, my code is sending out the decoded output on the jtag port, in debug mode as well it is not working . I have mounted in the lib property as well. 

 

ittiam
0 Kudos
Reply