Hello Team,
Currently I'm involving the bootloader development for iMXRT1064 processor, I allocated the bootloader memory size is 512KB of internal flash memory, rest of the section will be application section. In bootloader code I can access the internal flash memory both read and write by using the ROM API. What is the procedure to jump from bootloader to application area?, please let me the know jump to application api. How to switch from application to bootloader section?
Hi @saranbabu
I hope you are doing great!
Regarding: jump from bootloader to application area
We can take a look at the implementation made by Flashloader and mcuboot_opensource SDK examples.
For example the jump_to_application() function from the Flashloader project . The main goal of that function is to disable peripherals, update the vector table and call a function pointer to application entry point. However please refer to complete project for reference.
Regarding: how to switch from application to bootloader section
My first response is that you may use a similar a jump operation than the one from custom bootloader to application. However, feel free to let know if you mean to jump to ROM bootloader from application or if you can elaborate further.
Regarding : In bootloader code I can access the internal flash memory both read and write by using the ROM API.
I understand here that you are making use of the bootROM API functions, correct? If yes, here is a tip, do not forget to leave sufficient space for SRAM OC for the ROM execution , at least 64 KB. You can refer to AN12077.
All the best,
Diego
Hello team,
Thanks for your quick response.
I need to jump from application to my custom bootloader section. Here I've allocated space for custom bootloader is 512KB (70000000 to 70080000) rest of the memory space will be consider for the application section. After update the new firmware image in external memory, I just want to jump to custom bootloader location(0x70000000). If I want to use runbootloader api, how do I need to specify memory address to jump? or Is there any other possible methods are there? please let me know.
Hi @saranbabu
Thank you for your comments.
Just a little note, that I do not want to overlook. The actual runbootloader API is actually intended to call the ROM bootloader located ~0x20000 address space.
But the jump from application to custom bootloader, I think it can be as simple as using a standard C function pointer and of course updating the vector table to be able to process interrupts before calling the function pointer.
Do not hesitate to let me know if there is anything else we could check!
Diego