S32k322 Linker File Memory Segregation Issue triggers Hardfault

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32k322 Linker File Memory Segregation Issue triggers Hardfault

627 次查看
Lisha
Contributor III

Hii,

I am facing an issue in my linker file. As soon as I add a section under int_flash_safeos_c0 and I enabled the MPU (Memory Protection Unit) and divided it into two sections: OsROM and OsRAM. When using it, I encounter a HardFault.  I encounter a HardFault on the S32K322 in S32 Design Studio. I am not sure why this is happening. I have attached the Linker here.

 

Thanks,

Lisha

0 项奖励
回复
1 回复

599 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Lisha,

I understand this is a MemManage fault.

You should be able to find the memory address and the PC address of the fault instruction, refer to these documents:

https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K312-HARDFAULT-Handling-Interrupt-DS3-5-...

https://community.nxp.com/t5/S32K-Knowledge-Base/How-To-Debug-A-Fault-Exception-On-ARM-Cortex-M-V7M-...

https://community.nxp.com/t5/S32K-Knowledge-Base/Fault-handling-on-S32K14x/ta-p/1114447

 

Anyway, this is caused by the MPU that is configured in system.c

Please check the starting address, size and all the attributes of each descriptor.

 

Regards,

Daniel

 

0 项奖励
回复