Boot a RomImage

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

Boot a RomImage

2,129 Views
admin
Specialist II
Hi to everybody,
 
    i work with a MPC5200 and a hardware similar to a Lite5200B evaluation board. I'don't use  a operativ system but only the Quickstart tool included with CodeWarrior for mobilegt 9.2.
   I've done a standalone application that is able to load on external ram a RomImage of a project. At this point i've only to let the romimage start in the correct way. i'm not skilled in assembly but i tried so:
 

asm Fork(void)
{
  lis      r3,0x0010
  addi     r3,r3,0x0000
  mtlr     r3 
  frfree
  blr
}
 
By calling this function if the starting address of romimage is 0x00100000 it sholud work as on subroutine exit the PC register is loaded with that value.
But i've problem...
Has anybody any ideas?
hi everybody
 
 
Labels (1)
0 Kudos
4 Replies

580 Views
admin
Specialist II

Hi to everybody,

 

I solved! I've done a bootloader that load on external ram a ramdebug.mot of a project.

I think if i had to use a romimage.mot i should load it in flash instead i use a ramdebug.mot and i've to load it in ram.

 

Conan

0 Kudos

580 Views
stanish
NXP Employee
NXP Employee
Hi conan,

Not sure I understand your issue.
I assume the ROM Image project should include all the necessary startup code executed before main() is called. This startup code inits stack, globals, small memory area registers...etc. so the ROM image should run without need to add any assembler routine.

Note:
Start ROM Image address usually doesn't match with default entry point.

If I missed the point please describe your problem more in detail.

Stanish
0 Kudos

580 Views
admin
Specialist II

Hi,

   i think that simply i 'd need some documents about how romimage.mot and ramdebug.mot in my environment are build, is there anyone that has some links?

 

 

Hi everybody

0 Kudos

580 Views
admin
Specialist II
Hi Stanish,
 
   yes i  think the rom image i have will include all the required initialitation code but i have to put it in the right part of the external Ram and then i have to let it start. My BootLoader (made by me) can copy the romimage in the Ram and now i've to let it(rom image) start, I though a simply idea was to put in the ProgramCounter register the address of the first byte of romimage. But if you say "Start ROM Image address usually doesn't match with default entry point" may be that problem is this.
 
Do you have any idea?
conan
0 Kudos