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# 31067

10.1 EDK - Using G++ (C++) for PowerPC 440 gives the error "undefined reference to `XCache_EnableICache(unsigned int)"

Description

Keywords: compile, C, C++, GCC, G++, Power, PC, 440

When I use the C++ compiler (G++) with the Standalone OS or Xilkernel, I receive undefined reference errors similar to the following:

"tmp/ccI8W9s5.o: In function `main':
/project/TestApp_Peripheral/src/TestApp_Peripheral.c:47: undefined reference to `XCache_EnableICache(unsigned int)'
/project/TestApp_Peripheral/src/TestApp_Peripheral.c:48: undefined reference to `XCache_EnableDCache(unsigned int)'
/project/TestApp_Peripheral/src/TestApp_Peripheral.c:58: undefined reference to `XCache_DisableDCache()'
/project/TestApp_Peripheral/src/TestApp_Peripheral.c:59: undefined reference to `XCache_DisableICache()'
collect2: ld returned 1 exit status
make: *** [TestApp_Peripheral/executable.elf] Error 1"

Solution

C++ guards were not added to certain key files. Below is a patch that will correct the problem:

1. Download the patch:
http://www.xilinx.com/txpatches/pub/swhelp/ise10_updates/ppc_440_c_plus_plus_patch.zip

2. Extract the patch into the $XILINX unified installation area (for example, $XILINX=C:\Xilinx\10.1) overwriting the existing files.

This problem has been fixed in the latest 10.1 Service Pack available at:
http://www.xilinx.com/support/download/
The first service pack containing the fix is 10.1 Service Pack 3.
AR# 31067
Date Created 05/28/2008
Last Updated 09/02/2008
Status Active
Type General Article