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.

Code not running with CCS6 but runs fine with CCS5...

Other Parts Discussed in Thread: MSP430F5419A

Hi all,

I need your help with this one. I have a project that is running just fine with CCS5. WhenI try to run it in the debugger in CCS6, it does not seems to start. I can't step in main. The only difference I can see in related to the cmd file. 

Here is the cmd file from CCS5:

MEMORY
{
    SFR                     : origin = 0x0000, length = 0x0010
    PERIPHERALS_8BIT        : origin = 0x0010, length = 0x00F0
    PERIPHERALS_16BIT       : origin = 0x0100, length = 0x0100
    PASSWORD                : origin = 0x1C00, length = 0x0008
    BOOT_MAILBOX            : origin = 0x1C08, length = 0x0008
    RAM                     : origin = 0x1C10, length = 0x3F70
    //INFOABCD                : origin = 0x1800, length = 0x0200 This space should not be used in cmd file. It is reserved. Look for FICHE_BASE_ADD in FlashAdresses.h. */
    MY_INTVEC_RAM           : origin = 0x5B80, length = 0x80
    PLATFORM_INFO_0         : origin = 0x5C00, length = 0x2000
    PLATFORM_INFO_1         : origin = 0x7C00, length = 0x2000
    FIRMWARE_INTERRUPT_FCT  : origin = 0x9C00, length = 0x2000
    FLASH_BOOTLOADER        : origin = 0xBE00, length = 0x4000
    //FLASH_CHECKSUM        		: origin = 0x10000, length = 0x4
    FIRMWARE_VERSION          		: origin = 0x10004, length = 0x4
    FIRMWARE_COMPATIBILITY     		: origin = 0x10008, length = 0x4
    FIRMWARE_LAUNCH_COMPATIBILITY   : origin = 0x1000C, length = 0x4
	FIRMWARE_COMPONENT_ID			: origin = 0x10010, length = 0x4
    FIRMWARE_FLASH                  : origin = 0x10014, length = 0xFFEB

   INT00                   : origin = 0xBC00, length = 0x0002
    INT01                   : origin = 0xBC02, length = 0x0002
    INT02                   : origin = 0xBC04, length = 0x0002
    INT03                   : origin = 0xBC06, length = 0x0002
    INT04                   : origin = 0xBC08, length = 0x0002
    INT05                   : origin = 0xBC0A, length = 0x0002
    INT06                   : origin = 0xBC0C, length = 0x0002
    INT07                   : origin = 0xBC0E, length = 0x0002
    INT08                   : origin = 0xBC10, length = 0x0002
    INT09                   : origin = 0xBC12, length = 0x0002
    INT10                   : origin = 0xBC14, length = 0x0002
    INT11                   : origin = 0xBC16, length = 0x0002
    INT12                   : origin = 0xBC18, length = 0x0002
    INT13                   : origin = 0xBC1A, length = 0x0002
    INT14                   : origin = 0xBC1C, length = 0x0002
    INT15                   : origin = 0xBC1E, length = 0x0002
    INT16                   : origin = 0xBC20, length = 0x0002
    INT17                   : origin = 0xBC22, length = 0x0002
    INT18                   : origin = 0xBC24, length = 0x0002
    INT19                   : origin = 0xBC26, length = 0x0002
    INT20                   : origin = 0xBC28, length = 0x0002
    INT21                   : origin = 0xBC2A, length = 0x0002
    INT22                   : origin = 0xBC2C, length = 0x0002
    INT23                   : origin = 0xBC2E, length = 0x0002
    INT24                   : origin = 0xBC30, length = 0x0002
    INT25                   : origin = 0xBC32, length = 0x0002
    INT26                   : origin = 0xBC34, length = 0x0002
    INT27                   : origin = 0xBC36, length = 0x0002
    INT28                   : origin = 0xBC38, length = 0x0002
    INT29                   : origin = 0xBC3A, length = 0x0002
    INT30                   : origin = 0xBC3C, length = 0x0002
    INT31                   : origin = 0xBC3E, length = 0x0002
    INT32                   : origin = 0xBC40, length = 0x0002
    INT33                   : origin = 0xBC42, length = 0x0002
    INT34                   : origin = 0xBC44, length = 0x0002
    INT35                   : origin = 0xBC46, length = 0x0002
    INT36                   : origin = 0xBC48, length = 0x0002
    INT37                   : origin = 0xBC4A, length = 0x0002
    INT38                   : origin = 0xBC4C, length = 0x0002
    INT39                   : origin = 0xBC4E, length = 0x0002
    INT40                   : origin = 0xBC50, length = 0x0002
    INT41                   : origin = 0xBC52, length = 0x0002
    INT42                   : origin = 0xBC54, length = 0x0002
    INT43                   : origin = 0xBC56, length = 0x0002
    INT44                   : origin = 0xBC58, length = 0x0002
    INT45                   : origin = 0xBC5A, length = 0x0002
    INT46                   : origin = 0xBC5C, length = 0x0002
    INT47                   : origin = 0xBC5E, length = 0x0002
    INT48                   : origin = 0xBC60, length = 0x0002
    INT49                   : origin = 0xBC62, length = 0x0002
    INT50                   : origin = 0xBC64, length = 0x0002
    INT51                   : origin = 0xBC66, length = 0x0002
    INT52                   : origin = 0xBC68, length = 0x0002
    INT53                   : origin = 0xBC6A, length = 0x0002
    INT54                   : origin = 0xBC6C, length = 0x0002
    INT55                   : origin = 0xBC6E, length = 0x0002
    INT56                   : origin = 0xBC70, length = 0x0002
    INT57                   : origin = 0xBC72, length = 0x0002
    INT58                   : origin = 0xBC74, length = 0x0002
    INT59                   : origin = 0xBC76, length = 0x0002
    INT60                   : origin = 0xBC78, length = 0x0002
    INT61                   : origin = 0xBC7A, length = 0x0002
    INT62                   : origin = 0xBC7C, length = 0x0002
    //RESET                   : origin = 0xBC7E, length = 0x0002
    RESET                   : origin = 0xFFFE, length = 0x0002 //Skip bootloader
}

