Forum Discussion

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

Printf failed

Hi all.

I using our custom board (2C35) and i have aproblem with IO.

Everything seems O.K. (like r/w SDRAM) but simple printf("Hello world"); is not working.

Is anybody have an idea why it do not work?

Thanks at advance.

Alex

5 Replies

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

    Alex,

    That's not enough information to really help. What's your stdout device? What options have you set on your system library? Have you tried single-stepping into the printf(), to find out just where it's failing?

    Having this sort of information is mandatory.

    Best Regards,

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

    Alex,

    what kind of NIOS are you using!? A reference design or did you create one on your own?! You might have forgotten to add the jtag_uart or something, so the console is disabled...

    Good luck,

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

    Dear Danny and slacker.

    1. We use Cyclon II.

    2. My in/out/err device is jtag uart.

    Now about what happen :

    If i use in sys_lib options "small C library", printf is working, but it prints in console window just a point "." on every char or integer. If "small C library" option disabled, printf do not print nothing.

    ** May be it is depends to memory mapping of compiler, like stack (we had problems with the SDRAM before).

    Thanks a lot.

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

    --- Quote Start ---

    originally posted by burdalex@Dec 6 2005, 06:08 AM

    dear danny and slacker.

    1. we use cyclon ii.

    2. my in/out/err device is jtag uart.

    now about what happen :

    if i use in sys_lib options "small c library", printf is working, but it prints in console window just a point "." on every char or integer. if "small c library" option disabled, printf do not print nothing.

    ** may be it is depends to memory mapping of compiler, like stack (we had problems with the sdram before).

    thanks a lot.

    alex.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=11350)

    --- quote end ---

    --- Quote End ---

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

    Co-ask!

    --- Quote Start ---

    originally posted by burdalex@Dec 5 2005, 01:16 PM

    hi all.

    i using our custom board (2c35) and i have aproblem with io.

    everything seems o.k. (like r/w sdram) but simple printf("hello world"); is not working.

    is anybody have an idea why it do not work?

    thanks at advance.

    alex

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=11333)

    --- quote end ---

    --- Quote End ---