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.

AM62A7-Q1: TI ARM Clang compiler link error for AM62Ax

Part Number: AM62A7-Q1

Tool/software:

hello all,

i just compiled my software with TI Arm clang compiler for AM62Ax product, but stuck in the final linking step, as you can see the following errors in the link phase ,but i do not know why this happened since the error message is so confused.

TI ARM Clang Compiler Version:ti-cgt-armllvm_3.2.2.LTS

If you have any suggestions please let me know ,thank you very much!

  • Hi,

    Please tell which command are you using? Can you please also confirm that you have the tiarmlnk.exe file in ${Compiler}/bin directory?

    Also make sure the size of file tiarmlnk.exe is not 0.

    Regards,

    Tushar

  • hello Tushar,

    thanks for your quickly reply.

    The following tiarmlink.exe is we are using and its size is not zero. 

    The below picture shows what we are using command for link phase.

  • Hi

    Is this the only command you are running?

    Which SDK are you using? Please specify the SDK version also?

    What is the end goal here? Are you trying to build an example from SDK?

    I have not seen this command being directly used anywhere in MCU+SDK.

    Regards,

    Tushar

  • hi Tushar,

    SDK Version is shown as below:

     I am not using the original SDK to compile, i just get some codes from SDK or MCAL package, then build them with my scons tools.

    since i alreay built the mcal Can_App with my scons environment , and the build elf can be flashed into EvM and worked very well , then i just add more AUTOSAR Os code based on this Can_App demo with my own scons tools, finally we can see the link error after fixing the building errors.

  • hello Tushar,

    i want to give you more information about my building process.

    even if i used @file to avoid the length limitation in windows, but my link_objects.lst size is about 32kb which including many objects in that file, so is there any input parameter size limitation for tiarmlink.exe, if so , i think maybe i can transfer to linux compile environment or just make some objects into archive to fix this issue.

    The above is my guess, hopefully you can tell me if it is exist:

  • Hi Zhen,

    I am routing your thread to the compiler team for further comments.

    Regards,

    Tushar

  • I am mostly sure you are experiencing the problem discussed in this forum thread.  I think these two changes will avoid the problem.  They both relate to the file link_objects.lst.

    1. Do not use @ when referring to the file
    2. Inside the file, write each object file on a separate line

    Thanks and regards,

    -George

  • helllo George,

    Thank you for your reply.

    This is my latest situation:

    Now i just fixed my issue by building my program in Linux environment. 

    Let me answer your concern.

    1. Do not use @ when referring to the file 

    Ans: i think we can use this since it is allowed in the compiler user manual, and you can check that.

    2. Inside the file, write each object file on a separate line

    Ans: I already done this ,so there is no need to change for my issue.

    I think the root cause is tiarmclang.exe has parameter length limitation about 32 KB based on my test in windows , but 2M in linux, which is enough for my sistuation. 

    So it can get link result if I reduce the object files in that link.rsp below 30kb.

    Once I build my program in Linux environment, then there is nothing to be changed and I can get link result smoothly.

    So i think this is OS environment differences for the input parameter  handling. 

    I strongly suggest that we had better to compile our program in Linux environment and it is also more faster than windows.

    Do not think it can break the parameter limitation in windows even if you use @file  during link phase, which only can lower the risk of this issue.

    Please let me know if you have any concern about my description.

  • 1. Do not use @ when referring to the file 

    Ans: i think we can use this since it is allowed in the compiler user manual, and you can check that.

    I'm confused.  Have you tried it?  I don't think you have.  

    Here is another way to do it that you may like better.  Instead of @, precede it with -Wl,  For example:

    -Wl,link_objects.lst

    That means the entire file is passed directly to the linker.  The contents of the file never appear on any command line.  That avoids the problems with command line length.

    Thanks and regards,

    -George