Hello, i have a project for cortex-m1 with FreeRTOS and i’m trying to find out hard faults reasons. Because of that i want to use -finstrumental-functions of GCC compiler. Unfortunatelly this option cause new Hard Fault somethere at the beginning of execution. Did someone try to use this option on ARM arch? Thich FreeRTOS function should be marked with attribute((no_instrument_function))? Or maybe i need to use some other tricks?
Okay. Thanks a lot. I’ll describe my problem more deeper. I’ve got an application with a several tasks. Couple of these tasks is using for external interface communication (CAN and 1553B) and one of the tasks is using to compute some math. If we are enable this task sooner or later app will end in Hard Fault. Usualy it’s crashes at the same place, and it’s looks like some unaligment access. I dont understand how function may be executed for a thousands times without any problem and then suddenly crash with unaligment memory access. Can you suggest something to check?
Are you indeed running on an FPGA model? I suggest to run your code on a real M0+ as it could be that your syntesized model has an issue?
Is that unaligned access on the stack (so maybe a stack problem)?
No, i’m using Russian SoC 1986VE1T which is real SoC.
Is that unaligned access on the stack (so maybe a stack problem)?
I think the same, because of that i want to trace execution to see which functions called just before hard fault, i hope this will help me to find a problem.