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: __TI_auto_init 函数执行完报出ECC错误

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

王工: 

   您好,使用xds100/V3仿真器,通过CCS Debug调试,发现执行完HL_sys_startup.c文件中的__TI_auto_init 函数,查看ESM寄存器报出ESM Group2 error,esmREG->SR1[1]:8,通过查看手册ECC错误,

请问这是什么原因导致的,通过J-link仿真器在线调试,就不会出现这个问题。(前期已和您沟通过自动生成ECC的方法)

谢谢

  • Hi Bo,

    On this device ECC is always enabled. If you have properly initialized the SRAM, then the issue might be that you are getting an ECC error from the flash when you enable the cache. Each cache line loads 32 bytes from flash. Sometimes the section does not end on a 32 byte boundary and the ECC may not be generated for the missing bytes. That can be fixed by changing the align keyword in the sections part of the link command file with a palign (which means to pad and align). To avoid HALCoGen overwriting the change to your HL_sys_link.cmd file, please use #if/#endif as shown below:

    /*----------------------------------------------------------------------------*/
    /* Section Configuration                                                      */
    
    SECTIONS
    {
    /* USER CODE BEGIN (5) */
        .intvecs : {} > VECTORS
        .text   palign(32) : {} > FLASH0
        .const  palign(32) : {} > FLASH0
        .cinit  palign(32) : {} > FLASH0
        .pinit  palign(32) : {} > FLASH0
        .bss     : {} > RAM
        .data    : {} > RAM
        .sysmem  : {} > RAM
    #if 0
    /* USER CODE END */
        .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
    	
    
    /* USER CODE BEGIN (6) */
    #endif
    /* USER CODE END */
    }