Hi.
I have been studying about reset and boot, flash in MPC5748G.
Because, I have to make a project which updates Application Project.
I tried to express my concept with that picture..
I call project A boot loader project (but i think update project or some another name is more suitable)
and project B is application project.
How does it work
:
1. Power on
2. Project A excuted
2. Project B is ongoing
3. Update event occurred
4. Reset with some reset reason flag which presents update event occurred
5. Project A is updating project B
6. Project B is on going(go to 2.)
================================================================= background
Question
:
1. In RM,57.7.1 what do BAF code entry point and exit point mean?
I need to understand this
2. In Figure 57-1, when i turned on or reset the board,
this flow is always executed? every time?
so the only one can initialize cores is BAF?
3. How can I generate reset with code safely?
(If there is available place to store reset reason, will be the best for me...)
Thanks
Best regards
Phillip
Solved! Go to Solution.
Hi Phillip,
1. If you want to use original bootloader with no modifications, you can just load the elf file of the bootloader to the flash using S32 Design Studio. Here you can find how to do it:
If you want to modify the bootloader, either use Green Hills IDE or create new project in S32DS and port the code.
2. The only thing to do is to create boot header at one of defined locations (already mentioned before):
BAF searches for valid boot header after reset and then it simply reads the reset vector and jumps to this address.
If you create new project in S32DS, this is already done. Just search for flashrchw.c file. And see also linker file to see where the values are placed.
Regards,
Lukas
Hi Phillip,
first, I think that this application note could help you:
https://www.nxp.com/docs/en/application-note/AN5319.pdf
https://www.nxp.com/docs/en/application-note-software/AN5319SW.zip
To answer your questions:
1. BAF is automatically called by SSCM module after reset. The entry and exit point addresses are rather informative details, this is managed internally.
2. Yes, the flow is the same.
3. Take a look at https://community.nxp.com/t5/MPC5xxx/MPC5748-software-reset-command/td-p/653785
Table 57-3 in the RM is important for you. This table shows which addresses are then used by BAF to search for user's boot header. This is the starting point for you.
Regards,
Lukas
Thank you for explanation.
Actually, I have taken a look the AN5319 pdf and sw files.
And I wanted to download that sw to my board.
but I failed.
I think to do download that
,I need Green Hills IDE. (I am using s32 design studio for power architecture)
I need to know how to jump to place i intend after reset and boot...
I think there is some method in that an5319 sw. but i couldn't find it..
and the reason why I asked "what do BAF code entry point and exit point mean?"
was to find this method.
So,
1. How can I build and download the AN5319SW to my MPC5748G board with s32 studio?
2. How can I jump and execute code of specific address in Flash after boot and reset?
Thanks,
Best regards
phillip
Hi Phillip,
1. If you want to use original bootloader with no modifications, you can just load the elf file of the bootloader to the flash using S32 Design Studio. Here you can find how to do it:
If you want to modify the bootloader, either use Green Hills IDE or create new project in S32DS and port the code.
2. The only thing to do is to create boot header at one of defined locations (already mentioned before):
BAF searches for valid boot header after reset and then it simply reads the reset vector and jumps to this address.
If you create new project in S32DS, this is already done. Just search for flashrchw.c file. And see also linker file to see where the values are placed.
Regards,
Lukas
Thanks a lot.
Please have a look another question.
https://community.nxp.com/t5/MPC5xxx/MPC5748G-question-about-boot-vector/m-p/1211547#M17080