- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 PavanLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe the way in which the IDE/HAL determines if a device can accept stdin/stdout is through a setting in the component's class.ptf file. For instance, the following snippet is from the jtag_uart:
SYSTEM_BUILDER_INFO {
Bus_Type = "avalon";
Is_Printable_Device = "1";
You may, however, be able to use alt_io_redirect() to redirect output to your "device". That's how the HAL does it just prior to entering main(). You'd have to create your own device driver (and perhaps, an actual hardware component) first, however. Since I've no idea what, exactly, you're trying to do, that's about all the advice I can offer. Cheers, - slacker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
<div class='quotetop'>QUOTE </div>
--- Quote Start --- 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[/b] --- Quote End --- You will need to write a character mode device driver for your device. See chapter 5 of the Nios II Software Developer's Handbook. Slacker is also correct once you have done this you will need the Is_Printable_Device entry in your PTF file, for your device to be available in the IDE for use as stdout.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks slacker & rugbybloke
Let me try it out. regards Pavan
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page