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/TMS320F28388D: Purpose of handler function

Part Number: TMS320F28388D


Tool/software: TI C/C++ Compiler

Hi,

From autoinit.h file, in run_cinit() function, the function handler(load_addr, run_addr) is defined in which file?

 What is the purpose of the below mentioned lines?

handler_fn_t handler = __TI_Handler_Table_Base[handler_idx];
handler(load_addr, run_addr);

 


Thanks,

Subha

  • Hello,

    Can you clarify which SW package or library you are using?

  • Subha R said:
    From autoinit.h file, in run_cinit() function, the function handler(load_addr, run_addr) is defined in which file?

    handler is a function pointer obtained from a linker generated handler table. These handler functions are used to perform initialisation of C variables as part of the run-time initialisation before main() is called. E.g. copy the .data section from flash to ram.

    The linker map file shows which functions are placed in the table. E.g.:

    LINKER GENERATED HANDLER TABLE
    
    __TI_handler_table @ 00082306 records: 2, size/record: 2, table size: 4
    	index: 0, handler: __TI_decompress_lzss
    	index: 1, handler: __TI_decompress_none

    See section 8.8 Using Linker-Generated Copy Tables in TMS320C28x Assembly Language Tools v20.12.0.STS User's Guide (Rev. V) for more information.