Part Number: TMS320F28375D
Tool/software: Code Composer Studio
Hello team,
“I have a customer with a question regarding TMS320F28375D initialization inside of CCS.”
MY PROBLEM
I have different global variables declared to external memories connected to my Delfino TMS320F28375D via EMIF bus (I am using compiler version TI v18.1.3.LTS). The EMIF bus initialization occurs AFTER gloval variables initialization in the boot. And this is my problem, because when I need to use those global variables (defined in external memories and initialized in their definition with a specific value) they do not have their initialization value because the EMIF bus initialization occurs after the global variable init.
MY SOLUTION
In TI compiler documentation I found that I can solve my problem by using a custom verion of _system_pre_init() function (present in pre_init.c TI file). In fact, by placing the EMIF bus initialization function in this function, this bus init would occur BEFORE global variable initialization in the boot.
ISSUE I AM HAVING
I connected this customized _system_pre_init() function to the project by linking pre_init.c file to the project, I inserted my InitEmif() function in it and build the project. In that way the run time library would call my customized _system_pre_init() function (this is what I have read in forums). It actually gets called during the boot but, please look at the pic of the attachment as a reference, when instruction at line 125 is executed, _system_pre_init() is called. BUT when the PC starts to execute this instruction, line 58 is the last place of this instruction ran by the debugger. InitEmif() is never called, because _system_pre_init() exits after having run line 58. I do not understand why InitEmif() is never called and _system_pre_init() exists immediately.
Is there some documentation or examples which describe the use of _system_pre_init() function?
