Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

fopen don't create

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 ?

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

    Cheers,

    - slacker
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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