Hi NXP team,
We are using i.MXRT1170 evkb board for bootloader and application loading, so that once our custom bootloader is executed, it should jump to the application (For ex. LED blinky). We have to add similar 64B of custom header for both bootloader and application.
If no header is included, we are successfully able to jump to application. But once we add the custom header for our application, bootloader is failing to jump to the application main. Please help us with this issue.
The default boot header (which includes boot data, IVT, DCD,...) in the Bootloader is unchanged. But we understood that, adding the same default boot header for the application is not required. Correct us if our understanding is wrong.
Hi @darshanmk
Thank you so much for your interest in our products and for using our community.
In order to support you better, could you provide more information?
1: Your application image start address.
2: Your project Debug_memory.ld and cm7_Debug.ld file.
3:Please tell me your APP jump address.
I suggest you can refer to the next link.
RT1060 OTA bootloader ISP and swap rollback usage - NXP Community
Wish it helps you.
BR
mayliu
Hi @mayliu1 ,
This is the SS of the Bootloader memory.ld file's memory region.
And below is the SS of our application memory region in memory.ld file;
this image shows that our application starts from 0x30200000 address in which we are trying to place our application's custom header of 64B. After this from address location 0x30200040 our application program will start.
Above image shows the header section we have created in the debug.ld file.
APP jump address: 0x30200040
Hi @darshanmk
Question:The default boot header (which includes boot data, IVT, DCD,...) in the Bootloader is unchanged. But we understood that, adding the same default boot header for the application is not required. Correct us if our understanding is wrong.
Answer: Yes, Application not not need the header.
I checked your application address, I think the addresses that I have boxed in the picture should all be the same.
#define APP_IMAGE_START_ADDRESS 0x30200000
For example, you set application address as APP_IMAGE_START_ADDRESS , then the jump address should be following code shows (It's only for demo verification. For the actual project, it needs to be in accordance with your design requirements. ).
farewellBootloader = (void (*)(void))(APP_IMAGE_START_ADDRESS + 4);
Please try it. I'm looking forward to your good news.
BR
mayliu
Hi @mayliu1 ,
Thanks for the response. I tried the changes mentioned by you and now I'm able to jump to the application from bootloader to our application starting address 0x3020_0000. I want to know if both __base_BOARD_FLASH and __base_Flash is of same address, how they are different from each other? Please clarify regarding these addresses.
Also based on requirement changes, now I tried to start my application from location 0x3020_0040, but the VTOR register is not updating with this location. I did the necessary changes in the memory linker file. I attached the SS of the changes I did for the new requirement.
Please help me with the issue.
Hi @darshanmk
Thanks for your update information.
The MCUXPresso IDE will automatically generate the debug_memory.ld file.
You can change Flash, Ram size in this window.
I think this method is more reliable.
Wish it helps you.
If you still have question about it, please kindly let me know.
BR
mayliu