Forum Discussion

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

how to use printf in NIOS2 DE2

I am a newbie in the FPGA and NIOS world, i came across some labs and scripts available on line where they build a simple SOPC based NIOS 2 processor (with interval timer, JTAG, onchip mem) and then they used Eclipse to make a simple hello world program that would use printf("hello world"); that is suppose to print the message on the console of the eclipse IDE. i cant get it to work as i get an error saying the .elf executable file not found or the SDTOUT is not implemented on the hardware. I would really appreciate any help... thanks in advance.

4 Replies

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

    Do you have a space in the path to your project? If yes, move it somewhere else.

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

    I really don't get what you mean. Can you please give more details about the path that you want me to move in the project?

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

    NIOS has got problems when there are spaces in the filepath. So like "Altera Project" won't work nicely, but "AlteraProject" or "Altera_Project". The newest NIOS-Version normally warns you if there are any spaces in the path, I think. Check in the NIOS BSP-Editor, if the STDOUT is set to the right module and check your design, too.

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

    Some people also create their projects in a folder inside "My Documents" which will also create that kind of problems.