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.

Compiler/TMS320F280049C: Testing ECC Data_Error

Part Number: TMS320F280049C
Other Parts Discussed in Thread: DAC8562, C2000WARE

Tool/software: TI C/C++ Compiler

Please go through the below details and advise me on why I am not able to inject and test ECC data_error.

---------------------------------------------------------------------------------------------------------------------------

Following lines taken from the function 'main':

if (SoftwareVersion == 0x300)
{
while(1);
}

Note: const Uint16 SoftwareVersion = 0x0300;

---------------------------------------------------------------------------------------------------------------------------

Following line taken from map file:

page   address     name 

0      0000c1f2    _SoftwareVersion 

---------------------------------------------------------------------------------------------------------------------------

Building target: "XYZ.out"

Invoking: C2000 Linker
"C:/ti/ccs920/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --advice:performance=all --define=CPU1 --define=_FLASH --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --cla_background_task=on -z -m"XYZ.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccs920/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/lib" -i"C:/ti/ccs920/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/include" --reread_libs --diag_wrap=off --display_error_number --ecc=on --ecc:data_error=0xC1F2+1,0x42 --xml_link_info="XYZ_linkInfo.xml" --entry_point=code_start --rom_model -o "XYZ.out" "./O2_SST_Funcs.obj" "./O2_cla_Init.obj" "./O2_main_TM.obj" "./f28004x_codestartbranch.obj" "./f28004x_cputimers.obj" "./f28004x_defaultisr.obj" "./f28004x_globalvariabledefs.obj" "./f28004x_gpio.obj" "./f28004x_piectrl.obj" "./f28004x_pievect.obj" "./f28004x_sysctrl.obj" "./f28004x_usdelay.obj" "./O2_FlashAPI/O2_FlashAPI.obj" "./O2_SysFuncs/AD7124.obj" "./O2_SysFuncs/AD7988.obj" "./O2_SysFuncs/BIT.obj" "./O2_SysFuncs/DAC8562.obj" "./O2_SysFuncs/EEprom.obj" "./O2_SysFuncs/O2_SST_Funcs.obj" "./O2_SysFuncs/SerialComm.obj" "./O2_SysFuncs/SystemFuncs.obj" "./device/device.obj" "./driverlib/adc.obj" "./driverlib/asysctl.obj" "./driverlib/can.obj" "./driverlib/cla.obj" "./driverlib/clapromcrc.obj" "./driverlib/cmpss.obj" "./driverlib/cputimer.obj" "./driverlib/dac.obj" "./driverlib/dcc.obj" "./driverlib/dcsm.obj" "./driverlib/dma.obj" "./driverlib/ecap.obj" "./driverlib/epwm.obj" "./driverlib/eqep.obj" "./driverlib/flash.obj" "./driverlib/fsi.obj" "./driverlib/gpio.obj" "./driverlib/hrcap.obj" "./driverlib/hrpwm.obj" "./driverlib/i2c.obj" "./driverlib/interrupt.obj" "./driverlib/lin.obj" "./driverlib/memcfg.obj" "./driverlib/pga.obj" "./driverlib/pmbus.obj" "./driverlib/sci.obj" "./driverlib/sdfm.obj" "./driverlib/spi.obj" "./driverlib/sysctl.obj" "./driverlib/version.obj" "./driverlib/xbar.obj" "./vcu/vcu0_crc_32.obj" "../O2_Flash_lnk.cmd" "../driverlib.lib" "../f28004x_headers_nonbios.cmd" "../driverlib/ccs/Debug/driverlib.lib" "../driverlib/ccs/Release/driverlib.lib" -llibc.a -l"C:/ti/c2000/C2000Ware_2_00_00_02/libraries/flash_api/f28004x/lib/F021_API_F28004x_FPU32.lib" -l"C:/ti/c2000/C2000Ware_2_00_00_02/libraries/flash_api/f28004x/lib/F021_ROM_API_F28004x_FPU32.lib" -l"C:/ti/C2000/C2000Ware_2_00_00_02/libraries/math/CLAmath/c28/lib/cla2_math_library_fpu32.lib" -l"C:/ti/C2000/C2000Ware_2_00_00_02/libraries/dsp/FPU/c28/lib/c28x_fpu_dsp_library.lib" -l"D:/Development/XYZ/driverlib.lib"
<Linking>
error #10404-D: bit error should be two or three comma-separated integers with an optional base symbol: [symbol+]address,[page,]error_mask
warning #10247-D: creating output section "Ram_Test_Block" without a SECTIONS specification
error #10010: errors encountered during linking; "XYZ.out" not built

