Hi,
I am writing a bootloader code for Tiva C series launchpad board which will execute first and will jump to the application code address. Can someone tell me how to do that. Any help and refernce would be appreciated.
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.
Hi,
I am writing a bootloader code for Tiva C series launchpad board which will execute first and will jump to the application code address. Can someone tell me how to do that. Any help and refernce would be appreciated.
Hello,
as in "Cortex™-M4 Devices Generic User Guide" (ARM DUI 0553A):
on system reset, the vector table is fixed at address 0x00000000. Privileged software can write to
the VTOR to relocate the vector table start address to a different memory location.
A good (in my opinion) starting point is in "Stellaris® Boot Loader USER’S GUIDE",
(TI document SW-BOOTLDR-UG-8555).
To branch to the application :
- Set the vector table to the beginning of the app
- Load the stack pointer from the application's vector table
- Load the initial PC from the application's vector table and branch to
the application's entry point.
as in the Stellarisware bootLoader example, "bl_startup_ewarm.S"
Finally, see also posts
http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/317657.aspx
http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/300316.aspx
Regards,
Claudio
Hi
Can somebody explain me specifically what changes needs to be done to make this boot loader run and jump to the application for execution? Can i have a small example for that or sequence of steps required ?
Thanx in advance !!
Hi,
here is an excerpt from TivaWare callApplication() function.
// Set the vector table to the beginning of the app in flash. HWREG(NVIC_VTABLE) = ui32StartAddr; // Load the stack pointer from the application's vector table. // __asm(" ldr r1, [r0]\n" " mov sp, r1"); // Load the initial PC from the application's vector table and branch to // the application's entry point. // __asm(" ldr r0, [r0, #4]\n" " bx r0\n");
Hope it helps.
Regards,
Claudio