Altera_Forum
Honored Contributor
21 years agoI cann't use "getchar()"
I add one section code to hello_small_word.c. But it cann't building.
# include "alt_types.h"# include <stdio.h># include <unistd.h># include "system.h"# include "sys/alt_irq.h"# include "altera_avalon_pio_regs.h"# include <string.h> int main (void) __attribute__ ((weak, alias ("alt_main"))); int alt_main() { //alt_u8 c; int c; printf("Hello from Nios II!\n"); // while(c = nr_uart_rxchar()) c = getchar(); while (c = 'a') { printf("I receive A from my board \n"); } return 0; // exit(0); }