Jump to Bootloader from Application by interchanging the vector, and also how to Flash in new vector

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Jump to Bootloader from Application by interchanging the vector, and also how to Flash in new vector

606 次查看
Nibesh
Contributor III

Hello,

@kerryzhou 

@Juan-Rodarte 

@xiaodong_zhang 

 

@petervlna 

@Rita_Wang 


Actually I am working on Bootloader of AN12218SW for S32K148 and S32K146 Evaluation Board. 
The Default Linker file for S32K146-Q144 is given below;

Bootloader

/* Flash */
 m_interrupts            (RX)  : ORIGIN = 0x00000000, LENGTH = 0x00000400

 m_flash_config        (RX)  : ORIGIN = 0x00000400, LENGTH = 0x00000010

 m_text                     (RX)  : ORIGIN = 0x10000000, LENGTH = 0x00002000

Application

/* Flash */

  m_interrupts            (RX)  : ORIGIN = 0x00001000, LENGTH = 0x00000400

  m_flash_config        (RX)  : ORIGIN = 0x00001400, LENGTH = 0x00000010

  m_text                      (RX)  : ORIGIN = 0x00001410, LENGTH = 0x000FFBF0

Actually,  we have interchanged the Linker vice versa, which is given below;

Application

/* Flash */

  m_interrupts            (RX)  : ORIGIN = 0x00000000, LENGTH = 0x00000400

  m_flash_config        (RX)  : ORIGIN = 0x00000400, LENGTH = 0x00000010

  m_text                     (RX)  : ORIGIN = 0x10000000, LENGTH = 0x00002000

Bootloader

/* Flash */

  m_interrupts            (RX)  : ORIGIN = 0x10001000, LENGTH = 0x00000400

  m_flash_config        (RX)  : ORIGIN = 0x10001400, LENGTH = 0x00000010

  m_text                     (RX)  : ORIGIN = 0x10001410, LENGTH = 0x000FFBF0


The following are the doubts points;
1. By interchanging the Vector We are trying to Flash the new application through Bootloader which start at 0x10001000.
2. we have use  0x00000000 Vector for Application.
3. Actually  Once we Reset our Micro-Controller, it is going to Application First, then if it receives any INPUT through LPUART it will jump to Bootloader Code. We are able to achieve this. We can easily Jump from Application to Bootloader through LPUART.

But after a Jump into Bootloader it has to perform Bootloader Function comm_download_app(); Which I am unable to Achieve. It is detecting the COM, we are able to Load the new .SREC File, it is completely loading but it is unable to Write and Flash with new .SREC file.

How we can resolve this issue. 

@kerryzhou,@Juan-Rodarte, @xiaodong_zhang@petervlna@Rita_Wang 


I hope to hear from you soon. 

0 项奖励
回复
1 回复

578 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@Nibesh

Please do not create the same topic repeatedly.

Please discuss it under this topic and I will close your case of repeated creation.

https://community.nxp.com/t5/S32K/Bootloader-and-Application-of-S32K148-amp-S32K146/td-p/1860220

0 项奖励
回复