I have been working on the firmware upgrade process for the S32K144 microcontroller. The memory architecture includes a bootloader and two applications, App1 and App2.
Here is what I have done so far:
- App1 is mapped to start at 0x11000 and App2 starts at 0x42000 in the linker file.
- I have successfully created individual HEX files for both applications, and they download and jump to their respective addresses (0x11000 for App1 and 0x42000 for App2).
Now, I am creating a single HEX file for both applications, starting at address 0x11000. When I download it at 0x11000, it downloads and jumps to the correct address. However, when I download the same HEX file at 0x42000, it successfully downloads but does not jump to 0x42000. Instead, it still jumps to 0x11000.
This issue seems to be related to the vector table. Before jumping to 0x42000, the SP and PC values are updated to 0x42000 but still it not jumps.
Let me know if this use case is possible and what changes are required.