2022-03-15 12:49 PM
I am assuming this is a memory boundary issue, but maybe it is something else: I have an application that runs just fine, using a simple push button interrupt serviced by its own Free RTOS task, which is suspended until triggered. For some reason, when I add a completely unrelated variable to the Touch GFX model class **larger than a bool type**, the task throws a hard fault. It's like I'm on a boundary; I've increased task sizes beyond anything reasonable to expect, but still adding that one variable to the .hpp file breaks the build. Any similar experiences to share are appreciated.
2022-03-15 03:17 PM
FreeRTOS has a config for Stack checking, see https://www.freertos.org/Stacks-and-stack-overflow-checking.html. This may help validating that you have allocated enough stack space for each task.
hth
KnarfB
2022-03-16 02:32 AM
Are you using C library functions like printf/strtok/...? If so, are have you added the thread-safe solution?
In the CubeIDE User Guide you find a lot of info on how to compile FreeRTOS to use the FreeRTOS debug views. These views may give you a clue.
2022-03-16 06:01 AM
Thank you for that advice. I will investigate.
2022-03-16 06:01 AM
Thank you
2022-03-16 06:02 AM
Thanks for the advice. I will investigate.