AnsweredAssumed Answered

Bootloader for MPC5606S in RAM without BAM

Question asked by maksim gusev on May 15, 2017

Hello! I want to load a bootloader in a RAM memory without BAM (because i don't have an access to ABS pin).

I have a bootloader project created as a RAM application and a user application that run from FLASH.  How i may load boootloader code in a RAM? May i simple copy data from bootloader binary file to start address of RAM through bootloader_buffer_in_ram and then call code from listing 2 without reset? Else what i must to do for start program from RAM start address after reset?

 

listing 1

internal_ram: org = 0x40000000, len = 0x00007000
bootloader_buffer_in_ram: org = 0x40007000, len = 0x00000800
exception_handlers: org = 0x40007800, len = 0x00001000
heap : org = 0x40008800, len = 0x00002000
stack : org = 0x4000A800, len = 0x00001800

 

listing 2
/* load address of reset vector of user application from 0x0001_0004 */
lis r3,0x4000
ori r3,r3,0x0004
lwz r3,0(r3)
/* move address to link register */
mtlr r3
/* branch link register - start the bootloader application */
blrl

 

listings are from https://community.nxp.com/servlet/JiveServlet/download/2021-329070-427962-279359/bootloader.zip  (https://community.nxp.com/message/881418?q=bootloader)

Outcomes