Hi Team,
I have seen in multiple places in forum and notes that "No C code can be executed until _c_int00 setup routine is run where stack and variable initialization etc. will be done".
References:
1. Running an Application from Internal Flash Memory on the TMS320F28xxx DSP (Rev. L)
2. Piccolo 3-Day Workshop, Peripheral, and Architecture Training Course Materials
We have a part of code which related to flashing the application code which is written in c and will be run before the _c_int00 function. like below,
wd_disable: .if WD_DISABLE == 1 SETC OBJMODE ;Set OBJMODE for 28x object code EALLOW ;Enable EALLOW protected register access MOVZ DP, #7029h>>6 ;Set data page for WDCR register MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD EDIS ;Disable EALLOW protected register access LCR _boot_main LB Entry_2_Cint_00 ;Branch to start of boot._asm in RTS library .endif .end
boot_main function called before _c_int00 function. We didn't observe any issues but I want to know what can be the issues with this implementation. I have few doubts,
1. Without stack initialization what will be the stack address?
2. If I am not using any variables and functions of boot_main in main application code, still there can be any issue with the above implementation?
3. What should be the ideal way if I want to call the c function before main function?
Thanks in advance.