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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor joshuaspence
Visitor
5,870 Views
Registered: ‎10-25-2012

Error compiling Vivado BSP

Hi all,

 

I am using a XC7Z020CLG484-1 Zedboard and am trying to instance a fairly basic distance_squared function. The C++ source that is synthesised is attached (distance.cpp). I have tried using AutoESL and Vivado for synthesis, both with the same result.

 

I am using AutoESL 2012.1, Vivado 14.3, EDK 14.3, SDK 14.3. I am having a problem compiling the board support package for my project. It seems that the DATA_SYNC macro is not defined... and I am unsure of where it should be defined and why it is not defined.

 

The steps that I have followed are as follows:

  1. Synthesis distance.cpp in AutoESL/Vivado
  2. Export pcores from AutoESL/Vivado.
  3. In PlanAhead, create a new project and then add a new embedded source with the name "system".
  4. Import pcore into a new EDK project (through PlanAhead).
  5. Create the appropriate connections in EDK.
  6. Create a top level HDL for the "system" embedded source.
  7. Generate the bitstream for my project.
  8. Export the bitstream to SDK.
  9. Create a new "Xilinx Application" project in SDK, with a new board support package (named "standalone_bsp").
  10. When I attempt to compile the newly generated BSP, the compilation fails. The error is as follows.

make -k all 

libgen -hw ../system_hw_platform/system.xml\
\
-pe ps7_cortexa9_0 \
-log libgen.log \
system.mss
libgen
Xilinx EDK 14.3 Build EDK_P.40xd
Copyright (c) 1995-2012 Xilinx, Inc. All rights reserved.

Command Line: libgen -hw ../system_hw_platform/system.xml -pe ps7_cortexa9_0
-log libgen.log system.mss


Staging source files.
Running DRCs.
Running generate.
Running post_generate.
Running include - 'make -s include "COMPILER=arm-xilinx-eabi-gcc"
"ARCHIVER=arm-xilinx-eabi-ar" "COMPILER_FLAGS= -O2 -c"
"EXTRA_COMPILER_FLAGS=-g"'.

Running libs - 'make -s libs "COMPILER=arm-xilinx-eabi-gcc"
"ARCHIVER=arm-xilinx-eabi-ar" "COMPILER_FLAGS= -O2 -c"
"EXTRA_COMPILER_FLAGS=-g"'.
Compiling common
C:\Xilinx\14.3\ISE_DS\EDK\gnu\arm\nt64\bin\arm-xilinx-eabi-ar.exe: creating ../../../lib/libxil.a
Compiling xadc
Compiling standalone
Compiling axidma
xaxidma_bdring.c: In function 'XAxiDma_BdRingToHw':
xaxidma_bdring.c:1068:2: error: 'DATA_SYNC' undeclared (first use in this function)
xaxidma_bdring.c:1068:2: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [libs] Error 1
Compiling canps
Compiling devcfg
Compiling dmaps
Compiling emacps
Compiling gpiops
Compiling iicps
Compiling qspips
Compiling scugic
Compiling scutimer
Compiling scuwdt
Compiling ttcps
Compiling uartps
Compiling usbps
Compiling wdtps
...

 

**** Build of configuration Debug for project distance ****

make all
Building file: ../src/helloworld.c
Invoking: ARM gcc compiler
arm-xilinx-eabi-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp/ps7_cortexa9_0/include -MMD -MP -MF"src/helloworld.d" -MT"src/helloworld.d" -o"src/helloworld.o" "../src/helloworld.c"
cygwin warning:
MS-DOS style path detected: C:\Users\Joshua\Desktop\xilinx\sw_update\distance_planahead2\distance_planahead2.sdk\SDK\SDK_Export\distance\Debug
Preferred POSIX equivalent is: /cygdrive/c/Users/Joshua/Desktop/xilinx/sw_update/distance_planahead2/distance_planahead2.sdk/SDK/SDK_Export/distance/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Finished building: ../src/helloworld.c

