s32k312 boot failed after modify memory map in linked script

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

s32k312 boot failed after modify memory map in linked script

511件の閲覧回数
victory
Contributor IV

Hi Nxp,

   i need to modify ld file since the application ram usage exceeded. i mainly expand the int_sram size as followed. then the app failed to init and debug is abnormal , stucked, see attached image. could you give some advice what's wrong i've made.

i only change the MEMORY section  as below:

MEMORY
{
int_pflash : ORIGIN = 0x00400000, LENGTH = 0x001D4000 /* 2048KB - 176KB (sBAF + HSE)*/
int_dflash : ORIGIN = 0x10000000, LENGTH = 0x00020000 /* 128KB */
int_itcm : ORIGIN = 0x00000000, LENGTH = 0x00008000 /* 32KB */
int_dtcm : ORIGIN = 0x20000000, LENGTH = 0x0000F000 /* 60KB */
int_stack_dtcm : ORIGIN = 0x2000F000, LENGTH = 0x00001000 /* 4KB */
int_sram : ORIGIN = 0x20400000, LENGTH = 0x00007F00 /* 32KB , needs to include int_sram_fls_rsv*/
int_sram_fls_rsv : ORIGIN = 0x20407F00, LENGTH = 0x00000100
int_sram_no_cacheable : ORIGIN = 0x20408000, LENGTH = 0x00007F00 /* 32KB , needs to include int_sram_results */
int_sram_results : ORIGIN = 0x2040FF00, LENGTH = 0x00000100
int_sram_shareable : ORIGIN = 0x20410000, LENGTH = 0x00008000 /* 32KB */
ram_rsvd2 : ORIGIN = 0x20418000, LENGTH = 0 /* End of SRAM */
}

-- my new settings-------
MEMORY
{
int_pflash : ORIGIN = 0x00400000, LENGTH = 0x001D4000 /* 2048KB - 176KB (sBAF + HSE)*/
int_dflash : ORIGIN = 0x10000000, LENGTH = 0x00020000 /* 128KB */
int_itcm : ORIGIN = 0x00000000, LENGTH = 0x00008000 /* 32KB */
int_dtcm : ORIGIN = 0x20000000, LENGTH = 0x0000F000 /* 60KB */
int_stack_dtcm : ORIGIN = 0x2000F000, LENGTH = 0x00001000 /* 4KB */
int_sram : ORIGIN = 0x20400000, LENGTH = 0x00011000 /* 32KB , needs to include int_sram_fls_rsv*/
int_sram_fls_rsv : ORIGIN = 0x20411000, LENGTH = 0x00000100
int_sram_no_cacheable : ORIGIN = 0x20411100, LENGTH = 0x00006A00 /* 32KB , needs to include int_sram_results */
int_sram_results : ORIGIN = 0x20417B00, LENGTH = 0x00000100
int_sram_shareable : ORIGIN = 0x20417C00, LENGTH = 0x00000400 /* 32KB */
ram_rsvd2 : ORIGIN = 0x20418000, LENGTH = 0 /* End of SRAM */
}

0 件の賞賛
返信
3 返答(返信)

474件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @victory,

I just tested your configuration in an RTD 4.0.0 P24 project, but it works without any issues.

Can you share a test project here that can replicate it?

 

Regards,

Daniel

0 件の賞賛
返信

459件の閲覧回数
victory
Contributor IV
i found it maybe a MPU issue. MPU init function not updated with the linked file. so it got a permission problem.
0 件の賞賛
返信

447件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @victory,

In that case, you should see a MemManage fault exception in the Configurable Fault Status Register (CSFR).

The base address of any MPU region must be aligned to the size of the region, it was discussed here:

https://community.nxp.com/t5/S32K/S32K3xx-RTD-default-MPU-implementation-causes-problems-seems/td-p/...

 

BR, Daniel

0 件の賞賛
返信