• 0

Makefile:38 Error 1 in Vitis


Go to solution Solved by artvvb,

Question

So I am getting an error saying makefile:38 fifo_test_app.elf Error 1. I do not know why I am getting this error Here is my code:

#include <stdio.h>
#include <stdlib.h>
#define LIMIT 32

int FIFO[LIMIT];
int front, rear;
int i;
int choice;

void insert();
void delet();
void display();

int main()
{
printf("FIFO TEST\n\n");
front = rear = -1;
do
{

printf("1. Insert\n2. Delete\n3. Display\n4. Exit\n\n");
xil_printf("Enter your choice:");
scanf("%d",&choice);

switch(choice)
{
case 1:
insert();
break;
case 2:
delet();
break;
case 3:
display();
break;
case 4:
exit(0);
break;
default:
printf("Sorry, invalid choice!\n");
break;
}
} while(choice!=4);
return 0;
}

void insert()
{
int element;
if (rear == LIMIT - 1)
xil_printf("FIFO Overflow\n");
else
{
if (front == - 1)
front = 0;
xil_printf("Enter the element to be inserted in the FIFO: ");
scanf("%d", &element);
rear++;
FIFO[rear] = element;
}
}

void delet()
{
if (front == - 1 || front > rear)
{
xil_printf("FIFO Underflow \n");
}
else
{
xil_printf("The deleted element in the FIFO is: %d\n", FIFO[front]);
front++;
}
}

void display()
{
int i;
if (front == - 1)
{
xil_printf("FIFO underflow\n");
}
else
{
xil_printf("The elements of the FIFO are:\n");
for (i = front; i <= rear; i++)
xil_printf("%d\n", FIFO[i]);
}
}

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
  • Solution

Hi @rmccormack1,

Can you export your projects to a ZIP file and post it here? Errors that appear as makefile errors like this one may indicate that something in the board support package is failing to build properly, which would imply either a problem with the Vivado project and XSA, or with the configuration of one the software projects. It could be missing stdin, or it could be one of a couple other potential issues not directly related to the posted source code.

Alternatively it might be down to xil_printf.h not being included, though I haven't managed to reproduce your error message.

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