cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
2,520 Views
Registered: ‎04-24-2017

2018.1 FSBL sample fails to build

Jump to solution

I'm trying to create an SD card with and ELF and BIT, so we can test a board without XSDK, etc.  I follow the steps on the wiki, but get some errors using the example application.  It seems some symbols aren't defined (psu_ps_pl_isolation_removal_data and 

psu_ps_pl_reset_config_data).  I think these are functions in psu_init.c (at least they seem to be in mine), but they are not linking despite the HW_platofrm being in the include path. 

 

So, any ideas why these aren't getting linked?  

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
2,826 Views
Registered: ‎09-12-2007

I have tested this real quick on my end. I used a tcl script below to create the workspace:

Note: The script can be sourced on the XSCT console.

 

proc create_workspace {hdf} {
   setws project_1.sdk
   set hw_platform "[file rootname [file tail $hdf]]_hw_platform_0"
   createhw -name $hw_platform -hwspec $hdf
   createapp -name fsbl -app {Zynq MP FSBL} -proc psu_cortexa53_0 -hwproject $hw_platform -os standalone
   projects -build
}

create_workspace [glob -directory [pwd] *.hdf]

 

The steps to do this manually are shown in my last post. This builds without issue. I can open this in the GUI, and everything looks fine.

 

sdk.PNG

 

 If you look below, you will see how the psu_init.c is added to the application. The file is shared from the hardware platform. In your case, this path seems to be broken. Can you verify this?

 

psu_init.PNG

 

Do you see any issues with any other application (like the hello world). I suspect this issue is with your TEMP directory in SDK.

Does this have proper read/write access? 

 

View solution in original post

0 Kudos
6 Replies
Highlighted
Moderator
Moderator
2,481 Views
Registered: ‎09-12-2007

Can you post your error you are seeing?

 

These functions are in the psu_init.c. The psu_init.c is in the hw_platform. Did you create the HW platform in SDK?

 

So, lets start from scratch...

Launch SDK

Create HW platform

  • File -> new -> project -> Xilinx -> Hardware Platform specification, and browse to your HDF file that was created when you exported to SDK from Vivado

Create the FSBL

  • File -> New -> Application Project, give it a name, Next, and select the FSBL template and Finish
  • (Optional) Right Click on the fsbl applciation, and select C/C++ build settings. Then in the symbols, select and add "FSBL_DEBUG_INFO"

Create the Bootable image:

  • Right click on the fsbl application in Project explorer view in SDK, and select create boot image.
  • The fsbl, and bit (if exists in hw platform), should be auto-populated. If not add the fsbl as the bootloader, and the bit as a data file. Select next to continue.

Boot:

Place the boot.bin onto your SD card, and set the boot mode to boot from SD card 

0 Kudos
Highlighted
Adventurer
Adventurer
2,473 Views
Registered: ‎04-24-2017

Thanks for replying,

I've tried again with the instructions provided and I'm still getting errors.  This time I just the BSP generated rather than my own.  In the errors tab I get:
make: *** [FSBL_ZCU_10_5_FSBL.elf] Error 1 FSBL_ZCU_10_5_FSBL C/C++ Problem

In the console I see:

aarch64-none-elf-gcc: error: ./FSBL_ZCU_10_5_FSBL_bsp/psu_cortexa53_0/libsrc/spips_v30/src/xspips_g.o: No such file or directory

 

In this case it looks like there is a problem with the path generated it is ..../spips_v30... rather than ..../spips_v3_0/...  Not sure I can override that because it's coming from an auto generated makefile right?

 

When doing what I did before (the same but using my own BSP), I get the following errors in the console:

