I have a question regarding the xadc example


hello. I am watching the video in the link and following the xadc-related example. First, I watched the video and followed along to create the hardware with vivado and enter the code in vitis. However, I followed the video exactly, but an error appears as shown in the attached photo.
First of all, I am an undergraduate student who has never dealt with vitis.

Below is the vivado ip block diagram, vitis code, and error screen that I followed after watching the tutorial.

/***************************** Include Files ********************************/

#include <stdio.h>
#include “stdio.h”
#include “platform.h”
#include “xil_printf.h”
#include “xadcps.h”
#include “xparameters.h”
#include “xstatus.h”
#include “sleep.h”

/************************** Constant Definitions ****************************/


/***************** Macros (Inline Functions) Definitions ********************/

#define printf xil_printf /* Small foot-print printf function */

/************************** Function Prototypes *****************************/

static int XAdcPolledPrintfExample(u16 XAdcDeviceId);
static int XAdcFractionToInt(float FloatNum);

/************************** Variable Definitions ****************************/

static XAdcPs XAdcInst; /* XADC driver instance */

/************************** MAIN *****************************/

int main()
print(“ADC Test: Starting Program \n\r”);

int Status;
 * Run the polled example, specify the Device ID that is
 * generated in xparameters.h.
Status = XAdcPolledPrintfExample(XADC_DEVICE_ID);
if (Status != XST_SUCCESS) {
	return XST_FAILURE;

print("ADC Test: Finishing Program \n\r");


int XAdcPolledPrintfExample(u16 XAdcDeviceId)
int Status;
XAdcPs_Config *ConfigPtr;
u32 TempRawData;
u32 VccPintRawData;
u32 VccPauxRawData;
u32 VccPdroRawData;
float TempData;
float VccPintData;
float VccPauxData;
float MaxData;
float MinData;
XAdcPs *XAdcInstPtr = &XAdcInst;

printf("	Entering the XAdc Polled Example. ");

 * Initialize the XAdc driver.
ConfigPtr = XAdcPs_LookupConfig(XAdcDeviceId);
if (ConfigPtr == NULL) {
	return XST_FAILURE;
	printf("XAdcPs_LookupConfig() returns XST_FAILURE");
XAdcPs_CfgInitialize(XAdcInstPtr, ConfigPtr, ConfigPtr->BaseAddress);

Status = XAdcPs_SelfTest(XAdcInstPtr);
if (Status != XST_SUCCESS) {
	printf("rXAdcPs_SelfTest() returns XST_FAILUREr");
	return XST_FAILURE;


int adc_chanels [6] = {1,9,6,15,5,13};
	printf("\n\r   ----- New samples -----   \n\r");
	for(int i = 0; i < 6 ; i++){
		VccPintRawData = XAdcPs_GetAdcData(XAdcInstPtr, XADCPS_CH_AUX_MIN + adc_chanels[i]);
		VccPintData = XAdcPs_RawToVoltage(VccPintRawData);
		printf("%0d.%03d Volts.\n\r", (int)(VccPintData), XAdcFractionToInt(VccPintData));
printf("Exiting the XAdc Polled Example.");


int XAdcFractionToInt(float FloatNum)
float Temp;

Temp = FloatNum;
if (FloatNum < 0) {
	Temp = -(FloatNum);
return( ((int)((Temp -(float)((int)Temp)) * (1000.0f))));


There is an error at line 52 in the vitis code.
Since I am a new user, I can only attach one photo, so I will attach the code part where the error occurs as text.
–>" Status = XAdcPolledPrintfExample(XADC_DEVICE_ID);"

Additionally, the board I use is pynq-z2 and I ran it on vivado 2023.

Thanks in advance for your help!