- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello everybody, i'm trying to read some data sent from my computer to my De2-70 through the UART port, i read the Embedded Peripherals IP user Guide and there was written in the page 6 of the chapter 6 that i may use the getchar() function to receive data, but when i compiled my code i receive this message here shown in the image below:
https://www.alteraforum.com/forum/attachment.php?attachmentid=8477 I also tried to use the scanf, but the same error appeared. I just need to read some data from the UART. Please help me!!!! Thank you all!!!Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have stdin/stdout specified in the BSP? Also, those are some pretty heavyweight functions. Do you have offchip memory you're running this code in? If you're trying to keep the code small, you can use alt_getchar() and similar/smaller functions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes in the BSP editor i setted the uart to stdin and stdout. In the Qsys i used On-chip memory ram or rom.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do you have for your BSP settings: enable small c library, enable lightweight device driver api? These options can remove some things. If you're using onchip ram, you may want to enable these and use the lightweight functions. Otherwise you won't have much room left if using standard scanf/printf stdio functions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you cronus10 i'll read this thread and try it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cronus10 i read the thread you posted to me. So a disable the options: enable small c library, enable lightweight device driver api. But now, when i compile my code this error is shown: http://puu.sh/728hj.png.
I tried to fix it connecting the IRQ option in my Qsys design and it works, but sometimes when i try to reset the board pressing a button that i set to the reset pin nothing works anymore. So i need to turn off and turn on my board. I dont know exactly what the IRQ does, could help using this? If i disconnect this option my project doesn't work. Thank you!!!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You will need to connect the IRQ in Qsys if you want to use the interrupt driven uart driver. I think your reset issue is a different problem. How is the reset coming into your system? Is it active high or low on the board? Do you have a reset synchronizer on your top level? Are you feeding it directly from your top level into your Qsys' clk/rst source module?
Cheers,
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page