This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ubl compilation error encountered during linking with polarssl library



Hi,

I am using CCS version 3.3 to compile UBL and other external libs, test codes for board based on ARM 1802 processor.

I want to compile ubl-omapl1x8 linking with polarssl library. I have successfully compiled polarssl library as a ccs project and got polarssl.lib to link with UBL.

When I compile UBL linking with polarssl.lib then these 2 errors comes.

errors encountered during linking; "ubl-omapl1x8.out" not built 

run placement fails for object ".bss", size 0x84ae (page 0).  Available ranges: ARM_INTERNAL_RAM   size: 0x10000      unused: 0x78e8       max hole: 0x78e8


When I check ubl-spi.map then I found .bss section allocation is getting failed.

UBL ARM_INTERNAL_RAM size is 64K (0x10000) and .bss section size is around 33K (0x000084b0).

My question is, can we reduce the length of BSS section from 33K?

Please suggest what we can try to link polarssl lib in ubl code.

Thanks

Sweta Ruhela 

  • Hello Sweta,
    I will move this thread to the compiler forum. The experts there can help you best.

    Thanks
    ki
  • First a general comment ... Learn how to understand your linker command file by reading this wiki article.

    sweta.r said:
    can we reduce the length of BSS section from 33K?

    Possibly.  Look at the linker command file and see what memory range .bss is allocated to.  Just as an experiment, increase the size of that memory range, so .bss will fit.  The resulting executable won't work, but then you get a map file you can work with.  Inspect the map file to see what individual object files (some of which may come from a library) contribute to .bss, and how much.  It is likely that one or two files make up most of it.  The .bss section contains global variables.  Perhaps there is something you can do in those files to reduce the amount of global variable space required.

    If that does not work out, consider allocating .bss to another memory range.  The memory range ARM_INTERNAL_RAM has available space.  I don't know your hardware constraints well enough to say whether it is OK to allocate global variables there.

    Thanks and regards,

    -George