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.

Migrate from 5.3.0 to 6.1.0 : User asm file are not used

Other Parts Discussed in Thread: CC430F5137

Hi,

I have an issue with the compiler used in 6.1.0. The compiler versions are TI 4.4.3 (6.1.0), and TI 4.1.2 (5.3.0).

My project contains a asm file that defined a section with some function addresses at a specific memory address.

The section is defined in link cmd file like this :

MEMORY
{
/* [...] */
BLSERVICES                   : origin = 0xFF74, length = 0x000C

/* [...] */
}

SECTIONS
{
    .services      : {} > BLSERVICES

/* [...] */
}

My asm contains : 

 .cdecls C, LIST, "bl_services.h"
 .ref _c_int00
 .ref bl_run
;------------------------------------------------------------
 .sect ".services"
;------------------------------------------------------------
BSL_entry_JMP:
    BR    #_c_int00
    BR    #bl_run
    JMP   $ ; Reserved
    JMP   $ ; Reserved

So my problem is with the compiler 4.4.3, the memory section is empty when I read it after programming, but with the compiler 4.1.2, memory is filled with correct addresses.

In output log and in output folder, I can see object file of my asm file. The target of my project is a CC430F5137.

Someone has or had a similar problem ? how can i resolved it ?

Thanks a lot

  • ExoticJacquot said:
    So my problem is with the compiler 4.4.3, the memory section is empty when I read it after programming, but with the compiler 4.1.2, memory is filled with correct addresses.

    Can you compare the build log of the build with compiler 4.4.3 and 4.1.2 to check if the output formats are different for the two builds? Or you can compare the "Output format" setting under Project Properties->General. If the build with 4.1.2 has the Legacy COFF option and the 4.4.3 build has eabi(ELF) option, then that would explain the difference in behavior. 

    The default behavior of the linker in EABI mode is to remove sections that are not referenced. If this is indeed what is happening, then you would need to explicitly retain that section. You can do so by using the .retain directive in the assembly code or --retain linker option. The MSP430 Assembly Language Tools Users Guide has more information on this.

    Also please see this wiki page for more details on conditional linking and retaining sections (although written for C6000 it applies equally to MSP430 as well): 
    http://processors.wiki.ti.com/index.php/C6000_EABI_Migration#Conditional_Linking_Feature

    Please let us know if this explains the reason for the difference.

  • Thanks for your reply, my section was not retain ...
    In CCS, I just add --retain=".services" to link command.