I found while working on the Alveo U250 that the user software build fails when a normal, non-crossover UART is used; as CSR_UART_BASE is defined but CSR_UART_XOVER_RXEMPTY_ADDR isn't:
gcc -c -O2 -Wall -g -I../kernel -MMD -o litepcie_util.o litepcie_util.c
litepcie_util.c: In function ‘uart_test’:
litepcie_util.c:458:33:error: ‘CSR_UART_XOVER_RXEMPTY_ADDR’ undeclared (first use in this function); did you mean ‘CSR_UART_RXEMPTY_ADDR’?
458 | if ((litepcie_readl(fd, CSR_UART_XOVER_RXEMPTY_ADDR) & 0x1) == 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| CSR_UART_RXEMPTY_ADDR
litepcie_util.c:458:33:note: each undeclared identifier is reported only once for each function it appears in
litepcie_util.c:459:45:error: ‘CSR_UART_XOVER_RXTX_ADDR’ undeclared (first use in this function); did you mean ‘CSR_UART_RXTX_ADDR’?
459 | printf("%c", litepcie_readl(fd, CSR_UART_XOVER_RXTX_ADDR) & 0xff);
| ^~~~~~~~~~~~~~~~~~~~~~~~
| CSR_UART_RXTX_ADDR
make: *** [Makefile:20: litepcie_util.o] Error 1
I think the #ifdef needs to be changed to something more specific.
I found while working on the Alveo U250 that the user software build fails when a normal, non-crossover UART is used; as
CSR_UART_BASE
is defined butCSR_UART_XOVER_RXEMPTY_ADDR
isn't:I think the
#ifdef
needs to be changed to something more specific.