Forum Discussion

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

Redirecting printf?

Hi

I have a Nios System that allows me to remotely download (through Ethernet Only) the FPGA data & code

without using the Ethernet Blaster Cable / EPCS Devices on a Altera NDK 1s10(Stratix).

Now i want to redirect outputs from printf to my function.

I notice that in system library properties , there is a list of devices to which i can redirect my output.

I am guessing that inorder to redirect my output, i have to change some HAL settings file to add my function/device here.

any suggestions??

regards

Pavan

2 Replies

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

    Try sprinf() into a buffer then do a transfer to your output device.

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

    --- Quote Start ---

    originally posted by ppk031000@Aug 7 2005, 09:41 PM

    i am guessing that inorder to redirect my output, i have to change some hal settings file to add my function/device here.

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

    --- quote end ---

    --- Quote End ---

    In theory, you just need a peripheral that has a serial device driver. My recommendation would be to look at the Altera UART component and see what it has as far as software API and class.ptf settings that tell the system that it is valid as a stdio device.