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.

Concerto M3 seems have problem with watchdog timer or CMD file, it stuck in the code before main()

I use CCS 6.1.1 to develop my concerto device F25M35. One day I added some IPC messageQ code into my existing program some strange things occured. 

The project build successfully with no errors and warnings. But when I load it with XDS100V3 debugger. The CCS's run and stop button shows gray and the program never get to main(). Then I set change the debug configuration to something 'not run to main at program load or reset'. Then I step in the assembly code. I find that when I get to the ti_catalog_arm_cortexm3_concertoInit_Boot_initSharedRAMs(); the procedure fails.

Here is my configuration.



And here is where the program fails.

So I thought there maybe something wrong with my CMD file. Here is my CMD file. I have modified the shared memory.

MEMORY
{
    BOOTROM (RX)    : origin = 0x0,        length = 0x10000
    FLASH_BOOT (RWX): origin = 0x200030,   length = 0x4
    FLASH (RWX)     : origin = 0x200034,   length = 0x7FF9C
    C03SRAM (RWX)   : origin = 0x20000000, length = 0x08000
    S03SHRAM (RWX)  : origin = 0x20008000, length = 0x08000
    S47SHRAM (RWX)  : origin = 0x20010000, length = 0x08000
    CTOMMSGRAM (R)  : origin = 0x2007F000, length = 0x800
    MTOCMSGRAM (RW) : origin = 0x2007F800, length = 0x800
}

SECTIONS
{
    /* Allocate program areas: */
    .text       : > FLASH
    .binit      : > FLASH
    .cinit      : > FLASHwhe
    .pinit      : > FLASH
    .init_array : > FLASH
    .intvecs    : > FLASH
    .resetisr   : > FLASH
    .vtable     : > FLASH
    /* Initialized sections go in Flash */
    .const      : > FLASH

    /* Allocate uninitalized data sections: */

    .data       : > C03SRAM
    .bss        : >> C03SRAM | S47SHRAM
    .dma        : > C03SRAM
    .sysmem     : > C03SRAM
    .stack      : > C03SRAM
    .cio        : > C03SRAM
    .neardata   : > C03SRAM
    .rodata     : > C03SRAM
    .args       : > C03SRAM

    GROUP : > MTOCMSGRAM
    {
        PUTBUFFER
        PUTWRITEIDX
        GETREADIDX
    }

    GROUP : > CTOMMSGRAM
    {
        GETBUFFER : TYPE = DSECT
        GETWRITEIDX : TYPE = DSECT
        PUTREADIDX : TYPE = DSECT
    }

}

__STACK_TOP = __stack + 256;

Here is my memory allocation. I got to much .bss section.


Could anyone tell me how could I solve this problem?

Regards.

  • Hleib,

    Looking at your linker command file, it seems that you have split the shared memory into two parts (S03SHRAM, S47SHRAM). In addition, you have placed the .bss section into C03SRAM with the overflow going to S47SHRAM. Have I got this correct?

    Looking at the Boot_initSharedRAMs() function, it seems to be setting access permission on the shared memory. I believe that it operates on the entire 64KB of shared memory and does not know that you have taken half of the memory for your M3 executable. This is probably a hardware limitation. My guess is that the shard memory is being cleared which will overwrite some of your .bss data.

    I suggest you restore the shared memory configuration and make your .bss data fit into the C03SRAM segment.

    ~Ramsey