'Building target: FSBL_ZCU_10_5_mybsp.elf'
'Invoking: ARM v8 gcc linker'
aarch64-none-elf-gcc -Wl,-T -Wl,../src/lscript.ld -LC:/Users/Adam/Documents/code/BSP_ZCU_4_5_2018/BSP_ZCU_4_5_2018/psu_cortexa53_0/lib -o "FSBL_ZCU_10_5_mybsp.elf"  ./src/xfsbl_authentication.o ./src/xfsbl_board.o ./src/xfsbl_bs.o ./src/xfsbl_csu_dma.o ./src/xfsbl_dfu_util.o ./src/xfsbl_exit.o ./src/xfsbl_handoff.o ./src/xfsbl_hooks.o ./src/xfsbl_image_header.o ./src/xfsbl_initialization.o ./src/xfsbl_main.o ./src/xfsbl_misc.o ./src/xfsbl_misc_drivers.o ./src/xfsbl_nand.o ./src/xfsbl_partition_load.o ./src/xfsbl_plpartition_valid.o ./src/xfsbl_qspi.o ./src/xfsbl_rsa_sha.o ./src/xfsbl_sd.o ./src/xfsbl_translation_table.o ./src/xfsbl_usb.o   -Wl,--start-group,-lxil,-lgcc,-lc,--end-group -Wl,--start-group,-lxil,-llwip4,-lgcc,-lc,--end-group -Wl,--start-group,-lxilffs,-lxil,-lgcc,-lc,--end-group -Wl,--start-group,-lxilpm,-lxil,-lgcc,-lc,--end-group -Wl,--start-group,-lxilsecure,-lxil,-lgcc,-lc,--end-group -n
C:\Users\Adam\AppData\Local\Temp\ccdzr4Zt.ltrans0.ltrans.o: In function `XFsbl_PartitionValidation.constprop.7':
<artificial>:(.text+0x295c): undefined reference to `psu_ps_pl_isolation_removal_data'
<artificial>:(.text+0x295c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `psu_ps_pl_isolation_removal_data'
<artificial>:(.text+0x2960): undefined reference to `psu_ps_pl_reset_config_data'
<artificial>:(.text+0x2960): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `psu_ps_pl_reset_config_data'
C:\Users\Adam\AppData\Local\Temp\ccdzr4Zt.ltrans0.ltrans.o: In function `main':
<artificial>:(.text.startup+0xe8): undefined reference to `psu_init'
<artificial>:(.text.startup+0xe8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `psu_init'
<artificial>:(.text.startup+0xfcc): undefined reference to `psu_ps_pl_isolation_removal_data'
<artificial>:(.text.startup+0xfcc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `psu_ps_pl_isolation_removal_data'
<artificial>:(.text.startup+0xfd0): undefined reference to `psu_ps_pl_reset_config_data'
<artificial>:(.text.startup+0xfd0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `psu_ps_pl_reset_config_data'
<artificial>:(.text.startup+0x104c): undefined reference to `psu_protection'
<artificial>:(.text.startup+0x104c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `psu_protection'
<artificial>:(.text.startup+0x1054): undefined reference to `psu_protection_lock'
<artificial>:(.text.startup+0x1054): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `psu_protection_lock'
collect2.exe: error: ld returned 1 exit status
make: *** [FSBL_ZCU_10_5_mybsp.elf] Error 1

These are again makefile based, so I guess something is generating incorrectly.  These methods are definitely in psu_init.  It is linked as a workspace path.  When I remove this include path it fails to find pus_init.h, so it is definitely getting parsed.

 

 

0 Kudos
Highlighted
Moderator
Moderator
2,462 Views
Registered: ‎09-12-2007
Can you post your HDF file please?
0 Kudos
Highlighted
Adventurer
Adventurer
2,454 Views
Registered: ‎04-24-2017
Sure, I've pm'd you a link
0 Kudos
Highlighted
Moderator
Moderator
2,827 Views
Registered: ‎09-12-2007

I have tested this real quick on my end. I used a tcl script below to create the workspace:

Note: The script can be sourced on the XSCT console.

 

proc create_workspace {hdf} {
   setws project_1.sdk
   set hw_platform "[file rootname [file tail $hdf]]_hw_platform_0"
   createhw -name $hw_platform -hwspec $hdf
   createapp -name fsbl -app {Zynq MP FSBL} -proc psu_cortexa53_0 -hwproject $hw_platform -os standalone
   projects -build
}

create_workspace [glob -directory [pwd] *.hdf]

 

The steps to do this manually are shown in my last post. This builds without issue. I can open this in the GUI, and everything looks fine.

 

sdk.PNG

 

 If you look below, you will see how the psu_init.c is added to the application. The file is shared from the hardware platform. In your case, this path seems to be broken. Can you verify this?

 

psu_init.PNG

 

Do you see any issues with any other application (like the hello world). I suspect this issue is with your TEMP directory in SDK.

Does this have proper read/write access? 

 

View solution in original post

0 Kudos
Highlighted
Adventurer
Adventurer
2,435 Views
Registered: ‎04-24-2017

Ok, thanks for that, you were right.  There seems to be a path problem when sharing the psu_init.c.  When I manually copied it across everything worked fine.

 

I tried creating a hello_word project just to check and it worked fine.  I have had problems with the SDK before (generating wrong addresses in x_params etc.).  It should have read/write permissions no problem, it is on a different hard drive to the code and workspace, but that shouldn't matter.

 

In any case, thanks a lot.  I'll finish off the SD card now.

0 Kudos