Forum Discussion
kpainter
New Contributor
1 year agoNios 2 uart initialization problem
I am using Quartus Lite 22.1.2. I am using the lightweight uart core. It is initialized by the alt_sys_init function and declares an object called uart_0. My problem is this object seems to be get...
kpainter
New Contributor
1 year agoI have been playing around with this more and have tried to open the uart in this way:
int fd;
fd = open(UART_0_NAME, O_RDWR);
This generates two errors:
Description Resource Path Location Type
conflicting types for 'fopen'; have 'FILE *(int, const char *)' UserFlashTest line 339, external location: /home/user/apps/intelFPGA_lite/22.1std/nios2eds/bin/gnu/H-x86_64-pc-linux-gnu/nios2-elf/include/stdio.h C/C++ Problem
initializer element is not constant UserFlash.c /UserFlashTest line 861 C/C++ Problem
Functions that call read and write with fd don't generate errors. I think if I could get past the open call, I would be good. Any suggestions as what might be wrong?
Regards,
Kelly Painter