Building file: ../src/platform.c
Invoking: ARM gcc compiler
arm-xilinx-eabi-gcc -Wall -O0 -g3 -c -fmessage-length=0 -I../../standalone_bsp/ps7_cortexa9_0/include -MMD -MP -MF"src/platform.d" -MT"src/platform.d" -o"src/platform.o" "../src/platform.c"
cygwin warning:
MS-DOS style path detected: C:\Users\Joshua\Desktop\xilinx\sw_update\distance_planahead2\distance_planahead2.sdk\SDK\SDK_Export\distance\Debug
Preferred POSIX equivalent is: /cygdrive/c/Users/Joshua/Desktop/xilinx/sw_update/distance_planahead2/distance_planahead2.sdk/SDK/SDK_Export/distance/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Finished building: ../src/platform.c

Building target: distance.elf
Invoking: ARM gcc linker
arm-xilinx-eabi-gcc -Wl,-T -Wl,../src/lscript.ld -L../../standalone_bsp/ps7_cortexa9_0/lib -o"distance.elf" ./src/helloworld.o ./src/platform.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
cygwin warning:
MS-DOS style path detected: C:\Users\Joshua\Desktop\xilinx\sw_update\distance_planahead2\distance_planahead2.sdk\SDK\SDK_Export\distance\Debug
Preferred POSIX equivalent is: /cygdrive/c/Users/Joshua/Desktop/xilinx/sw_update/distance_planahead2/distance_planahead2.sdk/SDK/SDK_Export/distance/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
c:/xilinx/14.3/ise_ds/edk/gnu/arm/nt64/bin/../lib/gcc/arm-xilinx-eabi/4.6.1/../../../../arm-xilinx-eabi/bin/ld.exe: cannot find -lxil
collect2: ld returned 1 exit status
make: *** [distance.elf] Error 1

 

Any help would be greatly appreciated as I have been trying to get this working for weeks now. I was using 14.2 before and had different results, but ultimately it still wouldn't work for me.

0 Kudos
3 Replies
Visitor janarbek
Visitor
5,805 Views
Registered: ‎10-15-2010

Re: Error compiling Vivado BSP

Hi Joshuaspence,

 

I have exactly same problem and my setup is very similar to yours. Did you resolve this ? I am almost using same tools as you. 

0 Kudos
Adventurer
Adventurer
5,779 Views
Registered: ‎10-24-2007

Re: Error compiling Vivado BSP

I also got this error and I fixed by adding the followings lines of code in file /opt/Xilinx/14.3/ISE_DS/EDK/sw/lib/bsp/standalone_v3_07_a/src/cortexa9/xil_io.h afterline 79.

 

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

#if defined __GNUC__
#  define SYNCHRONIZE_IO        dmb()
#  define INST_SYNC             isb()
#  define DATA_SYNC             dsb()
#else
#  define SYNCHRONIZE_IO
#  define INST_SYNC
#  define DATA_SYNC
#endif /* __GNUC__ */

 

I copied this from version standalone_v3_06_a.


good luck!

0 Kudos
Observer larryqwest
Observer
5,440 Views
Registered: ‎10-10-2009

Re: Error compiling Vivado BSP

I had a similar problem with ISE 14.4, with compile errors when trying to create the BSP from the HW Platform, like others here:

http://www.zedboard.org/content/zedboard-tutorial-problem-lab2#comment-2160

 

I finally found the solution by from Kevin (zedhed) here: http://www.zedboard.org/content/problems-creating-board-support-files-zed-144-version-sdk

 

The solution was Kevin's suggestion 1: 1Launch PlanAhead from a command line, then launch SDK from PlanAhead.
Specifically, I launched PlanAhead from the “ISE Design Suite 64-bit Command Prompt” by typing “planahead”. Then I created and exported the HW_Platform to SDK and the BSP was created without errors finally.

 

But I found that Kevin's solution 2 from, starting SDK from Start menu did NOT work for me.

0 Kudos