Hi, I am trying to build a system-level testing framework to test my code.
I’m currently using https://cmocka.org/ to do unit testing. With help of GNU
--wrap to mock the FreeRTOS API.
Now I’m at a stage to perform system testing, mocking hardware-specific API, and let the RTOS do the scheduling. One issue I encountered is I want to run multiple tests in groups. So I need to call
vTaskEndScheduler multiple times. But the
vTaskEndScheduler does not free memory allocated by task. So I need a method to either signal every task if it need to deallocate its resources or like the post Thread End - FreeRTOS suggested to have a callback function
I felt the
AboutToDelete callback implementation is nicer since it’s easier to leave out in production code. And I don’t need to check for signal in every iteration of the task loop. But can’t find any reference to
AboutToDelete in the API. Could someone give a hint?