Hi I’m trying to get FreeRTOS with CMSIS v2 running on a STM32F429ZI demo board.
The main task starts successfully and the passed function is called correctly. The task shall spawn a second task but directly after calling osThreadNew (which does return with a valid ID), the hard fault occurs.
Does anybody have an idea how to proceed here? I have absoutely no idea what the cause of the hard fault might be…
First read through all the normal causes of problems, and normal developer support paths (ensuring you have configASSERT() defined, make sure you have stack overflow protection on, etc.) https://www.freertos.org/FAQHelp.html then let us know what you have tried and what you found.
I finaly found the actual cause of the problem. I used a library that was linked using the property “POSITION_INDEPENDENT_CODE 1”
I assume that this caused the linker to do really strange stuff. After I removed this line from the library everything works like a charm.