s32k118 bootloader

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

s32k118 bootloader

跳至解决方案
3,973 次查看
myna
Contributor III

Hello. nxp team

I want to use bootloader at D-Flash(0x10000000) of s32k118 below picture.

but i don't know how to modify linker file for bootloader.

pastedImage_1.png

Q1) could you please let me know how to modify linker file for bootloader?

I modified it like below linker file. 

MEMORY
{
/* Flash */
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
m_text (RX) : ORIGIN = 0x10000000, LENGTH = 0x00004000 /* 0x4000 = 16kB for Bootloader */

/* SRAM_L */

/* SRAM_U */
m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x000030C0
m_data_2 (RW) : ORIGIN = 0x200030C0, LENGTH = 0x00002740
}

but bus error occured.

pastedImage_4.png

Q2) How can i jump to bootloader after reset?

Thank you.

Best Regards.

MinYeop

标签 (1)
0 项奖励
回复
1 解答
3,832 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

... and the attachment...

在原帖中查看解决方案

0 项奖励
回复
2 回复数
3,834 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

1. Your linker file is correct. I did quick test on my board and it works as expected. I just changed m_text like this:

pastedImage_1.png

Make sure you have the latest SW update of your debugger. I will attach my simple script I used for programming.

2. Bootloader should occupy reset vector at address 0x4, so it's always executed after reset. You can check this application note to see how to jump to user application:

https://www.nxp.com/docs/en/application-note/AN12218.pdf 

https://www.nxp.com/docs/en/application-note-software/AN12218SW.zip 

Regards,

Lukas

0 项奖励
回复
3,833 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

... and the attachment...

0 项奖励
回复