Hi,
Could you help me analyze the problem?
when I change《linker_flash_s32k312.ld》, "int_sram" start address and length, compile is successful, then debug, but jump to "HardFault_Handler".
platform: s32ds v3.4
RTD version: RTD 2.0.0
example name: FreeRTOS_Toggle_Led_Example_S32K312
before change:
after change:
console display:
s32k312 SRAM is 96KB, so it's not out of range.
before change, the int_sram size is 32KB, after change, the int_sram size is 64KB.
I tried to change to other size, but it is the same.
please help analyze the problem, thank you very much.
This may be because the configuration of the MPU has not been changed accordingly
By default, the MPU is configured and enabled in system.c. If you only modify the linker file, it may cause such an error.
My understanding is that it is related to the register S32_MPU->RNR / RBAR / RASR.
But I can't find how to configure these registers.
Could you help me configure these registers? or tell me how to configure?
there is detail description of S32_MPU register in the link below.
and you can refer to the default settings of S32_MPU in S32K3 startup code.