UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 19926

6.2 EDK, PPC Tutorial - The code given in step 12 of "finishing the tutorial application code" generates errors such as "macro <function> used with only 2 args"

Description

Keywords: EDK, Tutorial, PPC, error, compile

Urgency: Standard

General Description:
When I try to do the "Creating a PowerPC design" (Platform Studio user guide, chapter 11), I receive some errors when I arrive to the section "Compiling the Code" step 2 "Build all user applications".

Below are the four errors I get:
TestApp/src/TestApp.c:160: macro `XGpio_mSetDataDirection' used with only 2 args
TestApp/src/TestApp.c:164: macro `XGpio_mSetDataReg' used with only 2 args
TestApp/src/TestApp.c:173: macro `XGpio_mSetDataReg' used with only 2 args
TestApp/src/TestApp.c:188: macro `XGpio_mGetDataReg' used with just one arg

The document reference is ug113 (v1.0) March 12, 2004.

Solution

These errors occur because some functions are called without all the necessary arguments:

Below are the wrong lines:

XGpio_mSetDataDirection (BaseAddress, 0x00000000);
XGpio_mSetDataReg(BaseAddress, j);
XGpio_mSetDataReg(BaseAddress, j);
Xuint32 data = XGpio_mGetDataReg(BaseAddress);

Below are the correct lines:

XGpio_mSetDataDirection (BaseAddress, 1, 0x00000000);
XGpio_mSetDataReg(BaseAddress,1, j);
XGpio_mSetDataReg(BaseAddress,1, j);
Xuint32 data = XGpio_mGetDataReg(BaseAddress,1);
AR# 19926
Date Created 09/01/2004
Last Updated 04/28/2006
Status Archive
Type General Article