Error when trying to implement Tracealyzer

Hey guys,

I try to implement Tracealyzer into my project so that I get a better understanding of the performance.

I used this video by the creators as a reference.

However, when trying to compile I get the following errors:

    arm-none-eabi-gcc "../Core/Src/tasks.c" -mcpu=cortex-m4 -g3 '-D__weak=__attribute__((weak))' '-D__packed=__attribute__((__packed__))' -DUSE_HAL_DRIVER -DSTM32F405xx -c -I../Core/Tracealyzer/include -I../Core/Tracealyzer/config -I../Core/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -Og -ffunction-sections -Wall -fstack-usage -MMD -MP -MF"Core/Src/tasks.d" -MT"Core/Src/tasks.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Core/Src/tasks.o"
../Core/Src/tasks.c: In function 'ulTaskGenericNotifyTake':
../Core/Src/tasks.c:4710:64: error: macro "traceTASK_NOTIFY_TAKE_BLOCK" passed 1 arguments, but takes just 0
                     traceTASK_NOTIFY_TAKE_BLOCK( uxIndexToWait );
                                                                ^
../Core/Src/tasks.c:4710:21: error: 'traceTASK_NOTIFY_TAKE_BLOCK' undeclared (first use in this function)
                     traceTASK_NOTIFY_TAKE_BLOCK( uxIndexToWait );
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../Core/Src/tasks.c:4710:21: note: each undeclared identifier is reported only once for each function it appears in
../Core/Src/tasks.c:4732:50: error: macro "traceTASK_NOTIFY_TAKE" passed 1 arguments, but takes just 0
             traceTASK_NOTIFY_TAKE( uxIndexToWait );
                                                  ^
../Core/Src/tasks.c:4732:13: error: 'traceTASK_NOTIFY_TAKE' undeclared (first use in this function); did you mean 'traceTASK_NOTIFY_TAKE_BLOCK'?
             traceTASK_NOTIFY_TAKE( uxIndexToWait );
             ^~~~~~~~~~~~~~~~~~~~~
             traceTASK_NOTIFY_TAKE_BLOCK
../Core/Src/tasks.c: In function 'xTaskGenericNotifyWait':
../Core/Src/tasks.c:4789:64: error: macro "traceTASK_NOTIFY_WAIT_BLOCK" passed 1 arguments, but takes just 0
                     traceTASK_NOTIFY_WAIT_BLOCK( uxIndexToWait );
                                                                ^
../Core/Src/tasks.c:4789:21: error: 'traceTASK_NOTIFY_WAIT_BLOCK' undeclared (first use in this function)
                     traceTASK_NOTIFY_WAIT_BLOCK( uxIndexToWait );
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../Core/Src/tasks.c:4811:50: error: macro "traceTASK_NOTIFY_WAIT" passed 1 arguments, but takes just 0
             traceTASK_NOTIFY_WAIT( uxIndexToWait );
                                                  ^
../Core/Src/tasks.c:4811:13: error: 'traceTASK_NOTIFY_WAIT' undeclared (first use in this function); did you mean 'traceTASK_NOTIFY_WAIT_BLOCK'?
             traceTASK_NOTIFY_WAIT( uxIndexToWait );
             ^~~~~~~~~~~~~~~~~~~~~
             traceTASK_NOTIFY_WAIT_BLOCK
../Core/Src/tasks.c: In function 'xTaskGenericNotify':
../Core/Src/tasks.c:4918:47: error: macro "traceTASK_NOTIFY" passed 1 arguments, but takes just 0
             traceTASK_NOTIFY( uxIndexToNotify );
                                               ^
../Core/Src/tasks.c:4918:13: error: 'traceTASK_NOTIFY' undeclared (first use in this function)
             traceTASK_NOTIFY( uxIndexToNotify );
             ^~~~~~~~~~~~~~~~
../Core/Src/tasks.c: In function 'xTaskGenericNotifyFromISR':
../Core/Src/tasks.c:5060:56: error: macro "traceTASK_NOTIFY_FROM_ISR" passed 1 arguments, but takes just 0
             traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify );
                                                        ^
../Core/Src/tasks.c:5060:13: error: 'traceTASK_NOTIFY_FROM_ISR' undeclared (first use in this function)
             traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify );
             ^~~~~~~~~~~~~~~~~~~~~~~~~
../Core/Src/tasks.c: In function 'vTaskGenericNotifyGiveFromISR':
../Core/Src/tasks.c:5151:61: error: macro "traceTASK_NOTIFY_GIVE_FROM_ISR" passed 1 arguments, but takes just 0
             traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify );
                                                             ^
../Core/Src/tasks.c:5151:13: error: 'traceTASK_NOTIFY_GIVE_FROM_ISR' undeclared (first use in this function)
             traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify );
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Core/Src/subdir.mk:118: Core/Src/tasks.o] Error 1

It seems as if I am the only person in the internet that has this problem (or is to dumb to follow a tutorial :sweat_smile:).
The only thing I could find that is close to my problem seems to be this StackOverflow question. Eventhough the guy solved his problem, he didn’t state exactly what his solution was.

I hope you can help me.

Thanks in advance!

It seems that you do not have the latest tracelyzer library or TRC_CFG_FREERTOS_VERSION is not correctly set. What is the value of TRC_CFG_FREERTOS_VERSION in your trcConfig.h?

Would you please try the tracelyzer library from here: https://github.com/aws/amazon-freertos/tree/master/libraries/3rdparty/tracealyzer_recorder

Thanks.

Thanks for your quick response!

I tried to use your linked code, but I still get the same error-messages.

This is my TRC_CFG_FREERTOS_VERSION:
#define TRC_CFG_FREERTOS_VERSION TRC_FREERTOS_VERSION_10_3_1

Please change it to TRC_FREERTOS_VERSION_10_4_0:

#define TRC_CFG_FREERTOS_VERSION TRC_FREERTOS_VERSION_10_4_0

Thanks.

Thank you so much, this solved my problem.

I think it is a bit strange that I have to set a version that I’m not using.

Hi,
Did you download FreeRTOS directly from the repository/master?
If so then the reason you need to set a “non-released” version is because you are running non-released code. You will be working with code that is in between releases. The recorder is adapted for the coming FreeRTOS release.
When FreeRTOS makes an official release it will have a version number bump and everything works as expected.

If you’ didn’t download from repository/master, then please let me know because that is definitely a bug.

Best regards
Erik