/****************************************************************************/
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY                              */
/****************************************************************************/

SECTIONS
{
	.data      : {} > RAM                /* GLOBAL & STATIC VARS              */
    .bss       : {} > RAM                /* GLOBAL & STATIC VARS              */
    .sysmem    : {} > RAM                /* DYNAMIC MEMORY ALLOCATION AREA    */
    .stack     : {} > RAM (HIGH)         /* SOFTWARE SYSTEM STACK             */

    .text      : {}>> FIRMWARE_FLASH              /* CODE                              */
    .text:_isr : {} > FIRMWARE_INTERRUPT_FCT              /* ISR CODE SPACE                    */
    .cinit     : {} > FIRMWARE_INTERRUPT_FCT              /* INITIALIZATION TABLES             */
    .const     : {} > FIRMWARE_FLASH              /* CONSTANT DATA                     */
    .cio       : {} > RAM                /* C I/O BUFFER                      */

    .pinit     : {} > FIRMWARE_INTERRUPT_FCT              /* C++ CONSTRUCTOR TABLES            */

    /* specific sections */
    .firmware_version:{} > FIRMWARE_VERSION
    .firmware_compatibility:{} > FIRMWARE_COMPATIBILITY
    .firmware_launch_compatibility:{} > FIRMWARE_LAUNCH_COMPATIBILITY
    .firmware_component_id:{} > FIRMWARE_COMPONENT_ID
    //.fiche:{} > INFOABCD	This space should not be used in cmd file. It is reserved. Look for FICHE_BASE_ADD in FlashAdresses.h. */
    .password:{} > PASSWORD
	.BootMailbox : {} > BOOT_MAILBOX     /* Mailbox used to exchange message between firmware and bootloader. */
    .my_intvec_ram:{} > MY_INTVEC_RAM
    .platform_info_0:{} > PLATFORM_INFO_0
    .platform_info_1:{} > PLATFORM_INFO_1

   .function_pointer:{} > FIRMWARE_INTERRUPT_FCT

    .int00   : {} > INT00                /* MSP430 INTERRUPT VECTORS          */
    .int01   : {} > INT01
    .int02   : {} > INT02
    .int03   : {} > INT03
    .int04   : {} > INT04
    .int05   : {} > INT05
    .int06   : {} > INT06
    .int07   : {} > INT07
    .int08   : {} > INT08
    .int09   : {} > INT09
    .int10   : {} > INT10
    .int11   : {} > INT11
    .int12   : {} > INT12
    .int13   : {} > INT13
    .int14   : {} > INT14
    .int15   : {} > INT15
    .int16   : {} > INT16
    .int17   : {} > INT17
    .int18   : {} > INT18
    .int19   : {} > INT19
    .int20   : {} > INT20
    .int21   : {} > INT21
    .int22   : {} > INT22
    .int23   : {} > INT23
    .int24   : {} > INT24
    .int25   : {} > INT25
    .int26   : {} > INT26
    .int27   : {} > INT27
    .int28   : {} > INT28
    .int29   : {} > INT29
    .int30   : {} > INT30
    .int31   : {} > INT31
    .int32   : {} > INT32
    .int33   : {} > INT33
    .int34   : {} > INT34
    .int35   : {} > INT35
    .int36   : {} > INT36
    .int37   : {} > INT37
    .int38   : {} > INT38
    .int39   : {} > INT39
    .int40   : {} > INT40
    .int41   : {} > INT41
    .int42   : {} > INT42
    .int43   : {} > INT43
    .int44   : {} > INT44
    .int45   : {} > INT45
    .int46   : {} > INT46
    .int47   : {} > INT47
    .int48   : {} > INT48
    .int49   : {} > INT49
    .int50   : {} > INT50
    .int51   : {} > INT51
    .int52   : {} > INT52
    .int53   : {} > INT53
    .int54   : {} > INT54
    .int55   : {} > INT55
    .int56   : {} > INT56
    .int57   : {} > INT57
    .int58   : {} > INT58
    .int59   : {} > INT59
    .int60   : {} > INT60
    .int61   : {} > INT61
    .int62   : {} > INT62
    .reset   : {} > RESET              /* MSP430 RESET VECTOR               */ 
}

