S32k144 Firmware upgrade

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32k144 Firmware upgrade

1,087件の閲覧回数
stark21
Contributor II

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.

タグ(2)
0 件の賞賛
返信
3 返答(返信)

1,048件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @stark21 

You wrote:

"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."

 

If you load the same hex file to different addresses, it would have to be compiled as Position Independent Code. But according to your description, it's not compiled as PIC.

I know that PIC is supported by IAR compiler (it's also mentioned in our application note AN12323 S32K1xx Firmware updates). In case of S32DS it's not so straightforward. You can take a look at this article:

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32K144-Position-Independent-C...

Read also the comments below.

Another option is to have the same application compiled for both addresses. Then just pick up the right image when loading new application to certain slot.

Regards,

Lukas

0 件の賞賛
返信

998件の閲覧回数
stark21
Contributor II

Hi Lukas,

We reviewed the article you mentioned, but the information provided seems to be insufficient. Could you please share any additional documentation or articles that outline the correct steps to follow in the case of S32DS?

Thank you

0 件の賞賛
返信

922件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Could you please ask in this forum?

https://community.nxp.com/t5/S32-Design-Studio/bd-p/s32ds

I have never tried this but S32 Design Studio experts should be able to provide more help. Thank you.

0 件の賞賛
返信