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/RM46L852: How to burn code in CCS?

Part Number: RM46L852
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

Hello,

I want to burn a code in Herculus RM46x MCU. I am using code composer studio. When i run(Debug) a code in the CCS it will remain in the MCU.But when i  unplug the MCU it get erased. How can i burn the code in the MCU so that if i will plug it later it will remain in the MCU. thanks

  • If you have your linker map setup to place your code in Flash then CCS will burn the code into flash when you start a debug session. Alternatively you can use the UniFlash tool to do the same. However if you are finding that when you unplug your MCU it is erasing the memory that tells me that your code is not being placed in flash. What does your linker command file look like?

    Someone in the Hercules forum should be able to provide a sample linker command file that places code in flash for this device.
    e2e.ti.com/.../


    Regards,
    John
  • Hi John,

    Thanks for your reply.here is my linker file.

    /*----------------------------------------------------------------------------*/
    /* sys_link.cmd */
    /* */
    /*

    /* */
    /*----------------------------------------------------------------------------*/
    /* USER CODE BEGIN (0) */
    /* USER CODE END */


    /*----------------------------------------------------------------------------*/
    /* Linker Settings */

    --retain="*(.intvecs)"

    /* USER CODE BEGIN (1) */
    /* USER CODE END */

    /*----------------------------------------------------------------------------*/
    /* Memory Map */

    MEMORY
    {
    VECTORS (X) : origin=0x00000000 length=0x00000020
    FLASH0 (RX) : origin=0x00000020 length=0x0013FFE0
    STACKS (RW) : origin=0x08000000 length=0x00001500
    RAM (RW) : origin=0x08001500 length=0x0002EB00
    AJSM (RX) : origin=0xF0000000 length=0x00000010

    /* USER CODE BEGIN (2) */
    /* USER CODE END */
    }

    /* USER CODE BEGIN (3) */
    /* USER CODE END */

    /*----------------------------------------------------------------------------*/
    /* Section Configuration */

    SECTIONS
    {
    .intvecs : {} > VECTORS
    .text : {} > FLASH0
    .const : {} > FLASH0
    .cinit : {} > FLASH0
    .pinit : {} > FLASH0
    .bss : {} > RAM
    .data : {} > RAM
    .sysmem : {} > RAM
    .ajsm : {} > AJSM

    /* USER CODE BEGIN (4) */
    LOG_DATA : START( ulLOGStartAddr ), END( ulLOGEndAddr ) > RAM
    /* USER CODE END */
    }

    /* USER CODE BEGIN (5) */
    /* USER CODE END */


    /*----------------------------------------------------------------------------*/
    /* Misc */

    /* USER CODE BEGIN (6) */
    /* USER CODE END */
    /*----------------------------------------------------------------------------*/

  • The code, constants and init are all going into flash. I will ask a device expert to take a look to see if something is missing.

    John