• 0

UART Function Problems


Question

So I have a program to use the UART on the Digilent USB104A7 board. Here is my code:

#include <stdio.h>
#include "platform.h"
#include "xil_printf.h"
#include "xil_types.h"
#include "xil_assert.h"
#include "xil_io.h"
#include "xparameters.h"
#include "xuartlite.h"
#include "xintc.h"
#include "xil_exception.h"

int main(void)
{
int Status;
Status = UartLiteIntrExample(UARTLITE_DEVICE_ID);
if (Status != XST_SUCCESS) {
xil_printf("UART Example Failed\r\n");
return XST_FAILURE;
}

xil_printf("Successfully ran UART Example\r\n");
return XST_SUCCESS;
}

I will also attach errors but it looks like I am getting multiple errors with these functions. 

error.png

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @rmccormack1

Something in the project is misconfigured. Undefined reference to main implies that either the "int main (void)" pattern of the definition isn't the one that the tools are looking for - maybe the application was created using a C++ template, or some other template that doesn't work for your code. It's also possible that the source file isn't in a directory that the tools are looking in for sources. Console logs and/or a project archive would help me to figure out what exactly is going on.

Thanks,

Arthur

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now