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.

TMS570LC4357: Arm-based microcontrollers forum

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

您好!
    我最近在用TMS570LC4357这款芯片的开发板,HALCoGen自动生成的CMD文件是FLASH运行的,每次调试都需要擦写FLASH,太慢了。
    我需要像C2000的DSP那样(TI提供了RAM模式的CMD),可以在RAM模式下调试,由于没有找到570的现成的RAM 模式CMD,所以我自行修改了FLASH模式的CMD,虽然编译不报错,但是也没有实现在RAM上调试这个目标。
    修改前的CMD如下:
//起始地址是0000 0000,FLASH的首地址
MEMORY
{
    VECTORS (X)  : origin=0x00000000 length=0x00000020
    FLASH0  (RX) : origin=0x00000020 length=0x001FFFE0
    FLASH1  (RX) : origin=0x00200000 length=0x00200000
    STACKS  (RW) : origin=0x08000000 length=0x00001500
    RAM     (RW) : origin=0x08001500 length=0x0007EB00
}
SECTIONS
{
    .intvecs : {} > VECTORS
    .text   align(32) : {} > FLASH0 | FLASH1
    .const  align(32) : {} > FLASH0 | FLASH1
    .cinit  align(32) : {} > FLASH0 | FLASH1
    .pinit  align(32) : {} > FLASH0 | FLASH1
    .bss     : {} > RAM
    .data    : {} > RAM
    .sysmem  : {} > RAM
}
    修改后的CMD如下:
//起始地址是0800 0000,RAM的首地址
    MEMORY
{
    VECTORS (X)  : origin=0x08000000 length=0x00000020
    FLASH0  (RX) : origin=0x08000020 length=0x00008000
    FLASH1  (RX) : origin=0x08008020 length=0x00009000
    STACKS  (RW) : origin=0x08011020 length=0x00009000
    RAM     (RW) : origin=0x0801A020 length=0x00064FE0
}
SECTIONS
{
    .intvecs : {} > VECTORS
    .text   align(32) : {} > FLASH0 | FLASH1
    .const  align(32) : {} > FLASH0 | FLASH1
    .cinit  align(32) : {} > FLASH0 | FLASH1
    .pinit  align(32) : {} > FLASH0 | FLASH1
    .bss     : {} > RAM
    .data    : {} > RAM
    .sysmem  : {} > RAM
/*.TI.ramfunc   : {} > RAM*/
}
请帮忙指导下,570是否支持RAM模式debug,如果支持,应该如何正确修改CMD?如何将FLASH和RAM的地址映射上呢?
谢谢!
  • Hello!

    I have been using the development board of TMS570LC4357 recently, and the CMD file automatically generated by HALCoGen is for debugging on the FLASH mode. Every time I debug, I need to rewrite FLASH, which is too slow.

    I need a CMD file for debugging on the RAM mode. However, I did not find it, so I'm trying to modify the FLASH mode CMD file. Although there were no compilation errors, I did not achieve the goal of debugging on the RAM mode.

    The CMD before modification is as follows:

    //The FLASH starting address is 0x0000 0000

    MEMORY
    {
        VECTORS (X)  : origin=0x00000000 length=0x00000020
        FLASH0  (RX) : origin=0x00000020 length=0x001FFFE0
        FLASH1  (RX) : origin=0x00200000 length=0x00200000
        STACKS  (RW) : origin=0x08000000 length=0x00001500
        RAM     (RW) : origin=0x08001500 length=0x0007EB00
    }
    SECTIONS
    {
        .intvecs : {} > VECTORS
        .text   align(32) : {} > FLASH0 | FLASH1
        .const  align(32) : {} > FLASH0 | FLASH1
        .cinit  align(32) : {} > FLASH0 | FLASH1
        .pinit  align(32) : {} > FLASH0 | FLASH1
        .bss     : {} > RAM
        .data    : {} > RAM
        .sysmem  : {} > RAM
    }
    The CMD after modification is as follows:
    //The RAM starting address is 0x0800 0000
        MEMORY
    {
        VECTORS (X)  : origin=0x08000000 length=0x00000020
        FLASH0  (RX) : origin=0x08000020 length=0x00008000
        FLASH1  (RX) : origin=0x08008020 length=0x00009000
        STACKS  (RW) : origin=0x08011020 length=0x00009000
        RAM     (RW) : origin=0x0801A020 length=0x00064FE0
    }
    SECTIONS
    {
        .intvecs : {} > VECTORS
        .text   align(32) : {} > FLASH0 | FLASH1
        .const  align(32) : {} > FLASH0 | FLASH1
        .cinit  align(32) : {} > FLASH0 | FLASH1
        .pinit  align(32) : {} > FLASH0 | FLASH1
        .bss     : {} > RAM
        .data    : {} > RAM
        .sysmem  : {} > RAM
    /*.TI.ramfunc   : {} > RAM*/
    }
    Could you please provide guidance on whether the 570 supports RAM mode debugging? If so, how should I modify the CMD correctly? How to map the addresses of FLASH and RAM?
    Thanks!
  • Hi,

    I started working on your issue and will try to provide an update ASAP.

    --

    Thanks & regards,
    Jagadish.

  • Hi Jiangbo,

    The TMS570 and RM4x/5x MCUs do allow you to remap Flash and on-chip SRAM, so what you are looking for is supported. This way you can develop smaller code routines to test specific functions and features without having to reprogram the Flash for every code change you make.

    The changes in linker cmd file:

    1: Memory:

     change stack to a memory range in Flash

    2. Section:

       map .bss, .data, .sysmem to FLASH0

    Changes in sys_core.asm:

    After the target is connected, enable "CC_MemoryMap_RAM_at_0x00" in CCS-->scripts->TMS570LC43x Memory Map setup 

    Open the memory map window, make sure that memory range 0x0~0x7FFFF is RAM

    Then load the out file to flash.

    Note that you must avoid all on-chip SRAM testing or initialization when using this method.