>> Compilation failure
makefile:217: recipe for target 'XYZ.out' failed
gmake[1]: *** [XYZ.out] Error 1
gmake[1]: Target 'secondary-outputs' not remade because of errors.
makefile:213: recipe for target 'all' failed
gmake: *** [all] Error 2

**** Build Finished ****

  • Sandeep,

    What is the address where you want to include ECC error when you configure  --ecc:data_error=0xC1F2+1,0x42 ?

    Thanks and regards,
    Vamsi

  • I thought "const Uint16 SoftwareVersion = 0x0300;" is allocated in .econst which goes into section "FLASH_BANK0_HALF1". But address in map file is showing for "SoftwareVersion" is 0xC1F2. How can I pick a const variable in FLASH_BANK0_HALF1 to introduce ecc:data_error?

    MEMORY
    {
    PAGE 0 :
    RAMM0 : origin = 0x0000F5, length = 0x00030B
    RAMLS0LS1 : origin = 0x008000, length = 0x001000
    RAMLS2 : origin = 0x009000, length = 0x000800
    RAMLS3 : origin = 0x009800, length = 0x000800
    RAMLS4 : origin = 0x00A000, length = 0x000800

    RESET : origin = 0x3FFFC0, length = 0x000002

    /* Flash sectors */
    /* BANK 0 */
    FLASH_BANK0_HALF1 : origin = 0x00080000, length = 0x008000 vfill=0xffff /* Sections 0 thru 7 */
    FLASH_BANK0_HALF2 : origin = 0x00088000, length = 0x008000 vfill=0xffff /* Sections 8 thru 15 */

    /* BANK 1 */
    FLASH_BANK1_SEC0 : origin = 0x00090000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC1 : origin = 0x00091000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC2 : origin = 0x00092000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC3 : origin = 0x00093000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC4 : origin = 0x00094000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC5 : origin = 0x00095000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC6 : origin = 0x00096000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC7 : origin = 0x00097000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC8 : origin = 0x00098000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC9 : origin = 0x00099000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC10 : origin = 0x0009A000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC11 : origin = 0x0009B000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC12 : origin = 0x0009C000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC13 : origin = 0x0009D000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC14 : origin = 0x0009E000, length = 0x001000 vfill=0xffff /* on-chip Flash */
    FLASH_BANK1_SEC15 : origin = 0x0009F000, length = 0x000FF8 vfill=0xffff /* on-chip Flash */
    PROG_CRC32 : origin = 0x0009FFF8, length = 0x000008 vfill=0xffff /* on-chip Flash */

    RAMGS0GS3 : origin = 0x0000C000, length = 0x008000

    ECC_FLAX0 : origin = 0x01080000,
    length = 0x001000,
    ECC = { input_range = FLASH_BANK0_HALF1, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAX1 : origin = 0x01081000,
    length = 0x001000,
    ECC = { input_range = FLASH_BANK0_HALF2, input_page = 0, algorithm = C2000_Algo, fill = true }


    // ECC_FLAY0 : origin = 0x01082000,
    // length = 0x000200,
    // ECC = { input_range = FLASH_BANK1_SEC0, input_page = 0, algorithm = C2000_Algo, fill = true }

    // ECC_FLAY1 : origin = 0x01082200,
    // length = 0x000200,
    // ECC = { input_range = FLASH_BANK1_SEC1, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY2 : origin = 0x01082400,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC2, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY3 : origin = 0x01082600,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC3, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY4 : origin = 0x01082800,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC4, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY5 : origin = 0x01082A00,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC5, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY6 : origin = 0x01082C00,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC6, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY7 : origin = 0x01082E00,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC7, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY8 : origin = 0x01083000,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC8, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY9 : origin = 0x01083200,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC9, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY10 : origin = 0x01083400,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC10, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY11 : origin = 0x01083600,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC11, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY12 : origin = 0x01083800,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC12, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY13 : origin = 0x01083A00,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC13, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY14 : origin = 0x01083C00,
    length = 0x000200,
    ECC = { input_range = FLASH_BANK1_SEC14, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY15 : origin = 0x01083E00,
    length = 0x0001FF,
    ECC = { input_range = FLASH_BANK1_SEC15, input_page = 0, algorithm = C2000_Algo, fill = true }

    ECC_FLAY16 : origin = 0x01083FFF,
    length = 0x000001,
    ECC = { input_range = PROG_CRC32, input_page = 0, algorithm = C2000_Algo, fill = true }

    PAGE 1 :

    /* Flash sectors */
    /* BANK 0 */
    //FLASH_BANK0_HALF1 : origin = 0x080002, length = 0x007FFE /* Sections 0 thru 7 */
    //FLASH_BANK0_HALF2 : origin = 0x088000, length = 0x008000 /* Sections 8 thru 15 */

    BOOT_RSVD : origin = 0x000002, length = 0x0000F3 /* Part of M0, BOOT rom will use this for stack */
    RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */

    RAMLS5 : origin = 0x00A800, length = 0x000800
    RAMLS6 : origin = 0x00B000, length = 0x000800
    RAMLS7 : origin = 0x00B800, length = 0x000800

    CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
    CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080

    }

    ECC { C2000_Algo : parity_mask = 0xFC mirroring = F021 }

    SECTIONS
    {
    codestart : > FLASH_BANK0_HALF1, PAGE = 0, PALIGN(4)
    .text : > FLASH_BANK0_HALF1, PAGE = 0, PALIGN(4)
    .cinit : > FLASH_BANK0_HALF1, PAGE = 0, PALIGN(4)
    .pinit : > FLASH_BANK0_HALF1, PAGE = 0, PALIGN(4)
    .switch : > FLASH_BANK0_HALF1, PAGE = 0, PALIGN(4)
    .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */

    .cio : > RAMGS0GS3, PAGE = 0
    .stack : > RAMM1, PAGE = 1
    .ebss : > RAMGS0GS3, PAGE = 0
    .esysmem : > RAMGS0GS3, PAGE = 0
    .econst : > FLASH_BANK0_HALF1,
    RUN = RAMGS0GS3,
    LOAD_START(_econst_loadstart),
    RUN_START(_econst_runstart),
    LOAD_SIZE(_econst_loadsize), PAGE = 0, PALIGN(4)
    /*
    .cio : > RAMS3LS7, PAGE = 0
    .stack : > RAMM1, PAGE = 1
    .ebss : > RAMGS0GS3, PAGE = 0
    .esysmem : > RAMS3LS7, PAGE = 0
    .econst : > RAMS3LS7,
    RUN = RAMS3LS7,
    LOAD_START(_econst_loadstart),
    RUN_START(_econst_runstart),
    LOAD_SIZE(_econst_loadsize), PAGE = 0, PALIGN(4)
    */

    O2_OperParms : > FLASH_BANK1_SEC0 PAGE = 0
    O2_CalCoeffs : > FLASH_BANK1_SEC1 PAGE = 0
    Stored_Prog_CRC32 : > PROG_CRC32 PAGE = 0

    // CLA Sections
    Cla1Prog : > FLASH_BANK0_HALF2,
    RUN = RAMLS0LS1,
    RUN_START(_Cla1ProgRunStart),
    LOAD_START(_Cla1ProgLoadStart),
    LOAD_SIZE(_Cla1ProgLoadSize), PAGE = 0, PALIGN(4)
    .scratchpad : > RAMLS0LS1, PAGE = 0
    .bss_cla : > RAMLS0LS1, PAGE = 0
    .const_cla : > FLASH_BANK0_HALF2,
    RUN = RAMLS0LS1,
    RUN_START(_Cla1ConstRunStart),
    LOAD_START(_Cla1ConstLoadStart),
    LOAD_SIZE(_Cla1ConstLoadSize), PAGE = 0, PALIGN(4)
    Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, PAGE = 1
    CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, PAGE = 1
    Cla1DataRam : > RAMLS2, PAGE = 0

    /* RAM functions */

    .TI.ramfunc : LOAD = FLASH_BANK0_HALF1,
    RUN = RAMGS0GS3,
    LOAD_START(_RamfuncsLoadStart),
    LOAD_SIZE(_RamfuncsLoadSize),
    LOAD_END(_RamfuncsLoadEnd),
    RUN_START(_RamfuncsRunStart),
    RUN_SIZE(_RamfuncsRunSize),
    RUN_END(_RamfuncsRunEnd),
    PAGE = 0, PALIGN(4)

    /*
    .econst.ram : LOAD = FLASH_BANK0_HALF1,
    RUN = RAMGS0GS3,
    LOAD_START(_econst_loadstart),
    RUN_START(_econst_runstart),
    LOAD_SIZE(_econst_loadsize),
    PAGE = 0, PALIGN(4)

    Cla1Prog : LOAD = FLASH_BANK0_HALF2,
    RUN = RAMLS0LS1,
    LOAD_START(Cla1ProgLoadStart),
    LOAD_SIZE(Cla1ProgLoadSize),
    RUN_START(Cla1ProgRunStart),
    PAGE = 0, PALIGN(4)

    .const_cla : LOAD = FLASH_BANK0_HALF2,
    RUN = RAMLS3,
    RUN_START(Cla1ConstRunStart),
    LOAD_START(Cla1ConstLoadStart),
    LOAD_SIZE(Cla1ConstLoadSize),
    PAGE = 0, PALIGN(4)
    */
    }

    /*
    //===========================================================================
    // End of file.
    //===========================================================================
    */

  • Before it was:

    .econst : > FLASH_BANK0_HALF1,
    RUN = RAMGS0GS3,
    LOAD_START(_econst_loadstart),
    RUN_START(_econst_runstart),
    LOAD_SIZE(_econst_loadsize), PAGE = 0, PALIGN(4)

    -----------------------------------------------------------------------------------------------------------------------------------------------

    Now, I changed in linker file as below to place 'SoftwareVersion' in FLASH_BANK0_HALF1.

    .econst          : > FLASH_BANK0_HALF1, PAGE = 0, PALIGN(4)

    Now, map file shows:

    page   address          name

    0        0008105e      _SoftwareVersion

    -----------------------------------------------------------------------------------------------------------------------------------------------

    Building target: "XYZ.out"
    Invoking: C2000 Linker
    "C:/ti/ccs920/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 -Ooff --advice:performance=all --define=CPU1 --define=_FLASH --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=coffabi --cla_background_task=on -z -m"XYZ.map" --stack_size=0x100 --warn_sections -i"C:/ti/ccs920/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/lib" -i"C:/ti/ccs920/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/include" --reread_libs --diag_wrap=off --display_error_number --ecc=on --ecc:data_error=0x8105e+0,0x0,0x02 --xml_link_info="XYZ_linkInfo.xml" --entry_point=code_start --rom_model -o "XYZ.out" "./O2_SST_Funcs.obj" "./O2_cla_Init.obj" "./O2_main_TM.obj" "./f28004x_codestartbranch.obj" "./f28004x_cputimers.obj" "./f28004x_defaultisr.obj" "./f28004x_globalvariabledefs.obj" "./f28004x_gpio.obj" "./f28004x_piectrl.obj" "./f28004x_pievect.obj" "./f28004x_sysctrl.obj" "./f28004x_usdelay.obj" "./O2_FlashAPI/O2_FlashAPI.obj" "./O2_SysFuncs/AD7124.obj" "./O2_SysFuncs/AD7988.obj" "./O2_SysFuncs/BIT.obj" "./O2_SysFuncs/DAC8562.obj" "./O2_SysFuncs/EEprom.obj" "./O2_SysFuncs/O2_SST_Funcs.obj" "./O2_SysFuncs/SerialComm.obj" "./O2_SysFuncs/SystemFuncs.obj" "./device/device.obj" "./driverlib/adc.obj" "./driverlib/asysctl.obj" "./driverlib/can.obj" "./driverlib/cla.obj" "./driverlib/clapromcrc.obj" "./driverlib/cmpss.obj" "./driverlib/cputimer.obj" "./driverlib/dac.obj" "./driverlib/dcc.obj" "./driverlib/dcsm.obj" "./driverlib/dma.obj" "./driverlib/ecap.obj" "./driverlib/epwm.obj" "./driverlib/eqep.obj" "./driverlib/flash.obj" "./driverlib/fsi.obj" "./driverlib/gpio.obj" "./driverlib/hrcap.obj" "./driverlib/hrpwm.obj" "./driverlib/i2c.obj" "./driverlib/interrupt.obj" "./driverlib/lin.obj" "./driverlib/memcfg.obj" "./driverlib/pga.obj" "./driverlib/pmbus.obj" "./driverlib/sci.obj" "./driverlib/sdfm.obj" "./driverlib/spi.obj" "./driverlib/sysctl.obj" "./driverlib/version.obj" "./driverlib/xbar.obj" "./vcu/vcu0_crc_32.obj" "../O2_Flash_lnk.cmd" "../driverlib.lib" "../f28004x_headers_nonbios.cmd" "../driverlib/ccs/Debug/driverlib.lib" "../driverlib/ccs/Release/driverlib.lib" -llibc.a -l"C:/ti/c2000/C2000Ware_2_00_00_02/libraries/flash_api/f28004x/lib/F021_API_F28004x_FPU32.lib" -l"C:/ti/c2000/C2000Ware_2_00_00_02/libraries/flash_api/f28004x/lib/F021_ROM_API_F28004x_FPU32.lib" -l"C:/ti/C2000/C2000Ware_2_00_00_02/libraries/math/CLAmath/c28/lib/cla2_math_library_fpu32.lib" -l"C:/ti/C2000/C2000Ware_2_00_00_02/libraries/dsp/FPU/c28/lib/c28x_fpu_dsp_library.lib" -l"D:/Development/XYZ/driverlib.lib"
    <Linking>
    error #10404-D: bit error should be two or three comma-separated integers with an optional base symbol: [symbol+]address,[page,]error_mask
    warning #10247-D: creating output section "Ram_Test_Block" without a SECTIONS specification
    error #10010: errors encountered during linking; "XYZ.out" not built

    >> Compilation failure
    makefile:217: recipe for target 'XYZ.out' failed
    gmake[1]: *** [XYZ.out] Error 1
    gmake[1]: Target 'secondary-outputs' not remade because of errors.
    makefile:213: recipe for target 'all' failed
    gmake: *** [all] Error 2

    **** Build Finished ****

  • I found that I should not mention "+0" along with the address. Which made the linking to go fine but when the symbol "SoftwareVersion" is being read, I expected to cause uncorrectable error and NMI interrupt which is not happening. Any suggestions ?

    "--ecc:data_error=0x8105E+0,0,0x42" 

  • Sandeep,

    Glad the discussion helped.

    Regarding the NMI/uncorrectable error:  Did you disable AutoEccGeneration in the CCS Flash Plugin GUI?  If not, please disable it - If it is left enabled, ECC gets programmed correctly.

    Thanks and regards,
    Vamsi