And here is the cmd file used in CCS6:

MEMORY
{
    SFR                     : origin = 0x0000, length = 0x0010
    PERIPHERALS_8BIT        : origin = 0x0010, length = 0x00F0
    PERIPHERALS_16BIT       : origin = 0x0100, length = 0x0100
    PASSWORD                : origin = 0x1C00, length = 0x0008
    BOOT_MAILBOX            : origin = 0x1C08, length = 0x0008
    RAM                     : origin = 0x1C10, length = 0x3F70
    //INFOABCD                : origin = 0x1800, length = 0x0200 This space should not be used in cmd file. It is reserved. Look for FICHE_BASE_ADD in FlashAdresses.h. */
    MY_INTVEC_RAM           : origin = 0x5B80, length = 0x80
    PLATFORM_INFO_0         : origin = 0x5C00, length = 0x2000
    PLATFORM_INFO_1         : origin = 0x7C00, length = 0x2000
    FIRMWARE_INTERRUPT_FCT  : origin = 0x9C00, length = 0x2000
    FLASH_BOOTLOADER        : origin = 0xBE00, length = 0x4000
    //FLASH_CHECKSUM        		: origin = 0x10000, length = 0x4
    FIRMWARE_VERSION          		: origin = 0x10004, length = 0x4
    FIRMWARE_COMPATIBILITY     		: origin = 0x10008, length = 0x4
    FIRMWARE_LAUNCH_COMPATIBILITY   : origin = 0x1000C, length = 0x4
	FIRMWARE_COMPONENT_ID			: origin = 0x10010, length = 0x4
    FIRMWARE_FLASH                  : origin = 0x10014, length = 0xFFEB

    INT00                   : origin = 0xBC00, length = 0x0002
    INT01                   : origin = 0xBC02, length = 0x0002
    INT02                   : origin = 0xBC04, length = 0x0002
    INT03                   : origin = 0xBC06, length = 0x0002
    INT04                   : origin = 0xBC08, length = 0x0002
    INT05                   : origin = 0xBC0A, length = 0x0002
    INT06                   : origin = 0xBC0C, length = 0x0002
    INT07                   : origin = 0xBC0E, length = 0x0002
    INT08                   : origin = 0xBC10, length = 0x0002
    INT09                   : origin = 0xBC12, length = 0x0002
    INT10                   : origin = 0xBC14, length = 0x0002
    INT11                   : origin = 0xBC16, length = 0x0002
    INT12                   : origin = 0xBC18, length = 0x0002
    INT13                   : origin = 0xBC1A, length = 0x0002
    INT14                   : origin = 0xBC1C, length = 0x0002
    INT15                   : origin = 0xBC1E, length = 0x0002
    INT16                   : origin = 0xBC20, length = 0x0002
    INT17                   : origin = 0xBC22, length = 0x0002
    INT18                   : origin = 0xBC24, length = 0x0002
    INT19                   : origin = 0xBC26, length = 0x0002
    INT20                   : origin = 0xBC28, length = 0x0002
    INT21                   : origin = 0xBC2A, length = 0x0002
    INT22                   : origin = 0xBC2C, length = 0x0002
    INT23                   : origin = 0xBC2E, length = 0x0002
    INT24                   : origin = 0xBC30, length = 0x0002
    INT25                   : origin = 0xBC32, length = 0x0002
    INT26                   : origin = 0xBC34, length = 0x0002
    INT27                   : origin = 0xBC36, length = 0x0002
    INT28                   : origin = 0xBC38, length = 0x0002
    INT29                   : origin = 0xBC3A, length = 0x0002
    INT30                   : origin = 0xBC3C, length = 0x0002
    INT31                   : origin = 0xBC3E, length = 0x0002
    INT32                   : origin = 0xBC40, length = 0x0002
    INT33                   : origin = 0xBC42, length = 0x0002
    INT34                   : origin = 0xBC44, length = 0x0002
    INT35                   : origin = 0xBC46, length = 0x0002
    INT36                   : origin = 0xBC48, length = 0x0002
    INT37                   : origin = 0xBC4A, length = 0x0002
    INT38                   : origin = 0xBC4C, length = 0x0002
    INT39                   : origin = 0xBC4E, length = 0x0002
    INT40                   : origin = 0xBC50, length = 0x0002
    INT41                   : origin = 0xBC52, length = 0x0002
    INT42                   : origin = 0xBC54, length = 0x0002
    INT43                   : origin = 0xBC56, length = 0x0002
    INT44                   : origin = 0xBC58, length = 0x0002
    INT45                   : origin = 0xBC5A, length = 0x0002
    INT46                   : origin = 0xBC5C, length = 0x0002
    INT47                   : origin = 0xBC5E, length = 0x0002
    INT48                   : origin = 0xBC60, length = 0x0002
    INT49                   : origin = 0xBC62, length = 0x0002
    INT50                   : origin = 0xBC64, length = 0x0002
    INT51                   : origin = 0xBC66, length = 0x0002
    INT52                   : origin = 0xBC68, length = 0x0002
    INT53                   : origin = 0xBC6A, length = 0x0002
    INT54                   : origin = 0xBC6C, length = 0x0002
    INT55                   : origin = 0xBC6E, length = 0x0002
    INT56                   : origin = 0xBC70, length = 0x0002
    INT57                   : origin = 0xBC72, length = 0x0002
    INT58                   : origin = 0xBC74, length = 0x0002
    INT59                   : origin = 0xBC76, length = 0x0002
    INT60                   : origin = 0xBC78, length = 0x0002
    INT61                   : origin = 0xBC7A, length = 0x0002
    INT62                   : origin = 0xBC7C, length = 0x0002
    //RESET                   : origin = 0xBC7E, length = 0x0002
    RESET                   : origin = 0xFFFE, length = 0x0002 //Skip bootloader
}

