cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,751 Views
Registered: ‎11-05-2018

Unable to build FSBL in SDK

Jump to solution

Greetings,

 

I am following the tutorial in the following repo (with some small modifications): https://github.com/ucb-bar/fpga-zynq

 

I've generated the bitstream in Vivado, exported the hardware and launched the SDK. However I have not been able to successfully build the FSBL without errors.

 

Since the tutorial is compatible with 2016.2, that's the version I'm using. However I have the same errors if I open the .hdf in SDK 2018.2 as well.

 

The Application Project is using, as indicated by the tutorial, the ps7_cortexa9_0 and the OS Platform is standalone. (The compiler is set to 32-bit, but I can't change it, even though my installations are 64-bit.)

 

The following problems are shown:

 

Description    Resource    Path    Location    Type
make: *** [FSBL.elf] Error 1    FSBL             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/coresightps_dcc_v1_2/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/devcfg_v3_4/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/dmaps_v2_1/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/emacps_v3_2/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/qspips_v3_3/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/scugic_v3_3/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/scutimer_v2_1/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/scuwdt_v2_1/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/sdps_v2_8/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/uartps_v3_1/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/usbps_v2_4/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: *** [ps7_cortexa9_0/libsrc/xadcps_v2_2/src/make.libs] Error 2    FSBL_bsp             C/C++ Problem
make: Target 'all' not remade because of errors.    FSBL_bsp             C/C++ Problem
make[1]: *** [coresightps_dcc_comp_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [scugic_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [scutimer_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [scuwdt_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [xadcps_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [xdevcfg_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [xdmaps_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [xemacps_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [xqspips_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [xsdps_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [xuartps_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: *** [xusbps_libs] Error 1    FSBL_bsp             C/C++ Problem
make[1]: Target 'libs' not remade because of errors.    FSBL_bsp             C/C++ Problem
more undefined references to `XQspiPs_PolledTransfer' follow    FSBL        line 733    C/C++ Problem
recipe for target 'coresightps_dcc_comp_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'FSBL.elf' failed    makefile    /FSBL/Debug    line 39    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/coresightps_dcc_v1_2/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/devcfg_v3_4/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/dmaps_v2_1/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/emacps_v3_2/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/qspips_v3_3/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/scugic_v3_3/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/scutimer_v2_1/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/scuwdt_v2_1/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/sdps_v2_8/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/uartps_v3_1/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/usbps_v2_4/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'ps7_cortexa9_0/libsrc/xadcps_v2_2/src/make.libs' failed    Makefile    /FSBL_bsp    line 27    C/C++ Problem
recipe for target 'scugic_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'scutimer_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'scuwdt_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'xadcps_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'xdevcfg_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'xdmaps_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'xemacps_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'xqspips_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'xsdps_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'xuartps_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
recipe for target 'xusbps_libs' failed    Makefile    /FSBL_bsp    line 31    C/C++ Problem
undefined reference to `XDcfg_CfgInitialize'    pcap.c    /FSBL/src    line 390    C/C++ Problem
undefined reference to `XDcfg_GetControlRegister'    main.c    /FSBL/src    line 351    C/C++ Problem
undefined reference to `XDcfg_GetControlRegister'    pcap.c    /FSBL/src    line 441    C/C++ Problem
undefined reference to `XDcfg_GetStatusRegister'    pcap.c    /FSBL/src    line 468    C/C++ Problem
undefined reference to `XDcfg_GetStatusRegister'    pcap.c    /FSBL/src    line 480    C/C++ Problem
undefined reference to `XDcfg_GetStatusRegister'    pcap.c    /FSBL/src    line 486    C/C++ Problem
undefined reference to `XDcfg_GetStatusRegister'    pcap.c    /FSBL/src    line 530    C/C++ Problem
undefined reference to `XDcfg_IntrClear'    pcap.c    /FSBL/src    line 515    C/C++ Problem
undefined reference to `XDcfg_IntrClear'    pcap.c    /FSBL/src    line 566    C/C++ Problem
undefined reference to `XDcfg_IntrClear'    pcap.c    /FSBL/src    line 689    C/C++ Problem
undefined reference to `XDcfg_IntrGetStatus'    pcap.c    /FSBL/src    line 213    C/C++ Problem
undefined reference to `XDcfg_IntrGetStatus'    pcap.c    /FSBL/src    line 347    C/C++ Problem
undefined reference to `XDcfg_IntrGetStatus'    pcap.c    /FSBL/src    line 520    C/C++ Problem
undefined reference to `XDcfg_IntrGetStatus'    pcap.c    /FSBL/src    line 552    C/C++ Problem
undefined reference to `XDcfg_IntrGetStatus'    pcap.c    /FSBL/src    line 665    C/C++ Problem
undefined reference to `XDcfg_IntrGetStatus'    pcap.c    /FSBL/src    line 668    C/C++ Problem
undefined reference to `XDcfg_LookupConfig'    pcap.c    /FSBL/src    line 388    C/C++ Problem
undefined reference to `XDcfg_SetStatusRegister'    pcap.c    /FSBL/src    line 571    C/C++ Problem
undefined reference to `XDcfg_Transfer'    pcap.c    /FSBL/src    line 185    C/C++ Problem
undefined reference to `XDcfg_Transfer'    pcap.c    /FSBL/src    line 306    C/C++ Problem
undefined reference to `XQspiPs_CfgInitialize'    qspi.c    /FSBL/src    line 214    C/C++ Problem
undefined reference to `XQspiPs_LookupConfig'    qspi.c    /FSBL/src    line 209    C/C++ Problem
undefined reference to `XQspiPs_PolledTransfer'    qspi.c    /FSBL/src    line 373    C/C++ Problem
undefined reference to `XQspiPs_PolledTransfer'    qspi.c    /FSBL/src    line 461    C/C++ Problem
undefined reference to `XQspiPs_PolledTransfer'    qspi.c    /FSBL/src    line 688    C/C++ Problem
undefined reference to `XQspiPs_PolledTransfer'    qspi.c    /FSBL/src    line 700    C/C++ Problem
undefined reference to `XQspiPs_PolledTransfer'    qspi.c    /FSBL/src    line 715    C/C++ Problem
undefined reference to `XQspiPs_SetClkPrescaler'    qspi.c    /FSBL/src    line 229    C/C++ Problem
undefined reference to `XQspiPs_SetOptions'    qspi.c    /FSBL/src    line 223    C/C++ Problem
undefined reference to `XQspiPs_SetOptions'    qspi.c    /FSBL/src    line 296    C/C++ Problem
undefined reference to `XQspiPs_SetSlaveSelect'    qspi.c    /FSBL/src    line 234    C/C++ Problem
undefined reference to `XSdPs_CardInitialize'    diskio.c    /FSBL_bsp/ps7_cortexa9_0/libsrc/xilffs_v3_3/src         C/C++ Problem
undefined reference to `XSdPs_CfgInitialize'    diskio.c    /FSBL_bsp/ps7_cortexa9_0/libsrc/xilffs_v3_3/src         C/C++ Problem
undefined reference to `XSdPs_LookupConfig'    diskio.c    /FSBL_bsp/ps7_cortexa9_0/libsrc/xilffs_v3_3/src         C/C++ Problem
undefined reference to `XSdPs_ReadPolled'    diskio.c    /FSBL_bsp/ps7_cortexa9_0/libsrc/xilffs_v3_3/src         C/C++ Problem
undefined reference to `XSdPs_WritePolled'    diskio.c    /FSBL_bsp/ps7_cortexa9_0/libsrc/xilffs_v3_3/src         C/C++ Problem
undefined reference to `XUartPs_SendByte'    outbyte.c    /FSBL_bsp/ps7_cortexa9_0/libsrc/standalone_v5_5/src         C/C++ Problem

And the following errors appear on the console:

 

make pre-build main-build 
a9-linaro-pre-build-step
Building target: FSBL.elf
Invoking: ARM v7 gcc linker
arm-none-eabi-gcc -L"project/FSBL/src" -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -Wl,-build-id=none -specs=Xilinx.spec -Wl,-T -Wl,../src/lscript.ld -L../../FSBL_bsp/ps7_cortexa9_0/lib -o "FSBL.elf"  ./src/fsbl_handoff.o ./src/fsbl_hooks.o ./src/image_mover.o ./src/main.o ./src/md5.o ./src/nand.o ./src/nor.o ./src/pcap.o ./src/ps7_init.o ./src/qspi.o ./src/rsa.o ./src/sd.o   -Wl,--start-group,-lxil,-lgcc,-lc,--end-group -Wl,--start-group,-lxilffs,-lxil,-lgcc,-lc,--end-group -Wl,--start-group,-lrsa,-lxil,-lgcc,-lc,--end-group
 
./src/main.o: In function `main':
project/FSBL/Debug/../src/main.c:351: undefined reference to `XDcfg_GetControlRegister'
./src/pcap.o: In function `PcapDataTransfer':
project/FSBL/Debug/../src/pcap.c:185: undefined reference to `XDcfg_Transfer'
project/FSBL/Debug/../src/pcap.c:213: undefined reference to `XDcfg_IntrGetStatus'
./src/pcap.o: In function `PcapLoadPartition':
project/FSBL/Debug/../src/pcap.c:306: undefined reference to `XDcfg_Transfer'
project/FSBL/Debug/../src/pcap.c:347: undefined reference to `XDcfg_IntrGetStatus'
./src/pcap.o: In function `InitPcap':
project/FSBL/Debug/../src/pcap.c:388: undefined reference to `XDcfg_LookupConfig'
project/FSBL/Debug/../src/pcap.c:390: undefined reference to `XDcfg_CfgInitialize'
./src/pcap.o: In function `FabricInit':
project/FSBL/Debug/../src/pcap.c:441: undefined reference to `XDcfg_GetControlRegister'
makefile:39: recipe for target 'FSBL.elf' failed
project/FSBL/Debug/../src/pcap.c:468: undefined reference to `XDcfg_GetStatusRegister'
project/FSBL/Debug/../src/pcap.c:480: undefined reference to `XDcfg_GetStatusRegister'
project/FSBL/Debug/../src/pcap.c:486: undefined reference to `XDcfg_GetStatusRegister'
./src/pcap.o: In function `ClearPcapStatus':
project/FSBL/Debug/../src/pcap.c:515: undefined reference to `XDcfg_IntrClear'
project/FSBL/Debug/../src/pcap.c:520: undefined reference to `XDcfg_IntrGetStatus'
project/FSBL/Debug/../src/pcap.c:530: undefined reference to `XDcfg_GetStatusRegister'
project/FSBL/Debug/../src/pcap.c:552: undefined reference to `XDcfg_IntrGetStatus'
project/FSBL/Debug/../src/pcap.c:566: undefined reference to `XDcfg_IntrClear'
project/FSBL/Debug/../src/pcap.c:571: undefined reference to `XDcfg_SetStatusRegister'
./src/pcap.o: In function `XDcfgPollDone':
project/FSBL/Debug/../src/pcap.c:665: undefined reference to `XDcfg_IntrGetStatus'
project/FSBL/Debug/../src/pcap.c:668: undefined reference to `XDcfg_IntrGetStatus'
project/FSBL/Debug/../src/pcap.c:689: undefined reference to `XDcfg_IntrClear'
./src/qspi.o: In function `InitQspi':
project/FSBL/Debug/../src/qspi.c:209: undefined reference to `XQspiPs_LookupConfig'
project/FSBL/Debug/../src/qspi.c:214: undefined reference to `XQspiPs_CfgInitialize'
project/FSBL/Debug/../src/qspi.c:223: undefined reference to `XQspiPs_SetOptions'
project/FSBL/Debug/../src/qspi.c:229: undefined reference to `XQspiPs_SetClkPrescaler'
project/FSBL/Debug/../src/qspi.c:234: undefined reference to `XQspiPs_SetSlaveSelect'
project/FSBL/Debug/../src/qspi.c:296: undefined reference to `XQspiPs_SetOptions'
./src/qspi.o: In function `FlashReadID':
project/FSBL/Debug/../src/qspi.c:373: undefined reference to `XQspiPs_PolledTransfer'
./src/qspi.o: In function `FlashRead':
project/FSBL/Debug/../src/qspi.c:461: undefined reference to `XQspiPs_PolledTransfer'
./src/qspi.o: In function `SendBankSelect':
project/FSBL/Debug/../src/qspi.c:688: undefined reference to `XQspiPs_PolledTransfer'
project/FSBL/Debug/../src/qspi.c:700: undefined reference to `XQspiPs_PolledTransfer'
project/FSBL/Debug/../src/qspi.c:715: undefined reference to `XQspiPs_PolledTransfer'
./src/qspi.o:project/FSBL/Debug/../src/qspi.c:733: more undefined references to `XQspiPs_PolledTransfer' follow
../../FSBL_bsp/ps7_cortexa9_0/lib/libxil.a(outbyte.o): In function `outbyte':
outbyte.c:(.text+0xc): undefined reference to `XUartPs_SendByte'
../../FSBL_bsp/ps7_cortexa9_0/lib/libxilffs.a(diskio.o): In function `disk_initialize':
diskio.c:(.text+0x168): undefined reference to `XSdPs_LookupConfig'
diskio.c:(.text+0x1a0): undefined reference to `XSdPs_CfgInitialize'
diskio.c:(.text+0x1c0): undefined reference to `XSdPs_CardInitialize'
../../FSBL_bsp/ps7_cortexa9_0/lib/libxilffs.a(diskio.o): In function `disk_read':
diskio.c:(.text+0x258): undefined reference to `XSdPs_ReadPolled'
../../FSBL_bsp/ps7_cortexa9_0/lib/libxilffs.a(diskio.o): In function `disk_write':
diskio.c:(.text+0x344): undefined reference to `XSdPs_WritePolled'
collect2: error: ld returned 1 exit status
make: *** [FSBL.elf] Error 1

18:04:43 Build Finished (took 787ms)

I have tried repeating the steps, tried changing the compiler used in the makefile, installing some libraries as suggested in some forums, but nothing seems to work.

 

It looks like the libraries are not properly installed or built (I have reinstalled Vivado + SDK and still nothing). Also, I have the following on the PATH:

 

export PATH=$PATH:$RISCV/bin:/opt/Xilinx/Vivado/2016.2/bin:/opt/Xilinx/SDK/2016.2/bin:/opt/Xilinx/SDK/2016.2/settings64.sh:/opt/Xilinx/Vivado/2016.2/settings64.sh

I believe I've seen all posts regarding this or similar issues but nothing has worked so far.

 

Any help is appreciated,

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
1,685 Views
Registered: ‎11-05-2018

Solved the issue meanwhile.

The generated makefiles that compiled the libraries were compiling and then deleting the object files (*.o). The errors (file something.o not found) would differ each time I ran the makefiles outside the SDK depending on what seems a race condition between building the libraries and cleaning the objects.

So, I removed the cleans from all the independent makefiles for each library, ran the main makefile outside the SDK and then rebuilt the FSBL in SDK and it worked.

View solution in original post

0 Kudos
1 Reply
Highlighted
Visitor
Visitor
1,686 Views
Registered: ‎11-05-2018

Solved the issue meanwhile.

The generated makefiles that compiled the libraries were compiling and then deleting the object files (*.o). The errors (file something.o not found) would differ each time I ran the makefiles outside the SDK depending on what seems a race condition between building the libraries and cleaning the objects.

So, I removed the cleans from all the independent makefiles for each library, ran the main makefile outside the SDK and then rebuilt the FSBL in SDK and it worked.

View solution in original post

0 Kudos