Closed Naman19 closed 7 years ago
Hello,
Please ignore the above post as assembly is working now.
Please let me know what should be the changes to be made in the new application as when i call the application from the boot loader, the main of the boot loader code gets called again.
The bootloader and the application code have got similar startup files. I am not using any linker script so it seems it has been taking a default script which seems to be the problem.
The issue has been resolved, there was issue with the linker file of the application. The start Flash address was set to 0 instead of 0x8000.
I have implemented the usb_stick_updater.c example for tm4c1294kcpdt using Keil. The new application seems to be updated successfully in the flash at another location. But the inline assembly code is not working. __asm void CallApplication(uint_fast32_t ui32StartAddr) { // // Set the vector table address to the beginning of the application. // ldr r1, =0xe000ed08 str r0, [r1]
}
When CallApplication() is called. It again jumps to this bootloader instead of going to the new application. Does it require to jump to privileged mode before changing values of sp and pc?