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.
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.
Q2) How can i jump to bootloader after reset?
Thank you.
Best Regards.
MinYeop
Solved! Go to Solution.
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:
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