Forum Discussion
EBERLAZARE_I_Intel
Regular Contributor
2 years agoHi,
Can you also provide the C code and your project file? I am trying to understand your C code flow.
- Dolemy2 years ago
New Contributor
Here is my C code.
//////////////////
#include "sys/alt_stdio.h"#include <system.h>#include <stdio.h>#include <io.h>#include <unistd.h>/*void Uart_Tx(char ch){IOWR(MY_UART_TX_0_BASE,0,0x41);usleep(1000000);printf("DATA: %c\n", IORD(MY_UART_TX_0_BASE,0));}*/int main(){alt_putstr("Hello from Nios II!\n");IOWR(MY_UART_TX_0_BASE,0,0xFF);/* Event loop never exits. */while (1){IOWR(MY_UART_TX_0_BASE,0,0x42);usleep(100000);printf("DATA: %c\n", IORD(MY_UART_TX_0_BASE,0));}return 0;}//////////////////