s32k118 bootloader

cancel
Showing results for 
Search instead for 
Did you mean: 

s32k118 bootloader

Jump to solution
507 Views
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

Labels (1)
0 Kudos
1 Solution
369 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

... and the attachment...

View solution in original post

0 Kudos
2 Replies
369 Views
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 Kudos
370 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

... and the attachment...

View solution in original post

0 Kudos