[S32DS 3.4] malloc function call jumps to Hard-fault handler

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

[S32DS 3.4] malloc function call jumps to Hard-fault handler

749 Views
namnguyenviet
NXP Employee
NXP Employee

Hello guys,

I'm having trouble with malloc function call while creating a sample project for S32G M7_0 core in S32DS 3.4, as the malloc call has jumped to an exception. Here is my snippet code:

Clock_Ip_Init(&Mcu_aClockConfigPB[0]);
Power_Ip_SetMode(&Power_Ip_aModeConfigPB[0]);
ddr_init();

p = (void *)malloc(100);

free(p);

During debugging, I have seen that the exception occurred while malloc was trying to write to DDR (0x68A00010), however the DDR wasn't initialized yet, so I have tried to initialize the DDR, but the issue was the same. 

Is there anything so far that could be the root-cause? 

Best Regards,

Nam

 

1 Reply

727 Views
bpe
NXP Employee
NXP Employee

All support to S32G processors is currently done via tickets. I will contact you by e-Mail for this time to give some basic suggestions, to receive more help please open a Support Case.

 

Best Regards,
Platon

 

 

0 Kudos