s32k118 bootloader

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,980件の閲覧回数
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,839件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

... and the attachment...

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
3,841件の閲覧回数
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,840件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

... and the attachment...

0 件の賞賛
返信