AnsweredAssumed Answered

MPC5748G jump address from bootloader to App

Question asked by Barkly Lin on Jul 25, 2018
Latest reply on Aug 1, 2018 by Christopher Holland

Hi

I got a bootloader, and application, try to jump from bootloader/main() to application.

What jumping address is correct?

Here is detail configuration of my test environment:

My bootloader:

MEMORY
{

flash_rchw : org = 0x00FA0000, len = 0x4
cpu0_reset_vec : org = 0x00FA0000+0x10, len = 0x4
cpu1_reset_vec : org = 0x00FA0000+0x14, len = 0x4
cpu2_reset_vec : org = 0x00FA0000+0x04, len = 0x4

m_text : org = 0x1000000, len = 1024K
m_vectors_ram : org = 0x40000000, len = 0xC00
m_data : org = (0x40000000+0xC00), len = 768K-0xC00
}

My application:

MEMORY
{

flash_rchw : org = 0x00FA4000, len = 0x4
cpu0_reset_vec : org = 0x00FA4000+0x10, len = 0x4
cpu1_reset_vec : org = 0x00FA4000+0x14, len = 0x4
cpu2_reset_vec : org = 0x00FA4000+0x04, len = 0x4

m_text : org = 0x1100000, len = 2048K
m_vectors_ram : org = 0x40000000, len = 0xC00
m_data : org = (0x40000000+0xC00), len = 768K-0xC00
}

Then I flash both ELF file into flash like this

Flashing 2 ELFs includes bootloader and application

Now I add jump funciton in bootloader's main() as below:

//Jump to Flash/boot header : 0x00F04000
asm("e_lis %r12,0x00FA");
asm("e_or2i %r12,0x4000");
asm("mtlr %r12");
asm("se_blrl");

 

Why it does not work? Is jumping address 0x00FA4000 wrong?

Thanks in advance.

Outcomes