cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ruijie
Adventurer
Adventurer
842 Views
Registered: ‎08-06-2018

FSBL error when creating boot.bin

Hi, 

I'm using zynq 7000 and SDK 2017.4.

Here's my problem:

Because of the fact that FSBL occupies too much of ocm that my apps cannot reuse. So I'm trying to overlap the ocm as much as possible between fsbl and apps without crashing any of them.

I try to put several functions like LoadImage() to a specific section using __attribute__((section("")), however, the fsbl project can compile but when I create the boot image, I get " Multiple executable program sections in FSBL.elf" error .

Also, when I try to put .text to one segment and .data . rodata .xxx ... to another segment, I get this  "Multiple executable program sections in FSBL.elf" error too.

What's the problem and why is that?

It seems that there are some constrains on defining the sections of FSBL. What are the constrains ? Is it because of the BootRom code that force the FSBL to be like this? Must the .text section starting from fixed address 0x0 in case the bootrom code could correctly find the fsbl? Must the text section resides in the same segment as data and some other sections ?

BRs

0 Kudos
6 Replies
ruijie
Adventurer
Adventurer
786 Views
Registered: ‎08-06-2018

Can anyone helps out or give me any hint ,please ??
0 Kudos
wduffy
Xilinx Employee
Xilinx Employee
769 Views
Registered: ‎01-21-2013

Hi @ruijie,

 

Can you provide more details on exactly what is “overlapping”?  

I’m not sure the approach you’re using would be recommended. It’s not straightforward to make the changes to the FSBL as you wish to, and code most certainly shouldn’t overlap.

 

Is there a reason why you cannot run from DDR?

 

Thanks,
Wendy
Xilinx Technical Support
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
ruijie
Adventurer
Adventurer
607 Views
Registered: ‎08-06-2018

Thank you @wduffy,

Here's more details:

I have two baremetal AMP projects, most part of the projects are reside in DDR, however, I want to put part of my key path code into ocm to accelerate the executing speed. since ocm access speed is much faster that ddr access. While fsbl must run in ocm(I don't want to execute fsbl xip in nor for its low speed) which left a little space of ocm for my two projects. But I want to use ocm for my projects as much space as possible.

So, what I'm trying to do is 1. minimize the size of fsbl , 2. by defining overlapping sections in fsbl and my projects to let the memory which uses by fsbl firstly can be reused by my projects after the fsbl handsoff.

As for now, for example, I defined 0x0 - 0x22000 for fsbl while 0x22000 - 0x2ffff, 0xffff0000 - 0xfffffe00 for my projects. That is I make sure that the memory does not overlap between fsbl and my projects in linker.ld.

As you can see, fsbl still occupies more that 130K space of ocm and that is too much.

Then I defined the NOLOAD sections in overlapped memory area. for example, I defined NOLOAD sections of fsbl in 0x11000 to 0x22000 and the NOLOAD sections of my projects also in 0x11000 - 0x22000. since noload sections does not need to be actually loaded when fsbl executing loadImage(), 0x11000 - 0x22000 can be reused by my projects without crashing the fsbl.

However, that still occupies more than 60K . I hope fsbl occupies the minimum space.

Ok, the above is what I done so far successfully. And after that I try to look for more possiblilities of overlapping (which means the overlapping memory can be reused by my projects after the fsbl handsoff without crashing the fsbl during its execution).

Here's what I did : I try to define loadImage() and handsoff() these two functions to a seperate section , they reside in .text section by default. The fsbl can compile correctly, but when I create the boot image with this fsbl , I get "Multiple executable program sections in FSBL.elf" error .

So why is that ?

BRs

0 Kudos
ruijie
Adventurer
Adventurer
735 Views
Registered: ‎08-06-2018

Thank you @wduffy ,

Here's more detail:

I have two baremetal amp projects and most part of the code and data reside in ddr, however, I want to put some key path code into ocm for its faster access speed that ddr so as to accelerate my execution speed.

But FSBL must run in ocm ( I don't want it to run xip in nor for its slow speed) which takes more that 130K space of ocm which is too much.  And if the sections address defined in fsbl and my project have any overlap (for example 0x0 - 0x22000 defined for .text in fsbl and also defined for .text in my project), the fsbl may crash during its load Image process. I hope to make fsbl occupies minimum space of ocm so that my project can use more ocm.

However, NOLOAD sections offer me a way to do overlapping, for example I define 0x11000- 0x22000 for noload sections in fsbl , and at the same time for noload sections in my project. This won't crash the fsbl since noload section does not need to be actually loaded. 

But still, fsbl occupies around 67K. The problem is that this 67K space can not be reused by my project even after the fsbl handsoff.

So what I'm trying to do now are 1. optimize to minimum the size of fsbl,  2. look for more possible overlapping to minimum the space wasted by fsbl, by "wasted" I mean it cannot be reused after handsoff, without crashing the fsbl execution.

Now back to my original problem , I'm doing a little experiment that I try to put a few functions like loadImage(), handsoff() of fsbl to a separate section like ".text1" , these funcitons reside in .text as default. The fsbl project compiles done. But when I create the boot.bin with this fsbl , I get "Multiple executable program sections in FSBL.elf" error 

It seems that there are some constrains on defining the sections of FSBL. What's the problem and why is that?

BRs

0 Kudos
ruijie
Adventurer
Adventurer
700 Views
Registered: ‎08-06-2018

Is there anything wrong with my problem description?? My details not clear and can not be understood???

I have read https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842019/FSBL and  https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842377/Zynq-7000+AP+SoC+Boot+-+Booting+and+Running+Without+External+Memory+Tech+Tip.

But its not enough for my problem. I hope to modify fsbl as I expected. But constrains seem exist.

Anyone can help me or give me more links or hint?

BRs

0 Kudos
ruijie
Adventurer
Adventurer
679 Views
Registered: ‎08-06-2018

Any xilinx employee who knows fsbl well ???

0 Kudos