MPC5744P OTA and ROLLBACK

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

MPC5744P OTA and ROLLBACK

1,147 Views
283230333
Contributor III

The MCU we use is the MPC5744P. We are now doing the OTA function, which is to remotely update the controller's software through the T-box. Now the controller needs to have a rollback function. Do you have a recommended rollback solution?

The solution we hope is that flash is divided into two areas, A/B. When the program runs in the A area, the new program is updated to the B area, and when the controller is powered on again, the BootLoader switches the boot flag from the A area to the B area. When the program runs in the B area, the new program is updated to the A area. When the controller is powered on again, the BootLoader switches the boot flag from the B area to the A area. If the program update fails, the boot flag can be switched back to the old area to implement software rollback.

However, the problem with the above scheme is that after the software is compiled, the addresses of variables and functions are fixed. The same software, if compiled in the A area, the address must be located in the A area. If this software is updated to the B area at this time, it will definitely go wrong. So is there any way to solve this problem?

Labels (1)
Tags (3)
0 Kudos
1 Reply

1,007 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I can see two solutions for this use case:

- first one at application level - don't allow updating of new firmware if previous firmware is not correctly updated. All updates must pass one by one.

- compile the applications as Position Independent Code. This would be nice solution but there were some issues in S32 Design Studio. I can remember a discussion with IDE experts that S32DS supported PIC mode only for libraries. If they tried to configure whole application project as PIC, there were still absolute jumps.

Regards,

Lukas

0 Kudos