FreeRTOS V11 SystemView Tracing - Function # Event Meaning

This is very possibly a question for SEGGER & not you guys but I can’t find anything in their documentation.

Using FreeRTOS V11 and SEGGER SystemView, there is 1 event type called “Function #”. The detail column says “Returns ”. LLMs don’t know what it is, google doesn’t seem to have any idea either (or at least my GoogleFoo is not strong enough to find it)

What is this event and what does the function number relate to?

Just a guess, but could it just mean the event is the function returning to its caller?

That would make sense but where/how is SystemView gathering this information? I didn’t go through and instrument any functions within my application. Unless it’s monitoring the stack for returns.

Then how would I figure out which function #285 is? Doesn’t seem to be shown anywhere but would be very helpful information.

I downloaded the FreeRTOS V11 example project from here. The file SEGGER_SYSVIEW_FreeRTOS.h implements traceRETURN_ macros such as this. The same file has several apiID_ macros which are used in the implementation of traceRETURN_ macros:

#define apiID_XQUEUEGENERICRESET                       (150u)
#define apiID_XQUEUEGENERICCREATESTATIC                (151u)
#define apiID_XQUEUEGENERICCREATE                      (152u)
#define apiID_XQUEUECREATEMUTEX                        (153u)

I think what you are seeing are these traceRETU0RN_ traces and you can match the number with API using apiID_ macros. The same file SEGGER_SYSVIEW_FreeRTOS.h has a macro TRACERETURN_ENABLE which default to 1 and enables traceRETURN_ macros. You should be able to set TRACERETURN_ENABLE to 0 to make remove these traces.

This is my inference based on reading the code and should be confirmed by Segger - please reach out to them.


SystemView records the start (including the parameters) and the end (including the return value) of the instrumented function. With it, you can see what time it took to execute the function, which parameters were passed and which return value was returned. Does that answer your question? If not, please feel free to ask again in our forum and my SystemView colleagues will be happy to assist.