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.

CCS/TMS570LS3137: tms570ls3137 on chip bootloader

Part Number: TMS570LS3137

Tool/software: Code Composer Studio

1、spnu118t figure3-1 said that after power on ,there is a  "on chip bootloader" before c_int00,  for  tms570ls3137 is there a "on chip bootloader" ?

     which doc can i check for this? cause i think this is helpfull for the next question

2、for the .map as below for example

run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
00000000 00000000 00000040 00000040 r-x
00000000 00000000 00000040 00000040 r-x .intvecs
00001560 00001560 00031920 00031920 r-x
00001560 00001560 00030a80 00030a80 r-x .text
00031fe0 00031fe0 000007c0 000007c0 r-- .const
000327a0 000327a0 000006a0 000006a0 r-- .cinit
00032e40 00032e40 00000020 00000020 r-- .binit
00032e60 00032e60 00000020 00000020 r-- .ovly
08008000 08008000 00018c68 00000000 rw-
08008000 08008000 00018c68 00000000 rw- .bss
08020c68 00000040 0000105c 0000105c r-x
08020c68 00000040 0000105c 0000105c r-x flashAPI
08021cc8 08021cc8 00000660 00000000 rw-
08021cc8 08021cc8 00000660 00000000 rw- .data
08022340 00001540 00000020 00000020 r-x
08022340 00001540 00000020 00000020 r-x .TI.ramfunc
0803ffc0 00001500 00000028 00000028 r-x
0803ffc0 00001500 00000028 00000028 r-x ramIntvecs

 section .bss and .data is located in ram,how to understand? after power off,nothing left in ram.

so there must be some mechanism copy the data and bss from flash to ram?

and i also want to know when the ccs debug the proj, it just programm the flash ,or both the flash and the ram ?

  • Hello Guodong,

    For your first question:

    guodong yao said:

    1、spnu118t figure3-1 said that after power on ,there is a  "on chip bootloader" before c_int00,  for  tms570ls3137 is there a "on chip bootloader" ?

         which doc can i check for this? cause i think this is helpfull for the next question

    SPNU118t is a generic document referring to our tools that support ARM CPUs. This includes many different product lines and many different ARM cores ( including but not limited to ARM7TDMA, Corrtex M0/M3/M4, Cortex R4/R5, ARM A8/9 and others.) In some cases the product lines support on chip boot loaders and others they do not. For the Hercules line of MCUs we do not have an on chip boot loader.

    As far as documentation is concerned, we do not include a boot loader reference in any of our documents since we do not support this feature through hardware.

    For Hercules, if your product is in need of a boot loader, you must implement one in Flash on the device. We have several examples of such an implementation with SPI, SCI, or CAN used as the communication methodologies. These examples are described in application notes linked below:

    guodong yao said:

    2、for the .map as below for example

    run origin load origin length init length attrs members
    ---------- ----------- ---------- ----------- ----- -------
    00000000 00000000 00000040 00000040 r-x
    00000000 00000000 00000040 00000040 r-x .intvecs
    00001560 00001560 00031920 00031920 r-x
    00001560 00001560 00030a80 00030a80 r-x .text
    00031fe0 00031fe0 000007c0 000007c0 r-- .const
    000327a0 000327a0 000006a0 000006a0 r-- .cinit
    00032e40 00032e40 00000020 00000020 r-- .binit
    00032e60 00032e60 00000020 00000020 r-- .ovly
    08008000 08008000 00018c68 00000000 rw-
    08008000 08008000 00018c68 00000000 rw- .bss
    08020c68 00000040 0000105c 0000105c r-x
    08020c68 00000040 0000105c 0000105c r-x flashAPI
    08021cc8 08021cc8 00000660 00000000 rw-
    08021cc8 08021cc8 00000660 00000000 rw- .data
    08022340 00001540 00000020 00000020 r-x
    08022340 00001540 00000020 00000020 r-x .TI.ramfunc
    0803ffc0 00001500 00000028 00000028 r-x
    0803ffc0 00001500 00000028 00000028 r-x ramIntvecs

     section .bss and .data is located in ram,how to understand? after power off,nothing left in ram.

    so there must be some mechanism copy the data and bss from flash to ram?

    and i also want to know when the ccs debug the proj, it just programm the flash ,or both the flash and the ram ?

    To provide answers about the map file I would need to have some context including code and linker command files to understand what is being presented. Is this map file for a TMS570 project? 

    You are correct that RAM content will be lost if power is removed.

    Usually, there is some initialization code at startup to initialize RAM variables defined within the context of your application. If this is part of a boot loader program, the bootloader will need to be loaded into RAM in order to program the flash bank in which it resides since you cannot program the same bank from which you are executing.

    there is no formal mechanism to copy from flash to RAM other than normal programming methodologies. There are many threads on executing code from RAM. Some of these are listed here:

    In regard to CCS, it will place the program where you tell it to. As noted in some of the examples above, it is possible to configure a RAM/Flash swap and load the program to RAM for execution, but I suspect your intention is to load and execute code from RAM in your boot loader application, This should be covered by the application notes reference earlier.

  • Hi Chuck ,thank you very much! i know much better now!
  • for the second question now i know:
    (spnu118t) Autoinitializing Variables at Run Time (--rom_model)
    the data is copyed from flash to ram ,by run_cinit();

    Thanks and Regards