cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
chrisjrh
Observer
Observer
3,491 Views
Registered: ‎06-05-2017

2017.3 PMUFW compilation failure on zynqmp UltraScale+ - RAM Overflow

Jump to solution

Since updating to 2017.3 I am unable to get the pmufw to compile for my zynqmp using hsi (http://www.wiki.xilinx.com/Build+PMU+Firmware) as it no longer fits on the microblaze:

 

/home/apps/Xilinx/SDK/2017.3/gnu/microblaze/lin/bin/../lib/gcc/microblaze-xilinx-elf/6.2.0/../../../../microblaze-xilinx-elf/bin/ld: executable.elf section `.bss' will not fit in region `PMU_RAM'
/home/apps/Xilinx/SDK/2017.3/gnu/microblaze/lin/bin/../lib/gcc/microblaze-xilinx-elf/6.2.0/../../../../microblaze-xilinx-elf/bin/ld: section .xpbr_serv_ext_tbl VMA [ffddf6e0,ffddfadf] overlaps section .bss VMA [ffdde368,ffde08ab]
/home/apps/Xilinx/SDK/2017.3/gnu/microblaze/lin/bin/../lib/gcc/microblaze-xilinx-elf/6.2.0/../../../../microblaze-xilinx-elf/bin/ld: region `PMU_RAM' overflowed by 8656 bytes

 

Generating the pmufw with the SDK works fine however. Comparing the auto generated files from the SDK and hsi::generate_app they are identical apart from the bsp .mss files and makefiles. The mss file created by the SDK has PARAMETER compiler_flags =  -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mxl-soft-mul -mcpu=v9.2 within the PROCESSOR section. These compiler flags are specified in the Makefile generated by hsi::generate_app though...

 

Any ideas?

0 Kudos
1 Solution

Accepted Solutions
johnmcd
Xilinx Employee
Xilinx Employee
4,949 Views
Registered: ‎02-01-2008

As the pmu code increased, the link time optimization flags were turned on.

 

In sdk, review the pmu application's c/c++ build settings->miscellaneous. The optimization is set to -Os, and both -flto and -ffat-lto-objects are enabled.

 

Try enabling the same options in your scripted flow.

View solution in original post

0 Kudos
6 Replies
worseworst
Visitor
Visitor
3,392 Views
Registered: ‎03-15-2016

I also encounter this issue. Waiting for solution...

0 Kudos
johnmcd
Xilinx Employee
Xilinx Employee
4,950 Views
Registered: ‎02-01-2008

As the pmu code increased, the link time optimization flags were turned on.

 

In sdk, review the pmu application's c/c++ build settings->miscellaneous. The optimization is set to -Os, and both -flto and -ffat-lto-objects are enabled.

 

Try enabling the same options in your scripted flow.

View solution in original post

0 Kudos
chrisjrh
Observer
Observer
3,347 Views
Registered: ‎06-05-2017

Thanks @johnmcd for your reply,

 

My scripted flow just made a call to generate_app as detailed on the wiki for building the pmufw http://www.wiki.xilinx.com/Build+PMU+Firmware.

 

For now I have created a patch which adds  -Os -flto -ffat-lto-objects to the compiler flags on the top level makefile which compiles successfuly. I guess these flags were added to the sdk and forgotten about when it comes to the files that the generate_app generates?

0 Kudos
rakesh.kumar.c
Visitor
Visitor
3,308 Views
Registered: ‎10-11-2017

Hi Chrisjrh,

 

I'm also getting same error but not sure where to add these options

-Os -flto -ffat-lto-objects

 

I'm using generate_app as instructed in the http://www.wiki.xilinx.com/Build+PMU+Firmware

 

Thanks & Regards,

Rakesh

0 Kudos
chrisjrh
Observer
Observer
3,248 Views
Registered: ‎06-05-2017

Hi @rakesh.kumar.c,

 

You need to run generate_app without the -compile option to generate all the C code then edit the top level Makefile and append -Os -flto -ffat-lto-objects to the CC_FLAGS. Then run make and it should compile with no issues.

 

My guess is Xilinx added these optimisations to the Eclipse settings which is why it works fine using the SDK but forgot to add them to the Makefile generated by the hsi::generate_app command. 

rakesh.kumar.c
Visitor
Visitor
3,225 Views
Registered: ‎10-11-2017

Thanks chrisjrh,

 

Your instructions are very helpful. I'm able to generate required PMUFW.

 

Best Regards,

Rakesh

0 Kudos