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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Redirecting printf?

Altera_Forum
Honored Contributor II
1,188 Views

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
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
465 Views

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

 

gm
0 Kudos
Altera_Forum
Honored Contributor II
465 Views

 

--- 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.
0 Kudos
Reply