FreeRTOS plugin for MPLAB

Hello, When using the RTOS Viewer in MPLAB, I cannot view the status of my queues. When selecting Queues in the list on the left, I get the message “Queue Registry Unavailable…” How can I remedy this? -Amr

FreeRTOS plugin for MPLAB

This is from the OpenRTOS Eclipse plug in manual – same applies: “Each OPENRTOS project includes a header file called FreeRTOSConfig.h, in which various OPENRTOS options can be configured. Configuration options relevant to using the Eclipse STATEVIEWER plug-in are configQUEUE_REGISTRY_SIZE and configUSE_TRACE_FACILITY.
If the version of FreeRTOS being used is older than version 5.2.0 then configUSE_TRACE_FACILITY must be set to 1. In all other cases configUSE_TRACE_FACILITY has no impact on the plug-in functionality.
OPENRTOS includes a „queue registry‟ feature. After a queue or semaphore has been created it can optionally be added to the queue registry using the OPENRTOS vQueueAddToRegistry() API function. The plug-in will only display queues and semaphores that have been added to the registry. The number of places available in the queue registry is configured at compile time using configQUEUE_REGISTRY_SIZE. For example, to allow up to 10 queues and semaphores to be registered set configQUEUE_REGISTRY_SIZE to 10. If configQUEUE_REGISTRY_SIZE is not included in FreeRTOSConfig.h then vQueueAddToRegistry() will have no effect and the plug-in will not display any queue or semaphore information.” Regards.

FreeRTOS plugin for MPLAB

Thanks for your reply Richard. I can now view my queues in the plugin. I have another question. The amount of used stack that is displayed in the task information seems inconsistent with my task creation parameters. For example, the IDLE task is apparently using 617 bytes according to the plugin, but #defines declared in the FreeRTOS code show that the IDLE task is created with a stack size of 190 bytes. This is happening with all my other tasks too – the plugin seems to display stack usage that is much higher than the amounts allocated using xTaskCreate. The stability of my application so far would indicate that there is not stack overflow occurring so these figures seem nonsensical. Am I missing a trick somewhere? Thanks -Amr

FreeRTOS plugin for MPLAB

I don’t know what the machine width is on your uP but the stack is defined in words for CreateTask.
I use 32 bit ARM and 190 stack size would be 760 bytes.
The last PIC I used was 8 bits wide.

FreeRTOS plugin for MPLAB

> I have another question. The amount of used stack that is displayed in the task
> information seems inconsistent with my task creation parameters. For example,
> the IDLE task is apparently using 617 bytes according to the plugin, The plug-in shows the stack high water mark – that is, how close the stack has come to overflowing.  The closer the number is to zero the closer the task has come to overflowing its stack.  The value is shown in bytes. > but #defines
> declared in the FreeRTOS code show that the IDLE task is created with a stack
> size of 190 bytes. Are you sure?  Stack sizes are declared in words, so if you are using a PIC24/dsPIC this will be 190 * 2 bytes, if you are using a PIC32 this will be 190 * 4 bytes. Regards.