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.

debugging problems with migration from CCS V5.3 to CCS V5.5

Other Parts Discussed in Thread: HALCOGEN

Hi there,

we just updated from CCS V5.3 to CCS V5.5. Now, we are not able to debug/program our target any more.

What we did:

  • Opened the V5.3.Workspace  with V5.5
  • we did NOT recompile!
  • start DEBUG session
    • OUT-file (generated with V5.3) is loaded into target
  • target goes into 'prefetchEntry' when accessing address 0xFFFFFFE4
    • sys_startup.c (generated by HalCoGen V3.5.2), line 117
      •  "if ((SYS_EXCEPTION & POWERON_RESET) != 0U)"

- We also tried to recompile our project with V5.5, but there was no change in behavior of the target.
- switching off the target and powering up again (without debugger) leads to NO success.

With V5.3:
- compiling and debugging the project with V5.3 works great. Target runs and never enters "prefetchEntry"
- switching off the target and powering up again (without debugger): target runs fine

Are we missing something?

Best regards, Andreas

  • Andreas,

    The likely cause of this is a change in CCSv5.5 related to flash programming.   The compiler that ships with CCSv5.5 can generate ECC data now, so we changed the setting in CCS to *not* auto-generate ECC on flash download.  This was probably a mistake in retrospect because of the confusion it is causing.

    You probably just need to change this setting back.   I'm not at a place where I can open CCS at the moment to get a screenshot to show you how to do this, but hopefully you can find it in the CCS menus.  It's a checkbox on the tab that lets you manually erase the flash and that also lets you select whether you want to erase the whole flash or just the sectors that you need to use for the program you are about to load.

    EDIT: 
    Here's the option you probably need to check:


    Best Regards,

    Anthony

  • Hi Anthony,

    thanks a lot. "Auto ECC Generation" was the solution.

    I saw this button by my own before, activated it but CCS V5.5 didn't use/save it.
    (I didn't recognize, that it wasn't saved/used...)

    But trying for the second time to activate the "auto ECC generation", clicking APPLY, close the workspace, reopen the workspace, leaded to success :-)

    Regards, Andy

  • Hi Anthony,

    you wrote, that the CCS5.5 compiler/linker can generate ECC on its on. I want to try this feature.

    Could you please give me a hint, how to setup this feature in CCS5.5

    - Are the settings located in project properties?
    - (we are working with the RM46 processor)

    Thanks a lot,

    Andy

  • Andy,

    ECC generation is controlled by the linker command file.

    See http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=spnu118&fileType=pdf

    Section 8.5.8 shows what goes in the command file.

    There is also a compiler option to inject errors in select locations so that you can check the functionality of the ECC logic, which you can find in the compiler manual  http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=spnu151&fileType=pdf   (Search 'ecc' for the command line options to inject errros).

    One of my colleagues has tried the feature and used this linker command file - at minimum I think you will need the device specific information that is in the ECC {} section.   The RM46 settings should be the same as the TMS570LS313x settings in this ECC {} section.

    /*----------------------------------------------------------------------------*/
    /* TMS570LS313xFlashLnk.cmd                                                 */
    /*                                                                            */
    /* (c) Texas Instruments 2011, All rights reserved.                           */
    /*                                                                            */

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


    /*----------------------------------------------------------------------------*/
    /* Linker Settings                                                            */
    --retain="*(.intvecs)"
    -stack=0x1000

    /*----------------------------------------------------------------------------*/
    /* Memory Map                                                                 */
    MEMORY{
        VECTORS (X)  : org = 0x00000000 len = 0x00000020
    #if defined( __TI_COMPILER_VERSION__ ) && ( __TI_COMPILER_VERSION__ >= 5001000)
                                         vfill = 0xffffffff
    #endif
        FLASH0  (RX) : org = 0x00000020 len = 0x0017FFE0
    #if defined( __TI_COMPILER_VERSION__ ) && ( __TI_COMPILER_VERSION__ >= 5001000)
                                         vfill = 0xffffffff
    #endif
        FLASH1  (RX) : org = 0x00180000 len = 0x00180000
    #if defined( __TI_COMPILER_VERSION__ ) && ( __TI_COMPILER_VERSION__ >= 5001000)
                                         vfill = 0xffffffff
                                           
        VECTORS_ECC  : org = 0xf0400000  len = 0x00000004  ecc = { input_range = VECTORS,
                                                                   algorithm   = eccalgo,
                                                                   fill        = true }
        FLASH0_ECC   : org = 0xf0400004  len = 0x0002FFFC  ecc = { input_range = FLASH0,
                                                                   algorithm   = eccalgo,
                                                                   fill        = true }
        FLASH1_ECC   : org = 0xf0430000  len = 0x00030000  ecc = { input_range = FLASH1,
                                                                   algorithm   = eccalgo,
                                                                   fill        = true }
    #endif

        STACKS  (RW) : origin=0x08000000 length=0x00001300
        RAM     (RW) : origin=0x08001300 length=0x0003ED00
    }

    #if defined( __TI_COMPILER_VERSION__ ) && ( __TI_COMPILER_VERSION__ >= 5001000)
    ECC
    {
       eccalgo : address_mask = 0x003ffff8
                 hamming_mask = R4
                 parity_mask  = 0x0C
                 mirroring    = F021
    }
    #endif

    /*----------------------------------------------------------------------------*/
    /* Section Configuration                                                      */
    SECTIONS{
        .intvecs : {} > VECTORS
        .text    : {} > FLASH0 | FLASH1
        .const   : {} > FLASH0 | FLASH1
        .cinit   : {} > FLASH0 | FLASH1
        .pinit   : {} > FLASH0 | FLASH1
        .bss     : {} > RAM
        .data    : {} > RAM
        .stack   : {} > STACKS
    }
    /*----------------------------------------------------------------------------*/


  • Hi Anthony,

    thanks for the hint with the ".cmd" file. I tried to edit this file manually and now,
    ECC is automatically generated by the linker.

    But, since I use HalCoGen, the "sys_link.cmd" file is generated automatically by HalCoGen.
    I can edit some "user code" sections in this file, but I don't know how to define
    a "vfill" value as you wrote in your code (it would be overwritten by HalCoGen, if it is put outside
    an "user code" section).
    Without a vfill-value, CCS is reporting errors during a build:
    "#10409-D generating ECC for uninitialized area with no vfill value"

    How can I work around this?

    Regards, Andy

  • Andy,

    I think you need to let HalCoGen go ahead and generate the sys_link but make your own copy with a different name, customize it, and change your CCS project so it ignores the HalCoGen generated file.

    I'll submit a CQ enhancment request to look at adjusting this.

    With the compiler header files the normal trick is to put an '#if 0' in the user code section before (e.x. (1) and an   '#endif' in the user code section after (ex..(3)) where the user code numbers are the ones in the sys_link.cmd file.  And then after the #endif in the section 3 you would copy/paste an entire new Memory{} construct.  But I don't think the preprocessor works on linker command files.

     

  • Hi Anthony,

    great minds think alike :-)

    I solved it already with your second proposal:

    I used #if  ....   #endif   in the user-code-sections in HalCoGen's "sys_link.cmd"  file.

    Best regards, Andy