S32K358 IPCF example runs into HardFault

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K358 IPCF example runs into HardFault

Jump to solution
1,575 Views
Iota
Contributor II

Dear community,

I am trying to get the IPCF examples for the S32K358 (bare metal or FreeRTOS) running but debugging of both cores runs into HardFault during initialization after calling ipc_queue_push. The console states the following:

core0:

MemManage: The processor attempted a load or store at a location that does not permit the operation.
Possible MemManage fault location: 0x2047F0DC.
HardFault: A fault has been escalated to a hard fault.

core2:

MemManage: The processor attempted a load or store at a location that does not permit the operation.
Possible MemManage fault location: 0x2042F0DC.
HardFault: A fault has been escalated to a hard fault.

The possible fault location seems to be somewhere in the configured remote_shm_addr range (IPCF_SHAREMEM_c0 and IPCF_SHAREMEM_c2 in the linker file).

I am just trying to get the example project running, there have been no changes done to the configuration and the error occurs in both, bare metal and FreeRTOS examples. Could you please help me out?

Tags (2)
0 Kudos
Reply
1 Solution
1,459 Views
nxf78987
NXP Employee
NXP Employee

Hello @Iota,

If you enable MPU then you have to set those area memory is "Local RW access, remote R access"

If you disable MPU then your program can run normally.

Best regards,

Dan

View solution in original post

0 Kudos
Reply
6 Replies
1,567 Views
Iota
Contributor II
Stack core0
 
IPCF_Example_S32K358_M7_0_0_Debug_FLASH_PNE [GDB PEMicro Interface Debugging]
IPCF_Example_S32K358_M7_0_0.elf
Thread #1 (Suspended : Signal : SIGTRAP:Trace/breakpoint trap)
HardFault_Handler() at exceptions.c:97 0x401e86
<signal handler called>() at 0xffffffe9
ipc_queue_push() at ipc-queue.c:150 0x400e86
ipc_buf_pool_init() at ipc-shm.c:511 0x401312
managed_channel_init() at ipc-shm.c:623 0x401312
ipc_shm_channel_init() at ipc-shm.c:708 0x401312
ipc_shm_init_instance() at ipc-shm.c:807 0x401312
ipc_shm_init() at ipc-shm.c:905 0x401312
shm_demo() at sample.c:196 0x401b86
main() at main.c:53 0x400e1a
C:\NXP\S32DS.3.5\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_5.5.7.202304031909\win32\pegdbserver_console
arm-none-eabi-gdb
Semihosting Console

 

Stack core2

IPCF_Example_S32K358_M7_0_2_Debug_FLASH_PNE [GDB PEMicro Interface Debugging]
IPCF_Example_S32K358_M7_0_2.elf
Thread #1 (Suspended : Signal : SIGTRAP:Trace/breakpoint trap)
HardFault_Handler() at exceptions.c:97 0x8015ca
<signal handler called>() at 0xffffffe9
ipc_queue_push() at ipc-queue.c:150 0x800626
ipc_buf_pool_init() at ipc-shm.c:511 0x800ab2
managed_channel_init() at ipc-shm.c:623 0x800ab2
ipc_shm_channel_init() at ipc-shm.c:708 0x800ab2
ipc_shm_init_instance() at ipc-shm.c:807 0x800ab2
ipc_shm_init() at ipc-shm.c:905 0x800ab2
shm_demo() at sample.c:193 0x8012ce
main() at main.c:30 0x8005be
arm-none-eabi-gdb
Semihosting Console

 

0 Kudos
Reply
1,508 Views
nxf78987
NXP Employee
NXP Employee

Hello @Iota,

what is the IPCF package you are using?

Could you send me your example?

Best regards,

Dan

0 Kudos
Reply
1,502 Views
Iota
Contributor II

Hello @nxf78987,

The version is SW32K3 IPCF 4.0.0 D2306; Version: 4.0.0; Build id: 202306301110.

I remember having a problem while building with the IPC_SHM_VENDOR_ID_C of the generated ipcf_Ip_Cfg which was 40 and didn't match the 43 of other files.

Please find the example attached.

Best regards,

Julius

0 Kudos
Reply
1,460 Views
nxf78987
NXP Employee
NXP Employee

Hello @Iota,

If you enable MPU then you have to set those area memory is "Local RW access, remote R access"

If you disable MPU then your program can run normally.

Best regards,

Dan

0 Kudos
Reply
1,447 Views
Iota
Contributor II

Hello @nxf78987,

thanks for the hint, I will give the first one a try.

However, for the second one, if you refer to the setting "Platform -> GeneralConfiguration -> Platform Enable MPU M7 Support", this box is unchecked in both IPCF examples and a MPU component is not used. But still the program could not run normally. Or do you refer to another setting that I am not aware of?

Thank you and best regards,

Julius

0 Kudos
Reply
1,440 Views
nxf78987
NXP Employee
NXP Employee

Hello @Iota,

You can right-click on the name of the project and select "Properties". After that, you can see the compiler option "MPU_ENABLE" in the below image. You can remove it or change it to "MPU_DISABLE".

nxf78987_0-1698317512386.png

Best regards,

Dan