Other Parts Discussed in Thread: EK-TM4C123GXL
I want to write a bootloader for Tiva c series(TM4C123GH6PM) evaluation board. I read a few documents by TI like the ARM assembly language tools user guide and TivaWare Bootloader user guide.
I have a few questions regarding the concept and the specifics and I hope someone would help me out with these.
Evaluation kit: EK-TM4C123GXL
CCS Version: 7.4.0.00015
1. How can I get to know the program flow from the point the PC gets the reset vector address till the execution of the main().
I want to know what all settings and processes happen before the main function executes.
I tried to add a breakpoint in the tm4c123gh6pm_startup_ccs.c file which has the _c_int00 function and this is the function called in the ResetISR.
But the control didnt stop at the breakpoint, it entered main directly.
2. From what I understand, the vector table of the Cortex-M4 microprocessor contains four required entries starting form address 0: the initial stack
pointer, the reset handler address, the NMI handler address, and the hard fault handler address. When the processor is reset, it jumps to the reset vector
address which will be the starting point for the boot loader. The bootloader then copies itself and the vector table to the SRAM and then executes from there.
Where can I find the code for this operation, so that I can implement this in my boot loader.
3. I created a test project in CCS where I changed the ResetISR function in the tm4c123gh6pm_startup_ccs.c file and made it to jump to my function(test function) instead of the _c_int00 function.
When I ran the program, the control entered main without going to the test function, why is this happening.
This is my ResetISR function
void
ResetISR(void)
{
__asm(" .global testFunc\n"
" b.w testFunc");
}
4. The TivaWare bootloader user guide says that the startup code for CCS will be in the file bl_startup_ccs.s, where can I find this file?
Please let me know if there are any mistakes in my understanding.
Thanks in advance.