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: Linker Generated ECC

Part Number: TMS570LC4357
Other Parts Discussed in Thread: NOWECC

Hello,

I am trying to write a simple bootloader such that I can load an application image onto my board over a serial port. I have tried two different approaches:

1. CCS loader Auto ECC Generation ENABLED & Flash Verification

2. CCS loader Auto ECC Generation DISABLED& No Flash Verification

With approach 1, I was only successfully once I edited the Fapi_BlockProgram and Fapi_BlockErase function in bl_flash.c file (provided by TI), to switch the Fapi_DataOnly param to Fapi_AutoEccGeneration in the Fapi_issueProgrammingCommand funcions. With these revision, I am able to load the bootloader image onto my board and to use the bootloader to load an application image .bin file and to jump to the application memory and run that app code successfully. I have noticed that when I load my bootloader image onto my TMS570 using the CCS loader, the ECC ERROR led lights up (although the bootloader code and app code work when this light is on). When I PORRST the board, the ECC ERROR led turns off and my bootloader is able to load a valid application image .bin file onto the board but it cannot jump to that application code and run it.

With approach 2, I have been unsuccessful at generating any functioning bootloader images. I revised my Linker Command File in accordance with the following link With these revisions, my bootloader is unable to run.

I would really appreciate some information with regards to the following questions:

1. When programming a bootloader that will ultimately be loading an application over a serial port (not a CCS loader), should I be implementing Linker Generated ECC? Or is it possible to program an image without Linker Generated ECC?

2. What exactly does this ECC ERROR LED indicate? And why is it cleared on PORRST?

3. Can you think of any reasons as to why my bootloader would be able to jump to app code successfully when loaded from the CCS loader and then not be able to run that same app code on a clean boot (after PORRSTing the board)?

I appreciate your time and assistance.

Thanks,

Vicki

  • Hello Victoria,

    1. You can program the bootloader with ECC either generated by CCS ECC auto generation, or ECC generated by linker command, or ECC generated by other tools such as nowECC. The Cortex R5F CPU may generate speculative fetches to any location within the Flash memory space. A speculative fetch to a location with invalid ECC, which is subsequently not used, will not create an abort, but will set the ESM flags for a correctable or uncorrectable error. An uncorrectable error will unconditionally cause the nERROR pin to toggle low. Therefore care must be taken to generate the correct ECC for the entire Flash space including the holes between sections and any unused or blank Flash areas.

    2. The ESM module has error flags for each error channel. The error status registers ESMSR1, ESMSR4, ESMSR7, ESMSR2, ESMSR3 provide status information on a pending error of Group1 (Channel 0-31), Group1 (Channel 32-63), Group1 (Channel 64-95), Group2, and Group3, respectively. Please check the status registers to find which channel is set.

    After PORRST, all registers in ESM module will be re-initialized to the default value. All the error status registers are cleared to zero.

    3. If you use linker to generate ECC for your bootloader, it is necessary to change the CCS loader settings so that the loader doesn't also try to generate ECC. Also verification during programming needs to be skipped because the data areas and ECC areas will now be programmed in separate steps.
    In CCS "Flash Settings", please check the following items:

    1. System Reset on Connect is checked
    2. Auto ECC Generation is unchecked
    3. Align program segments to 64-bit memory regions is checked
    4. Flash Verification Settings should be 'None'
    5. Perform Blank Check before Program Load must be unchecked