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.

MSP430FR5964: Error "Undefined symbol" in linker command file

Genius 5340 points
Part Number: MSP430FR5964

Hi experts,

My customer is evaluating the MSP430FR5964. When they add a symbol for external reference in the linker command file and build with reference from C source file (inline assembler), they sometimes get an error (Undefined symbol).

Could you tell me the conditions under which it becomes an error and how to avoid it?

"Details".
The following is an excerpt of the problematic part of lnk_msp430fr5964.cmd.

MEMORY
{
    FRAM_BOOT               : origin = 0x4000, length = 0x4000
    FRAM_MAIN               : origin = 0x8000, length = 0x7F80
{

/* Export define */
__BootFirm_start__ = start(FRAM_BOOT);
__MainFirm_start__ = start(FRAM_MAIN);
__FramMainFirm__   = start(FRAM_MAIN);

They are divided into "main.c" for the main program and "boot.c" for the custom boot program. When they check the contents of "boot.asm", they find that ".global __MainFirm_start__" has been created, but ".global __FramMainFirm __" was not created.

We have confirmed that the reserved words in the following manual do not apply.
slau131y.pdf (MSP430 Assembly Language Tools v21.6.0.LTS User's Guide (Rev.Y)):8.5.1 Reserved Names in Linker Command Files

If there is anything else that needs to be checked or information that is missing, please let me know.

Best regards,
O.H

  • Hello,

    I was not able to replicate the error using CCS v10.3. I imported a simple FR5964 code example from TI Resource Explorer, added the excerpt to the .cmd file and built the CCS project. Note that I also updated any references to FRAM to FRAM_BOOT to prevent other errors. Then, I checked the .map file and noticed __FramMainFirm__ was located at 0x8000 which is correct. See the snippet below from the .map file.

    0000015c  WDTCTL_L              
    00004000  __BootFirm_start__    
    00008000  __FramMainFirm__      
    00008000  __MainFirm_start__    
    00003c00  __STACK_END           

    I'm not sure what to recommend, since I can't replicate the issue. If they're working on a custom bootloader, why don't they use MSPFRBOOT?

  • Hello,

    It seems that there was a problem with the symbol definition in the c file on the customer side, and after fixing it, the build succeeded without any problems.

    I'm sorry for the trouble. It would be helpful if you could close the thread.

    Best regards,
    O.H

**Attention** This is a public forum