hi,
when i using greenhills compiler plugin compile the s32k324 mcal program port from s32ds v3.4's example application(Platform_Multicore_SingleElf_S32K324). it compile succeful,but can't run.
when i debug use pe, core0 main enter a hardfault.
who can help me? thanks.
Solved! Go to Solution.
Hi xflongzhang,
I compared your system.c file and this file in the RTD example. I saw that in your system.c file, the code (in the #ifdef MPU_ENABLE... #endif) didn't execute. I think that you can try to define the MPU_ENABLE in your .mak files (or remove the #ifdef MPU_ENABLE... #endif in your system.c file) and rebuild and test again.
If your program still occur error, you should try to replace your system.c file by this file in the RTD example.
Best regards,
Dan
Hello xflongzhang,
Could you send me your project (including configuration files and code files)?
And what is the package's name you are using?
Best regards,
Dan
Hello xflongzhang,
I tested your project and I didn't get your error.
Are you using the board (which loaded HSE firmware)?
And which is the board and chip you are testing?
Best regards,
Dan
I am using S32K3X4EVB-Q257 ,the chip on the board is S32K344,but it was decoupled,so it is really a S32K324. It has no HSE firmware,I tested the demo "Platform_Multicore_SingleElf_S32K324" from S32DS v3.4 ,it can work.
Maybe I uploaded the wrong project.But the two cores don't work correct.The correct is two red leds blink.
Hello xflongzhang,
I got your error. I saw that this interrupt is PIT_0_ISR after I check the below registers.
I didn't why the PIT_0_ISR function didn't install after calling the Platform_Init(NULL_PTR); in the main_core0() function.
I have a solution: you can add the statement calling Platform_InstallIrqHandler function as the below image. After that, rebuild and test again.
Best regards,
Dan
Hello,Dan,
Thank you very much for your advice. But I still encountered the same problem. Is there anything else wrong?
Hi xflongzhang,
I compared your system.c file and this file in the RTD example. I saw that in your system.c file, the code (in the #ifdef MPU_ENABLE... #endif) didn't execute. I think that you can try to define the MPU_ENABLE in your .mak files (or remove the #ifdef MPU_ENABLE... #endif in your system.c file) and rebuild and test again.
If your program still occur error, you should try to replace your system.c file by this file in the RTD example.
Best regards,
Dan
Hi Dan,
I added MPU_ENABLE to the compiler options, rebuild the program and find that the program can run correctly. It is surprising that the code generated by the same RTD version is different from the example. But the problem was solved.
Thank you.