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.

LP-MSPM0G3519: Compilation error for new base creation

Part Number: LP-MSPM0G3519
Other Parts Discussed in Thread: MSPM0G3519

Tool/software:

Hello Team,

We are trying to compile and create a empty example base for MSPM0G3519 micro. During the final stage we could see some linking to functions taken from library file getting missed which throws error.

Attaching the below details for reference.

warning: cannot resolve archive
/ti-cgt-armllvm_4.0.1.LTS/lib/libc.a
to a compatible library, as no input files have been encountered

undefined first referenced
symbol in file
--------- ----------------
__stack_chk_fail /lib/libPlatformStubs.a<startup_mspm0g351x_ticlang.c.obj>
__stack_chk_guard /lib/libPlatformStubs.a<startup_mspm0g351x_ticlang.c.obj>
_args_main /ti-cgt-armllvm_4.0.1.LTS/lib/armv6m-ti-none-eabi/c/libsysbm.a<boot_cortex_m.c.obj>
_system_pre_init /ti-cgt-armllvm_4.0.1.LTS/lib/armv6m-ti-none-eabi/c/libsysbm.a<boot_cortex_m.c.obj>
exit /ti-cgt-armllvm_4.0.1.LTS/lib/armv6m-ti-none-eabi/c/libsysbm.a<boot_cortex_m.c.obj>

Please provide your support in the above topic to resolve.

Thanks and Regards,

Naveen

  • Hi Naveen,

    Could you please provide the screenshots of the steps for creating the new project and IDE version for us?

    By the way, if you want to create a new empty project, the simplest way is to import a empty project through SDK.

    Best Regards,
    Peter

  • Hi Peter,

    We are not using CCS IDE for this. instead we are creating a cmake based compilation setup for this creation.

    Thanks and Regards,

    Naveen

  • Hi Naveen,

    I'm so sorry to tell you that we don't have any documentation or project examples to help with CMAKE-related at the moment.

    However, based on the error message "undefined first referenced symbol in file", it seems to be related to the path settings so that unable to find the symbols I guess.

    Here are the CMAKE-related posts I found, hopefully it will be helpful to you.

    TMS570LC4357: CMake project

    Best Regards,
    Peter

  • Hi Peter,

    The above link shared shows does not exist. Also here I need to understand how the startup is taken into compilation for this MSPM0G3519 device. So we could try to have it in our compilation if we are missing any. Please provide your feedback.

    Thanks and Regards,

    Naveen

  • Hi Naveen,

    About the startup compilation details of MSPM0G3519 that you want to know, I will send your post to SDTO team for help. Please wait patiently for a reply.

    Best Regards,
    Peter

  • The likely solution is to remove this ...

    /ti-cgt-armllvm_4.0.1.LTS/lib/libc.a

    ... from the command used to invoke the linker.  Instead rely on the compiler to automatically find runtime libraries like libc.a.  This passage comes from the part of the tiarmclang online manual titled Compile and Link ...

    When the linker is invoked from the tiarmclang command line, the tiarmclang compiler implicitly tells the linker where to find applicable runtime libraries like the C runtime library (libc.a).

    Thanks and regards,

    -George

  • Hello George,

    I added taking reference from SDK. But after removing those errors reduced and I could see below unresolved symbols.

    undefined first referenced
    symbol in file
    --------- ----------------
    __stack_chk_fail Stubs.a<startup_mspm0g351x_ticlang.c.obj>
    __stack_chk_guard Stubs.a<startup_mspm0g351x_ticlang.c.obj>

    Also i stubbed with dummy define for these functions to make compilation through. After that i tried to execute the main function and error is thrown for the below assembly code executed which is generated by compiler 

    before my code gets executed, while executing assembly code generated, the execution throws error since it tries to load invalid data for the marked instruction.

    Please provide your feedback for the above two points.

    Thanks and Regards,

    Naveen

  • Hi Naveen,

    According to your questions, I'll forward it to the Software Team, the reply will be updated here.

    Best Regards,
    Peter

  • Hello Team,

    Also need to understand why there is a new code addition inside a function, this was identified while checking using disassembly. Due to this the functionality is not properly executed.

    please provide feedback at the earliest.

    Regards,

    Naveen

  • Hi Naveen,

    Sorry, I still haven't received a response from the software team yet...,  I'll try to send email again to follow up on it.

    Best Regards,
    Peter