/****************************************************************************/
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY                              */
/****************************************************************************/

SECTIONS
{
	.data      : {} > RAM                /* GLOBAL & STATIC VARS              */
    .bss       : {} > RAM                /* GLOBAL & STATIC VARS              */
    .sysmem    : {} > RAM                /* DYNAMIC MEMORY ALLOCATION AREA    */
    .stack     : {} > RAM (HIGH)         /* SOFTWARE SYSTEM STACK             */

    .text      : {}>> FIRMWARE_FLASH              /* CODE                              */
    .text:_isr : {} > FIRMWARE_INTERRUPT_FCT              /* ISR CODE SPACE                    */
    .cinit     : {} > FIRMWARE_INTERRUPT_FCT              /* INITIALIZATION TABLES             */
    .const     : {} > FIRMWARE_FLASH              /* CONSTANT DATA                     */
    .cio       : {} > RAM                /* C I/O BUFFER                      */

    .pinit     : {} > FIRMWARE_INTERRUPT_FCT              /* C++ CONSTRUCTOR TABLES            */

    /* specific sections */
    .firmware_version:{} > FIRMWARE_VERSION
    .firmware_compatibility:{} > FIRMWARE_COMPATIBILITY
    .firmware_launch_compatibility:{} > FIRMWARE_LAUNCH_COMPATIBILITY
    .firmware_component_id:{} > FIRMWARE_COMPONENT_ID
    //.fiche:{} > INFOABCD	This space should not be used in cmd file. It is reserved. Look for FICHE_BASE_ADD in FlashAdresses.h. */
    .password:{} > PASSWORD
	.BootMailbox : {} > BOOT_MAILBOX     /* Mailbox used to exchange message between firmware and bootloader. */
    .my_intvec_ram:{} > MY_INTVEC_RAM
    .platform_info_0:{} > PLATFORM_INFO_0
    .platform_info_1:{} > PLATFORM_INFO_1

   .function_pointer:{} > FIRMWARE_INTERRUPT_FCT

    /* MSP430 Interrupt vectors          */
    .int00       : {}               > INT00
    .int01       : {}               > INT01
    .int02       : {}               > INT02
    .int03       : {}               > INT03
    .int04       : {}               > INT04
    .int05       : {}               > INT05
    .int06       : {}               > INT06
    .int07       : {}               > INT07
    .int08       : {}               > INT08
    .int09       : {}               > INT09
    .int10       : {}               > INT10
    .int11       : {}               > INT11
    .int12       : {}               > INT12
    .int13       : {}               > INT13
    .int14       : {}               > INT14
    .int15       : {}               > INT15
    .int16       : {}               > INT16
    .int17       : {}               > INT17
    .int18       : {}               > INT18
    .int19       : {}               > INT19
    .int20       : {}               > INT20
    .int21       : {}               > INT21
    .int22       : {}               > INT22
    .int23       : {}               > INT23
    .int24       : {}               > INT24
    .int25       : {}               > INT25
    .int26       : {}               > INT26
    .int27       : {}               > INT27
    .int28       : {}               > INT28
    .int29       : {}               > INT29
    .int30       : {}               > INT30
    .int31       : {}               > INT31
    .int32       : {}               > INT32
    .int33       : {}               > INT33
    .int34       : {}               > INT34
    .int35       : {}               > INT35
    .int36       : {}               > INT36
    .int37       : {}               > INT37
    .int38       : {}               > INT38
    .int39       : {}               > INT39
    .int40       : {}               > INT40
    RTC          : { * ( .int41 ) } > INT41 type = VECT_INIT
    PORT2        : { * ( .int42 ) } > INT42 type = VECT_INIT
    USCI_B3      : { * ( .int43 ) } > INT43 type = VECT_INIT
    USCI_A3      : { * ( .int44 ) } > INT44 type = VECT_INIT
    USCI_B1      : { * ( .int45 ) } > INT45 type = VECT_INIT
    USCI_A1      : { * ( .int46 ) } > INT46 type = VECT_INIT
    PORT1        : { * ( .int47 ) } > INT47 type = VECT_INIT
    TIMER1_A1    : { * ( .int48 ) } > INT48 type = VECT_INIT
    TIMER1_A0    : { * ( .int49 ) } > INT49 type = VECT_INIT
    DMA          : { * ( .int50 ) } > INT50 type = VECT_INIT
    USCI_B2      : { * ( .int51 ) } > INT51 type = VECT_INIT
    USCI_A2      : { * ( .int52 ) } > INT52 type = VECT_INIT
    TIMER0_A1    : { * ( .int53 ) } > INT53 type = VECT_INIT
    TIMER0_A0    : { * ( .int54 ) } > INT54 type = VECT_INIT
    ADC12        : { * ( .int55 ) } > INT55 type = VECT_INIT
    USCI_B0      : { * ( .int56 ) } > INT56 type = VECT_INIT
    USCI_A0      : { * ( .int57 ) } > INT57 type = VECT_INIT
    WDT          : { * ( .int58 ) } > INT58 type = VECT_INIT
    TIMER0_B1    : { * ( .int59 ) } > INT59 type = VECT_INIT
    TIMER0_B0    : { * ( .int60 ) } > INT60 type = VECT_INIT
    UNMI         : { * ( .int61 ) } > INT61 type = VECT_INIT
    SYSNMI       : { * ( .int62 ) } > INT62 type = VECT_INIT
    .reset   	 : {} > RESET              /* MSP430 RESET VECTOR               */ 
}

