Hi all,
I need to write an application that is able to make FreeRTOS to fail under fixed conditions. To do so I need to access the scheduler List_t structure ‘pxReadyTasksLists’, in order to get data about TCBs and stacks of the started tasks, but looking at the code, the list I’m interested into is defined in tasks.c and so not visible to the programmer. Is there a good and elegant way to access to those data?
Thank you in advance.
Uhm…there is no way, for example, to modify some field of some elements of pxReadyTasksLists without modifying the code of FreeRTOS? I ask because trace macros allow me only to ‘react’ to events while I need to access data in writing mode. I have tried with a ‘dirty’ trick: I have removed the PRIVILEGED_DATA ahead that list, so that it is accessible from anywhere…could it be a good way to proceed?
Thank you a lot.
It is dirty and risky to write e.g. in pxReadyTasksLists. There are many limitations on what you can do safely. One thing is for sure: things that might go wrong, certainly will go wrong.
The structure and objects have been kept local and static to avoid users from getting access to them.
A header file is included at the bottom of tasks.c that allow additional code to be added into the file specifically so static variables can be accessed during module testing.