MPC5748G Bootloader and RappID Utility

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5748G Bootloader and RappID Utility

2,380件の閲覧回数
Bobkat
Contributor II

Hi,

I've been tasked with developing a bootloader for the MPC5748G and in my research have come across the RAppID BL Tool. This would be ideal for my purposes.

In the tool, there's a MCU Setup Group and I can select the MPC5748G option from here. However, there's also a BAM Setup group and I get a 'Flash MPC5748G.rbf Manually. BAM Setup has no effect" message. As far as I'm aware there's no BAM in the MPC5748G and has a BAF instead.

Looking at the BAF section in the manual it states, 'if no boot header is found in internal flash memory, it downloads application code serially using the LINFlexD module'. 

My questions are..

1. Do I need to flash the MPC5748G.rbf file or do I just need to specify the application file with Start Address, Code Size range etc?

2. If I need to flash the MPC5748G.rbf file, is this stored in flash or RAM, i.e. is it stored permanently?

3. Does the tool erase the boot headers automatically or is there another step involved?

I apologise if this is elementary stuff. This is my first attempt at developing a bootloader and would be most grateful for any help you can provide me with.

Best regards

Rob

0 件の賞賛
返信
7 返答(返信)

2,377件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Rob,

in case of MPC57xx devices, Rappid works as a flash resident bootloader only. That means it is necessary to load RBF file to flash via JTAG at the beginning.

Serial boot mode (using BAM module) was used only on MPC56xx devices. Here it was possible to program also blank chip.

It was discussed here several times, for example this thread provides a lot of details:

https://community.nxp.com/t5/MPC5xxx/MPC5748G-Firmware-Upgrade-Utility/m-p/602638

Regards,

Lukas

0 件の賞賛
返信

2,372件の閲覧回数
Bobkat
Contributor II

Hi Lukas,

Thanks for the information.

I'm currently trying to get a bootloader/application pair to link as a single .elf file for the MPC5748G. 

There's a few issues that I'm a little confused about and would be very grateful if you could provide any guidance with regard to them.

The plan is to always boot the bootloader and then jump to the application if a specific CAN message hasn't been received in the first 10-20 seconds. If a valid CAN message is received, I would then proceed to download the image (via CAN), before erasing the flash memory allocated to the application. 

In your 'Serial Bootloader for MPC5748G' document (AN5319), it says that the flash drivers should be copied to RAM before erasing the flash to avoid any conflicts. Is this mandatory, or can the bootloader take care of the erase by residing in a different partition, e.g. bootloader loaded at partition 9 and application at partitions 6,7 and 8 for instance?

The other main query relates to RAM and whether I need to allocate a seperate Heap and Stack for the bootloader and application as well as seperate RAM sections, i.e. .data, .rodata, and .bss sections? 

Again, any help you can provide would be most appreciated.

Many thanks

Rob

0 件の賞賛
返信

2,365件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Rob,

yes, depending on layout of your application(s) and bootloader, you can take an advantage of more partitions and run the code from another partition. No problem here.

Regarding RAM: it depends. Based on your description, it looks like either bootloader or application will run at a time. Not at the same time. So, those are completely independent applications and those will never use RAM at the same time. In this case, both bootloader and application can use whole RAM.

Another use-case is if you use something like OTA A/B swap when application is still running from "active slot" and bootloader running on background (for example on another core) loads data from somewhere and programs it to flash to "passive slot". In this case, it's obviously necessary to be careful here and allocate separate memory segments for application and bootloader.

Regards,
Lukas

PS. Please notice that my next answers may be delayed due to summer vacations in our team.

0 件の賞賛
返信

2,332件の閲覧回数
Bobkat
Contributor II

Hi Lukas,

Have been trying to port the serial bootloader outlined the application note (AN5319) to S32DS but can't get the bootloader to fit into into the two 16KB code blocks (0x00F8_C000 – 0x00F8_FFFF and 0x00F9_0000 – 0x00F9_3FFF that is described.

Using S32DS with just the basic drivers  (based on the S32DS Linflex Example), the smallest I can get the code is approximately 200KB (release).

Is this a function of the compiler (Greenhills vs GCC) or am I missing something obvious?

Best regards

Rob

 

 

0 件の賞賛
返信

2,327件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Rob,

that sounds like unreasonable value for such application. Could you share the map file?

Thanks,

Lukas

0 件の賞賛
返信

2,322件の閲覧回数
Bobkat
Contributor II

Hi Lukas,

Please ignore the last post... been a bit of dunderhead.

Sorry for troubling you.

Best regards

 

Rob

0 件の賞賛
返信

2,362件の閲覧回数
Bobkat
Contributor II

HI Lukas,

Thanks very much for the information and the prompt reply.

Enjoy your holidays.

Many thanks

Rob

0 件の賞賛
返信