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.

TI-RTOS RAM CONCERTO

Hello,

I'm using Concerto M3 with TI-RTOS,

is there a way to put TI-RTOS on RAM to fast debug application ?

thankyou

  • Hi Mauro,

    When you import or create a TI-RTOS project a linker file (*.cmd) is included in the project files.  You can use this file to specify to have your code be in RAM.  Here is an example:

    MEMORY
    {
        BOOTROM (RX)    : origin = 0x0,        length = 0x10000
        FLASH_BOOT (RWX): origin = 0x200030,   length = 0x4
        FLASH (RWX)     : origin = 0x200034,   length = 0x7FF9C
    
        /* F28M35 Internal RAM */
        C03SRAM (RWX)   : origin = 0x20000000, length = 0x8000       /* 2k RAM */
        S07SHRAM (RWX)  : origin = 0x20008000, length = 0x10000   /* 64k RAM */
        CTOMMSGRAM (R)  : origin = 0x2007F000, length = 0x800
        MTOCMSGRAM (RW) : origin = 0x2007F800, length = 0x800
    }
    
    SECTIONS
    {
        /* All change sections to be stored in RAM instead of FLASH */
        /* Allocate program areas: */
        .text       : > S07SHRAM
        .binit      : > C03SRAM
        .cinit      : > C03SRAM
        .pinit      : > C03SRAM
    
        /* Initialized sections go in RAM */
        .const      : > C03SRAM
    
        /* Allocate uninitalized data sections: */
        .data       : > S07SHRAM
        .bss        : >> C03SRAM | S07SHRAM
        .dma        : > S07SHRAM
        .sysmem     : > C03SRAM
        .stack      : > S07SHRAM
        .cio        : > C03SRAM
        .neardata   : > C03SRAM
        .rodata     : > C03SRAM
        .args       : > C03SRAM
    }

    Hope this helps,

    -- Emmanuel

  • Mauro,

    I almost forgot, you need to modify your projects .cfg file to disable boot from FLASH.  Open the Boot module from the visual configuration page and un-check the following:

    If you are not using CCS add these to your .cfg:

    var Boot = xdc.useModule('ti.catalog.arm.cortexm3.concertoInit.Boot');
    Boot.bootFromFlash = false;
    Boot.configureFlashWaitStates = false;
    Boot.enableFlashProgramCache = false;
    Boot.enableFlashDataCache = false;

    Finally, you need to move your reset vectors to RAM instead of flash (Use the device specific Hwi module for this):

    Or in code:

    // Move resetVecs to RAM
    var Hwi_M3 = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
    Hwi_M3.resetVectorAddress = 536903680;

    Hope this helps,

    -- Emmanuel

  • thanks,

    it's a bit complicate respect what I've imaged

  • Hi Emmanuel,
    I suppose it will work the same way in Concerto C28, right?