Use CAN boot loader to update the program,and the Application development using Simulink, but i don't know how to change the Flash address in simulink.
can you help me ?
S32K144 MBD 2.0 version
This is the mot file I created for the Simulink model, but the first address is 0x0000, and now I want to change this address.
I'm not use i understand your request.
So, for the moment, if you compile a Simulink model you are able to download that model/application to the target via RAppID_boolloader set to communicate via CAN with the device.
And now you want to change the flash memory layout for the Simulink model in order to have the application saved in flash at different addresses ? Is that what you want ?
Can you tell us the toolbox version you are using ?
I'm using my own CAN bootloader PC to send the Simulink file generated by mot. How can I download the ASCII code of the mot file to the specified FLASH address? If I are writing C code, I can change the flash.ld file in the compiler, but I don't know what Simulink does. Is the PC add a address offset before send?
Within Simulink form linker point of view is the same procedure as a normal C application written by hand.
Simulink generates the C-code and then the Compiler toolchain is invoked to generate the ELF and then the MOT file (that is is used by CAN bootloader).
We can modify the linker command file used by Simulink to any layout you want.
If you could tell me which toolbox version you use - i could then tell you the exact location of the linker command file (e.g. flash.ld) you need to change.
Ok, please have a look into this folder: ...MBDToolbox\mbdtbx_S32K\mbdtbx_s32k14\src\linker\
There you will find directories for each of the compilers supported.
When you invoke the Simulink Code Generation (build button) - the toolbox picks the default linker file from one of these folders (depending on the selections you have in the Simulink Model Configuration Block) and copy-paste it into the generated folder where is used by the Compiler/Linker to build the application.
You need to modify the default linker file in order to change the address in the final application.
Good luck and let us know if you manage to made it link.
yes,it is OK now,thank you very much!
Do you know the FLASH write/erase C code for MPC5744P?
Unfortunately, i do not have access to that code.
Perhaps you could ask on MPCxxx community if such code exists and available for download.
Retrieving data ...