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

9.2i EDK - Errors when compiling Xilkernel 4.00a with mb-g++ compiler

Description

Keyword: Xilkernel, G++, compiler, error, C++, gcc, GNU

When I run Generate Libraries and BSP, and use the C++ compiler instead of the C compiler, I get many error messages.

Errors like :
- using void pointers in mathematical expressions popup,and indeed the compiler is not lying! The QUEUE works probably fine because the basic type is a CHAR, but the void pointer is incremented with 1 and not with the actual type-size.
See QUEUE.C line 115 :
memcpy (( queue->items+(qend*queue->item_size)),item,queue- >item_size);

- also function prototypes are not always correct, see sched.c , where
The restore_context() function has a prototype with zero arguments (whoch should be the process structure pointer), using the C compiler this will be slipped trough !

- other messages like
main.c:112: error: 'hw_init' was not declared in this scope
main.c:128: error: 'pthread_init' was not declared in this scope
main.c:131: error: 'sem_heap_init' was not declared in this scope
main.c:172: error: 'microblaze_enable_interrupts' was not declared in this
are result of missing prototypes.

Solution

As a workaround, please modify the Makefiles at <EDK92_install>\sw\lib\bsp\xilkernel_v4_00_a\src as follows:

Replace

CC = ${COMPILER}

With

CC = $(ARCH_PREFIX)-gcc

This problem has been fixed in the latest EDK 9.2i Service Pack, available at:
http://www.xilinx.com/xlnx/xil_sw_updates_home.jsp
The first service pack containing the fix is EDK 9.2i Service Pack 2.
AR# 29892
Date Created 12/04/2007
Last Updated 12/03/2007
Status Active
Type General Article