For the security reason, I must divide BootLoader into Boot + Loader in S32K144 CPU.
The Boot is stored in PFLASH. If Application is needed to update, First Boot receive the Loader.
Then Loader is Running in RAM and receive the Application and Program Application to PFLASH.
Can anyone tell me how to do that?
Can anyone share the project?
Thanks.
Solved! Go to Solution.
Hi,
you can use - for example - C library function - memcpy() - Tutorialspoint . Or you can write data from one address(array) to your target address(array) in loop. In attachment is memcpy example. There is constant data array (in your case you will copy data probably from UART buffer) and pointer into unused RAM (see modified linker file).
When you copy your data into RAM - you use pointer to function for calling it.
Jiri
Hi,
if I understand it correctly - you like to have one bootloader which can receive Flashing algorithm from UART (for example) and store it in RAM. When done - BL will receive application and will call flashing algorithm from RAM to store app in the PFlash. Am I correct?
Unfortunately there is no such example. But technically there is nothing special about it. Your BL needs to first receive app for Flashing -> store it in RAM -> receive parts of target app -> call Flashing algorithm from RAM to store received app parts into PFlash.
Jiri
Hi Jiri,
Yes, you are right.
My issue is: How to store the Flashing algorithm in RAM.
Pls give me instruction.
Of course, if you can give me a demo, it is much appreciated.
Thanks.
Hi,
you can use - for example - C library function - memcpy() - Tutorialspoint . Or you can write data from one address(array) to your target address(array) in loop. In attachment is memcpy example. There is constant data array (in your case you will copy data probably from UART buffer) and pointer into unused RAM (see modified linker file).
When you copy your data into RAM - you use pointer to function for calling it.
Jiri
Yes, your suggestion is well done.
Thanks you.