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.

SYS/BIOS & XDCtools upgrade leads to compilation failure

Dear Experts,

we upgraded our project from

SYS/BIOS 6.33.06.50, XDCtools 3.23.04.60, ARM Compiler 4.9.6 to

SYS/BIOS 6.35.01.29, XDCtools 3.25.0.48, ARM Compiler 5.0.4 and encountered the following compilation error:

js: "C:/.../03_Workspace/CCS/linker.xdt#112(eval)", line 1: TypeError: Cannot find function genElfSections in object [object Object]

The linker.xdt file is part of project workspace and referenced in the .cfg file as link template file. The genElfSections function within linker.xdt is called in the following way:

%var myUtils = xdc.loadCapsule("ti/targets/arm/elf/linkUtils.xs");

`myUtils.genElfSymbols(prog)`

`myUtils.genElfSections(prog)`

I have noticed that in the new XDCtool version the genElfSections function is missing in linkUtils.xs file. This would explain the error. What I do not understand is that in the linkcmd.xdt file of the new XDCtools version both functions are still called, but in a different manner than it was done in previous XDCtools version.

`xdc.loadCapsule("ti/targets/arm/elf/linkUtils.xs").genElfSymbols(prog)`

`xdc.loadCapsule("ti/targets/elf/linkUtils.xs").genElfSections(prog)`

Using this way of calling the genElfSections function in our linker.xdt file --> the compilation failure disappears.

My question is why was this done and where is the genElfSections function now defined?

Why does it make a difference calling it this way instead of `myUtils.genElfSections(prog)`?

Many thanks and best regards,

GINNI

  • GINNI,
    the functions in linkUtils capsules are internal functions, and we add new ones and remove others from time to time. Between XDCtools 3.23 and 3.25, we found out that the functions 'genElfSections' in ti/targets/arm/elf/linkUtils and ti/targets/elf/linkUtils are the same, so we removed the first one and replaced all calls to the removed functions with the calls to the one in ti/targets/elf.

    The change you made in your code is the right one, and we are not planning any further changes there, so you shouldn't have such problems when you switch to newer releases.

  • Hi Sasha,

    thank You very much. This answers my question. I acutally oversaw the different directory 'ti/targets/elf/linkUtils.xs' within the appropriate linkcmd.xdt file instead of 'ti/targets/arm/elf/linkUtils.xs'.

    Thanks and best regards,

    GINNI