- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used to create the Nios project.
But, I am a very newcomer for Nios II. so, I want to ask you about my trouble. In Nios project, I used UART to receive the data into Nios. And I used the below code (C langauge) to do that. It can work without the problem. (rcvdata is int) ---------------------------------------------------------------------- "while((rcvdata = nr_uart_rxchar((np_uart *) 0x00000800)) == -1);" ---------------------------------------------------------------------- But, in case of Nios II, according to "Upgrading Nios Processor Systems to the Nios II Processor", it seems that the source code should be rewrited. According to page 27 of that document, the "getchar()" should be used instead of "nr_rxchar()". so, I changed the above code to ---------------------------------------------------------------------- "rcvdata = getchar();" . ---------------------------------------------------------------------- But, it seems that I did something wrong. The project cannot be built. :confused::confused::confused: Could you tell me how to correct it, please. Thank you very much in advance, and sorry for my English.Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
getchar() gets a character from stdin that you have to fix somewhere. May it help you even if it is a little help. Do you work with Nios II IDE and SOPC Builder ? In which case, you have software examples.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reply.
Yes, I work with Nios II IDE and SOPC Builder. How to get the example?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
installation of nios ii ide includes this examples. Maybe you have to reinstall NIOS II IDE.
In Nios II IDE, You can create project by menu File>New>Nios II application> here you find example templates. But this examples works only with altera dev kits. If you are newbie in NIOS II IDE, I suggest you to read "getting started" somewhere in Altera website.
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