Loading Simulink Code with S32DS.Power Does not work Unless the New Code is Very Different from Exis

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

Loading Simulink Code with S32DS.Power Does not work Unless the New Code is Very Different from Exis

Jump to solution
1,729 Views
ranulf
Contributor IV

Loading Simulink code with S32DS.Power Does not work Unless the New Code is Very Different from Existing Code

Using S32 Design Studio for Power Architecture and a debugger to load Simulink code onto MPC5777C is much faster than using the bootloader and USB Serial, especially if the application is large. A problem I have had using the debugger is that if the new application that I want to load is not different enough from the application that is on the chip then S32DS concludes that they are the same and will not load the new application and the following message appears in the console:

"Checksum Verification Successful. (Cumulative CRC-16=$C330) Application verified in memory. No need to reprogram. "

I know for certain that the new application and the existing application had small differences, such as differences in parameter values. As a work-around, I first load an application that I know is very from the existing application and then I load the application that I actually want on the chip.

Is there any way to force S32DS to load a new application even if it thinks it is the same as the existing application, or, is there a way to convince S32DS that the new application is actually different from the existing application?

0 Kudos
1 Solution
1,711 Views
ranulf
Contributor IV

I think the flashing algorithm that I used was incorrect. I used the algorithm that needs to be used when loading the bootloader as discussed on the thread on this site titled "Unable to Flash MBDT BootLoader to RDVCU5775EVM in S32DS per Quick Start Guide". That algorithm is "nxp_mpc5777c_1x32x64k_eeprom.pcp" I switched over to the default algorithm and since then loading Simulink code through the debugger has worked as expected. The default algorithm has a name like "nxp_mpc5775b_1x32x1024k_cflash_highspeed.pcp". The name will vary with the chip.

View solution in original post

4 Replies
1,696 Views
ranulf
Contributor IV

I think I need to retract my previous comment about the old default flashing algorithm. The application on the board restarts most of the time (after using the default flashing algorithm) if I leave the power off for 30 sec or more before turning the board back on. I think there are some sizeable capacitors on the board.

0 Kudos
1,712 Views
ranulf
Contributor IV

I think the flashing algorithm that I used was incorrect. I used the algorithm that needs to be used when loading the bootloader as discussed on the thread on this site titled "Unable to Flash MBDT BootLoader to RDVCU5775EVM in S32DS per Quick Start Guide". That algorithm is "nxp_mpc5777c_1x32x64k_eeprom.pcp" I switched over to the default algorithm and since then loading Simulink code through the debugger has worked as expected. The default algorithm has a name like "nxp_mpc5775b_1x32x1024k_cflash_highspeed.pcp". The name will vary with the chip.

1,702 Views
ranulf
Contributor IV

Using the default flashing algorithm I was able to load and run code onto a board with an MPC5777C chip. However, it would not resume running after a power-cycle of the board. @mariuslucianand It looks like we still have problems with the flashing algorithm for the MPC5777C. The new one, used to load the Simulink bootloader appears to have broken checksum code. (See discussion above.) The old default flashing algorithm results in the application not restarting after power-cycle!

0 Kudos
1,650 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @ranulf 

I'm sorry for my delayed response.

For the flashing algorithm, you are right: for the generated elf file, the default flashing algorithm needs to be used, while the RappID bootloader requires a different one, as specified by you above.

I am not quite an expert in S32DS but I might have a solution for the case with the default flashing algorithm and not booting after reset. My idea is to change the linker file to not include the boot information required by the RappID bootloader.

To do so, please add the attached linker file in the window opened by typing the following command in MATLAB's command window winopen(fullfile(mbd_find_mpc_root, 'mbdtbx_mpc577x\src\linker\gcc'))

Then go to the model config block, uncheck the "Download code after build" option under Target Connection, then go to the Build Toolchain Tab.

uncheck the "Default Target Memory ..." and you should be able to see the new linker file under that option.

mariuslucianand_0-1642539705087.png

If the linker file option does not appear, try reopening the config block. If still, you are not able to see the newly added file, just replace the old one, but backup it before because without that one you will not be able to reuse the rapid bootloader again.

Let me know if this solved the reboot issue.

Hope this helps,

Marius

 

 

0 Kudos