Hello everyone !
Rencently I‘m learning Bootloader , when I run the bootlaoder and have download the other application,
I want to run the other application ,but I can't realize it.
Bootlaoder Lcf :
Application Lcf
And t I use "app_entry (); " to change bootlaoder to application :
#define APP_StartAddr (*(uint32_t*)0x00004004)
void app_entry(void)
{
(*(void (*)(void))(APP_StartAddr))(); /*run the function via function pointer convert with a certain address*/
while(1); /*stop here for anyhow*/
}
Really hope someone can give me some help !
Thank you for your answer. I have realized run application through application start address in MCU " MPC5744P "by
the way as you tell me . But I do not realize it in the MCU "MPC5634m" ,when Bootloader run "app_entry()" , the MCU is reset.
Do you know whether mpc56xx can change into other application through application start address when Bootloader is running ?
Hi,
Can I make friend with you? I recently use MPC5744P to develop bootloader. My qq:1931181009.
Maybe you should change the address to 0x4000 instead of 0x4004
If that didn't work for you then this should do the job:
First define a typedef for the app_entry function as follows:
typedef void (* TAppEntry)(void);
Then you just have to declare the app_entry of that type and set the address value
TAppEntry app_entry = (TAppEntry) (*((unsigned int *) 0x00004004));
and then call the function simply
app_entry();