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

7.1i SP2 EDK/GNU- code/system.c:10:1: pasting "(" and "fslIn" does not give a valid preprocessing token

描述

Keywords: EDK, Compiler, MicroBlaze, Macro, mb_interface

Urgency: Standard

General Description:
I created the following C file and compiled under EDK 7.1i:

#define microblaze_nbread_datafsl(val, id) asm volatile ("nget %0, rfsl" #id : "=d" (##val##))

main() {

unsigned int fslIn;

do
{
microblaze_nbread_datafsl( fslIn, 1 );
}while (1 );

}

I receive the following error while trying to compile it:

code/system.c:10:1: pasting "(" and "fslIn" does not give a valid preprocessing token
code/system.c:10:1: pasting "fslIn" and ")" does not give a valid preprocessing token
make: *** [robotB/executable.elf] Error 1
Done.

解决方案

The Macro definition is no longer needed in EDK 7.1i. Just use the function without defining it in the code; however, it will be necessary to include the "mb_interface.h" in the main file.

AR# 22275
日期 04/17/2007
状态 Archive
Type 综合文章
的页面