LPC845 bootloader jump issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC845 bootloader jump issue

Jump to solution
692 Views
jtro
Contributor III

In my custom bootloader I'm not able to jump to application.

memory mapping:

0x0 to 0x8fff - bootloader

0x9000 - 0x9ffff - firmware

bootloader Code:

void boot_jump(uint32_t address)

{

// below assembly code gives error in mcuxpresso

//     __asm(
//            LDR SP, [R0]        //;Load new stack pointer address
//            LDR PC, [R0, #4]    //;Load new program counter address
//          );

//alternate function for jump

    asm("bx %r0");

}

void main()

{

            for(uint8_t irqn=0; irqn < 32; irqn++)
            {
                NVIC_DisableIRQ(irqn);
                NVIC_ClearPendingIRQ(irqn);
            }

            SCB->VTOR = 0x9000 & 0x1FFFFF80;

            boot_jump(0x9000 );

}

Labels (1)
Tags (1)
0 Kudos
1 Solution
545 Views
soledad
NXP Employee
NXP Employee

Hi, 

Please check the following thread and let me know if this helps, 

https://community.nxp.com/thread/494497 

Have a nice day!

Regards 

Sol 

View solution in original post

1 Reply
546 Views
soledad
NXP Employee
NXP Employee

Hi, 

Please check the following thread and let me know if this helps, 

https://community.nxp.com/thread/494497 

Have a nice day!

Regards 

Sol