The difference is in the SECTIONS section related to definition of interrupts. Maybe it is the reason? 

Also, in CCS5, I have the output format set to Legacy COFF but in CCS6 it is set to eabi (ELF).

Maybe it might explain why it is not running?

Any advice on what could cause the code to not run in CCS6? I'm not sure which info to provide you to get good help...

Thanks

David

  • I forgot to mention. The compiler version in CCS6 is TI v15.12.1.LTS
  • David Mercier said:
    I forgot to mention. The compiler version in CCS6 is TI v15.12.1.LTS

    The TI v15.x series of compilers have removed support for Legacy COFF, which is why CCS 6 with TI v15.12.1.LTS the output format was set to eabi (ELF). Changing from legacy COFF to eabi (ELF) for MSP430 programs may cause the following issues for project:

    1) In eabi (ELF) the .bss segment is zero-initialized by the C run-time library startup, which may mean the WDT fires during C startup code

    2) In legacy COFF double is 32-bits, and in abi (ELF) double is 64-bits. If a program uses any implicit or explicit double calculations that can increases the code and data memory usage.

    If you won't want to have to modify the project to work with the eabi (ELF) output format, you should be able to install the same compiler version in CCS 6 as was used in CCS 5 - see http://processors.wiki.ti.com/index.php/Compiler_Updates#Install_new_features and http://processors.wiki.ti.com/index.php/Updating_CCSv6#Installing_new_software

  • Thanks a lot for the info, I'm going to give it a try.
    I don't think double calculation is a problem, but .bss segment to zero could be my issue.
    I'll keep you posted!
  • Unfortunately, it did not help.

    1. I did validated that watchdog is on hold during cinit auto-initialization. The option was already ON.
    2. I validated that I'm not bumping any boundaries in FLASH and RAM... The Memory Allocation window provide good help on that. Everything seems OK.
    3. I removed any call to driverlib to prevent any oversized functions...
    4. I changed Silicon version from mspx to msp... I think the MSP430F5419A does supports mspx, but it was worth trying... It's now back to mspx.
    5. The heap and stack size is set to 2048. Could it be the reason?

    The code is still not hitting main function... any help is welcome!

    Thanks.

    David
  • David Mercier said:
    The code is still not hitting main function... any help is welcome!

    Since you mentioned changes to linker command files, do you get any warnings from the linker of the form "Warning: creating output section "xxx" without a SECTIONS specification"?

    Such warnings are a sign the program may fail at run time, e.g. the linker may have defaulted to placing some variables in peripheral address space rather than RAM!

    If you want to try and determine why the program is not reaching main, under the CCS project properties -> Debug -> Auto Run and Launch Options -> Auto Run Options untick the options to run to main for either "On a program load or restart" or "On a reset". When you start a debugging session the program will be halted at the reset vector, and you can single step through the run time library start-up code to find at which point the program fails.

  • David Mercier said:
    I have a project that is running just fine with CCS5. WhenI try to run it in the debugger in CCS6, it does not seems to start.

    If you don't need to change the project in CCS 6, one option would be start a Manual launch of the debugger in CCS 6 and then download and debug the program which was built in CCS 5.

  • Thanks for the suggestion.

    Using your tips, the program started at 0x5c00, which according to my cmd file is PLATFORM_INFO_0.

    I end up stepping in disassembly since there is no symbols for that. My understanding is that it's not right to step there at startup. Am I right?

    MEMORY
    {
        SFR                     : origin = 0x0000, length = 0x0010
        PERIPHERALS_8BIT        : origin = 0x0010, length = 0x00F0
        PERIPHERALS_16BIT       : origin = 0x0100, length = 0x0100
        PASSWORD                : origin = 0x1C00, length = 0x0008
        BOOT_MAILBOX            : origin = 0x1C08, length = 0x0008
        RAM                     : origin = 0x1C10, length = 0x3F70
        //INFOABCD                : origin = 0x1800, length = 0x0200 This space should not be used in cmd file. It is reserved. Look for FICHE_BASE_ADD in FlashAdresses.h. */
        MY_INTVEC_RAM           : origin = 0x5B80, length = 0x80
        PLATFORM_INFO_0         : origin = 0x5C00, length = 0x2000
        PLATFORM_INFO_1         : origin = 0x7C00, length = 0x2000

  • David Mercier said:
    My understanding is that it's not right to step there at startup. Am I right?

    The address 0x5c00 is the lowest flash address in a MSP430F5419A, and so based upon your linker command file agree that is not correct - the run time library entry point in the .text:_isr section should be in the FIRMWARE_INTERRUPT_FCT memory region from 0x9C00 to 0xBBFF.

    Can you check the linker .map file to ensure the linker is using the memory regions in the linker command file?

  • In the cmd file, I have:

    FIRMWARE_INTERRUPT_FCT  : origin = 0x9C00, length = 0x2000 // so from 0x9c00 to 0xbc00
    .text:_isr : {} > FIRMWARE_INTERRUPT_FCT              /* ISR CODE SPACE                    */
    .cinit     : {} > FIRMWARE_INTERRUPT_FCT              /* INITIALIZATION TABLES             */
    .pinit     : {} > FIRMWARE_INTERRUPT_FCT              /* C++ CONSTRUCTOR TABLES            */
    .function_pointer:{} > FIRMWARE_INTERRUPT_FCT

    (note that pinit is in cmd file and not in map file, I guess it's because I don't have any c++ code...)

    In map file, I find the following:

    .text:_isr 
    *          0    0000a112    0000049a     
                      0000a112    00000110     I2C.obj (.text:_isr:USCI_B0_ISR)
                      0000a222    00000106     Timer.obj (.text:_isr:TIMER0_A0_ISR)
                      0000a328    00000106     I2C.obj (.text:_isr:USCI_B1_ISR)
                      0000a42e    00000106     I2C.obj (.text:_isr:USCI_B2_ISR)
                      0000a534    0000001e     SupervisionMx3.obj (.text:_isr:ADC12ISR)
                      0000a552    0000001a     rts430x_lc_rd_eabi.lib : boot_special.obj (.text:_isr:_c_int00_noargs_noexit)
                      0000a56c    00000014     SerialCommunication.obj (.text:_isr:USCI0_COMX_ISR)
                      0000a580    00000014     SerialCommunication.obj (.text:_isr:USCI2_COMX_ISR)
                      0000a594    00000010     SystemBuilder.obj (.text:_isr:TIMER0_B0_ISR)
                      0000a5a4    00000008     rts430x_lc_rd_eabi.lib : isr_trap.obj (.text:_isr:__TI_ISR_TRAP)
    
    .cinit     0    0000a5ac    000000c0     
                      0000a5ac    00000066     (.cinit..data.load) [load image, compression = rle]
                      0000a612    0000000b     (.cinit..bss.load) [load image, compression = rle]
                      0000a61d    00000001     --HOLE-- [fill = 0]
                      0000a61e    00000009     (.cinit..BootMailbox.load) [load image, compression = rle]
                      0000a627    00000001     --HOLE-- [fill = 0]
                      0000a628    00000009     (.cinit..my_intvec_ram.load) [load image, compression = rle]
                      0000a631    00000001     --HOLE-- [fill = 0]
                      0000a632    00000009     (.cinit..password.load) [load image, compression = rle]
                      0000a63b    00000001     --HOLE-- [fill = 0]
                      0000a63c    00000008     (__TI_handler_table)
                      0000a644    00000028     (__TI_cinit_table)
    
    .function_pointer 
    *          0    00009c00    00000512     
                      00009c00    000000d8     PowerSequencerMx3.obj (.function_pointer:PWR_SEQ_MX3_Off)
                      00009cd8    000000d6     PowerSequencerMx3.obj (.function_pointer:PWR_SEQ_MX3_On)
                      00009dae    000000b4     PowerModeMx3OFF.obj (.function_pointer:PWR_MODE_OFF_MX3_Process)
                      00009e62    000000b4     PowerModeMx3ON.obj (.function_pointer:PWR_MODE_ON_MX3_Process)
                      00009f16    00000058     PowerModeMx3OFF.obj (.function_pointer:PWR_MODE_OFF_SetDeviceState)
                      00009f6e    00000058     PowerModeMx3ON.obj (.function_pointer:PWR_MODE_ON_SetDeviceState)
                      00009fc6    0000004c     PowerModeMx3OFF.obj (.function_pointer:PWR_MODE_OFF_ValidateSwitchDeviceOnOff)
                      0000a012    0000004c     PowerModeMx3ON.obj (.function_pointer:PWR_MODE_ON_ValidateSwitchDeviceOnOff)
                      0000a05e    0000003c     PowerModeMx3OFF.obj (.function_pointer:PWR_MODE_OFF_GetDeviceState)
                      0000a09a    0000003c     PowerModeMx3ON.obj (.function_pointer:PWR_MODE_ON_GetDeviceState)
                      0000a0d6    0000001e     PowerModeMx3OFF.obj (.function_pointer:PWR_MODE_OFF_MX3_GetId)
                      0000a0f4    0000001e     PowerModeMx3ON.obj (.function_pointer:PWR_MODE_ON_MX3_GetId)

    All sections are inside the desired area. They are not in the expected order, but they are in the good area.

    I'm looking at the entire file and it seems ok to me up to now.

  • David Mercier said:
    0000a552 0000001a rts430x_lc_rd_eabi.lib : boot_special.obj

    That is the entry point for the C run time library, and so when you start debugging without auto to main enabled I would expect the initial program counter to be 0xa552 and not the 0x5c00 value you found.

    Can you post the complete map file, .out file and/or build output from the CCS console?

  • Yes, I'm going to post it. But you know what... I'm suspecting my code to not beging uploaded... I've just uploaded a simple blinking LED program and then I try to debug my "not working" program. The debugger indicates me it's running (but not stepping in main like always), but the LED is still blinking... which is not the case in this program.

    The Erase Options seems right to me (Erase main memory only).
    Is there another option to look at to make sure my program is being written to the flash?
  • Well... I successfully stepped into my code and it seems to work...... when it is uploaded.
    I don't understand why, but CCS does not upload my code into the MCU when I start a debug session.
    To have it uploaded, I have to select "Run/Load/Load Program" and then it gets uploaded....

    Any idea how to change that annoying behavior?

    By the way, thank you very much for your help/efforts. It is greatly appreciated.
  • I finally found it...
    Under "Run/Debug Configuration"
    I selected my program configuration, then the tab named "Program".
    I dont' know why, but the "Load symbols only" was selected. I changed it to "Load Program" and now it works.

    That is a mistery how this value got changed... Anyway, thanks for your help!