I am trying to update linker so that my application can be used with uds bootloader 2.0.0. However whenever i make changes in linker the application boot fails. My question here is what is right sequence / steps to modify linker for bootloader.
I have few question with linker and system MPU, what is purpose of following code, and how does it behave when application Address is modified,
system.c
.
.
.
/* Program flash */
rbar[14]=(uint32)((uint32)__ROM_CODE_START + 0x400000UL);
#if defined(S32K396) || defined(S32K394)
rasr[14]=0x070B0029UL; /* Size: import information from linker symbol, Type: Normal, Inner Cache Policy: Inner write-back, write and read allocate, Outer Cache Policy: Outer write-back. write and read allocate, Shareable: No, Privileged Access: Read-Only, Unprivileged Access: Read-Only */
#elif defined(S32K358) || defined(S32K388) || defined(S32K328) || defined(S32K338) || defined(S32K348)
rasr[14]=0x070B002BUL; /* Size: import information from linker symbol, Type: Normal, Inner Cache Policy: Inner write-back, write and read allocate, Outer Cache Policy: Outer write-back. write and read allocate, Shareable: No, Privileged Access: Read-Only, Unprivileged Access: Read-Only */
#else
rasr[14]=0UL;
#endif
Why is int vector is moved from int_sram_no_cacheable in RTD2.0 to int_dtcm section in RTD3.0, does this need to be modified for bootloader?
.int_vector :
{
. = ALIGN(2048);
__interrupts_ram_start = .;
. += __interrupts_init_end - __interrupts_init_start;
. = ALIGN(4);
__interrupts_ram_end = .;
} > int_dtcm
Are there any migration steps for UDS on RTD3.0?
Hi @jerryrig
There are demo applications available that showcase the usage of the Bootloader Jump to Application using RTD Version 3.0.0. I suggest reviewing these, as they are for a different device but could serve as a good starting point and reference for your application.
Example S32K312 Bootloader to Application Jump DS3.5 RTD300
Example S32K324 Bootloader to Application Jump DS3.5 RTD300
Additionally, for a better understanding of the MPU's register usage, please refer to the Arm Cortex-M7 documentation.
MPU Region Base Address Register
Could you also clarify the changes made to the origin address and size of the int_pflash?
BR, VaneB
This is screenshot of project after modifying flash address in linker in RTD3.0.0. I have also attached the linker file.