How to merge a MPC5748G bootloader into a S32 IDE App project

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

How to merge a MPC5748G bootloader into a S32 IDE App project

1,507 Views
barkly_lin
Contributor III

Hi

I working on creating a bootloader project, and a App project in S32 DS.

Both of projects are working individually, but now I have to combined them into flash memory.

Here is my procedure:

Bootloader project creates a *.bin file.

001.jpg

Then I merge *.bin file into APP project.

002.jpg

link file just looks like this, how to add bootloader's reset vectors and bootloader.bin?

003.jpg

Anyone can provide example to modify link file?

Thanks,

0 Kudos
4 Replies

1,179 Views
chengxueyuan021
Contributor II

Hi,

I working on creating a bootloader project, but I have a problem。

Here is my procedure:

could share you bootloader and Application(demo)source code to me.

0 Kudos

1,179 Views
barkly_lin
Contributor III

Hi Xueyuan

My original design is creating bootloader & App in different projects, then merge bootloader elf/bin/srec into App's project, which means bootloader & App are allowed to be flashed into MPC5748G by S32 DS IDE at the same time.

bootloader is also allowed to update Apps F/W via other I/F such as serial etc...

So my first priority concern is that how to add bootloader & App reset vectors in just one linker file(MPC5748G_flash.ld)?

Does it make sense?

0 Kudos

1,179 Views
barkly_lin
Contributor III

In App, there are Boot header and cpu vectors define like this:

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

The boot sequence is:

bootloader cpu reset vectors -> bootloader main() jump to -> App's cpu reset vector -> App's main()

To merger bootloader elf or bin (whatever) into App project, how to ensure that bootloader's bootheader and reset vectors also put in the right place?

0 Kudos

1,179 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

with raw binary file it is bit harder to add it on proper address - I tried find solution, but no success yet. The easiest way is use bootloader .srec file (or .elf) as an additional elf in debug configuration: 

pastedImage_1.png

Jiri

0 Kudos