- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I built a embedded system in qsys which has the jtag_uart IP. Based on default set,jtag_uart is used as stdin, stdout. I create a hello world project and it can print hello world in console.
But after I added the command like: getchar(), getc(), or fgetc(), then the program can't be build. It reports errors like: "undefined reference to 'getc' ". I copy my codes as below: # include <stdio.h># include "..\hello_world_bsp\HAL\inc\io.h"# include "..\hello_world_bsp\system.h" typedef unsigned int uint; int main() { printf("Hello from Nios II!\n"); int c; c= getc(stdin); //c=getchar(); printf("This is from UART: %d", c); return 0; } I also attached the screenshot. Why these functions which use jtag_uart to read don't work? Do I missed to include any files? Thanks in advance.Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anyone has idea?
Thanks.
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