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/TMS570LS0232: How to remove sys_selftest.c?

Part Number: TMS570LS0232
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hello, TI Engineers

When I use HALCoGen to gennerate some driver codes, I found a sys_selftest.c file. I don't know what the file is used for? I tried to delete it. After it deleted, the project can not be built. when I check map file, it take account of more than 5000B memory. Could anybody help me to delete it?

Thanks!

Regards!

Xinyu

  • Hello Xinyu,

    This file contains the diagnostic features for functional safety. The functions in sys_selftest.c are called in sys_startup.c, for example, checkRAMECC(), can1ParityCheck(), memoryInit(), cpuSelfTest(), etc. It's better to keep sys_selftest.c in your project.

    If you really want to remove this file:

    1. disable all the features listed in SAFETY INIT in HALCoGen

    2. comment out the function call of memoryInit() in sys_startup.c

    3. sys_selftest.c contains data abort handler, and it was called by dabort.asm. So copy this function to somewhere else

    /** @fn void custom_dabort(void)

    *   @brief Custom Data abort routine for the application.

    *

    *   Custom Data abort routine for the application.

    */

    void custom_dabort(void)

    {

       /* Need custom data abort handler here.

        * This data abort is not caused due to diagnostic checks of flash and TCRAM ECC logic.

        */

    /* USER CODE BEGIN (42) */

    /* USER CODE END */

    }

    4. exclude sys_selftest.c from project built

  • Hello, Wang

    In addition, I want to know more about selftest of TMS570. If I use HALCoGen to configure drivers of TMS570. Selftest would run periodically on the TMS570 chip. Or I should call the function when I need to do selftest for TMS570.

    Thanks!

    Regards!

    Xinyu