FreeRTOS

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User11773
Level 4
Level 4
First like received First solution authored
It appears that version 4.1.8 has bit of an omission.
I would like to use Task Tags.
Ideal for use with the DACs on a XMC4000. Can "see" with a scope what task is active.

But this version seems to default "configUSE_APPLICATION_TASK_TAG" to 0
I have a "work around" but I lose it every time I generate code. Very clunky!
Any changes in the future?

editted.
0 Likes
5 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

As a workaround you could define the macro in the compiler preprocessor options in the project properties.
4607.attach

Regards,
Jesus
0 Likes
User11773
Level 4
Level 4
First like received First solution authored
Thank you Jesus!
That could be a good path.
but ...
I change configUSE_APPLICATION_TASK_TAG to 1 in "FreeRTOS.h" - Good you've got a solution.
But I also change "FreeRTOSConf.h":
- near end of file I add : #define traceTASK_SWITCHED_IN() XMC_DAC_CH_Write((XMC_DAC_t *)(void *)DAC,0,(uint32_t)pxCurrentTCB->pxTaskTag)
- and near top I add : #include

I've tried include "Dave.h", but I suspect a circular reference as Dave.h probably eventually includes FreeRTOSConf.h

Any recommend path to take?
0 Likes
User11773
Level 4
Level 4
First like received First solution authored
And another thing.
taskYIELD_FROM_ISR is missing in this latest version.
0 Likes
lock attach
Attachments are accessible only for community members.
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

The trace macros are more challenging...
You can try by copying the attached file, after changing the extension from .txt to .tmpl, to your project under Dave/Model/APPS/FREERTOS/v4_1_8/Templates
The file includes at the end a file "FreeRTOSConfigUser.h" if the the macro FREERTOS_INCLUDE_USER_CONFIG_H is defined.
You can use the FreeRTOSConfigUser.h to define the FreeRTOS trace macros, https://www.freertos.org/rtos-trace-macros.html

Regarding taskYIELD_FROM_ISR, it has been renamed to portYIELD_FROM_ISR. See https://sourceforge.net/p/freertos/bugs/198/

Regards,
Jesus
0 Likes
User11773
Level 4
Level 4
First like received First solution authored
Hi Jesus,

Thank you.
Is portYield... the official rename? The online FreeRTOS still refers to taskYield... he sourceforge items wasn't clear.

And the User config does work. Thanks again
0 Likes