Skip to content

Commit adfcb9a

Browse files
authored
Add fixes and corrections in trace macro to Event Recorder mapping
- correct some argument names - use typecast to remove some compiler warnings
1 parent 6a44158 commit adfcb9a

File tree

4 files changed

+50
-45
lines changed

4 files changed

+50
-45
lines changed

CMSIS/RTOS2/FreeRTOS/FreeRTOS.scvd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
3-
<component name="CMSIS-FreeRTOS" version="11.1.0"/>
3+
<component name="CMSIS-FreeRTOS" version="11.2.0"/>
44

55
<typedefs>
66
<typedef name="ListItem_t" size="20" info="List object definition (list.h)">
@@ -794,10 +794,10 @@
794794
<event id="0xF000 + 0x2B" level="Op" property="xTaskCreateRestricted_Return" value="xReturn=%d[val1]" info=""/>
795795
<event id="0xF000 + 0x2C" level="API" property="xTaskCreateRestrictedAffinitySet" value="pxTaskDefinition=%x[val1], uxCoreAffinityMask=%x[val2], pxCreatedTask=%x[val3]" info=""/>
796796
<event id="0xF000 + 0x2D" level="Op" property="xTaskCreateRestrictedAffinitySet_Return" value="xReturn=%d[val1]" info=""/>
797-
<event id="0xF000 + 0x2E" level="API" property="xTaskCreate" value="pxTaskCode=%x[val1], pcName=%x[val2], ulStackDepth=%d[val3], pvParameters=%x[val4]" info=""/>
797+
<event id="0xF000 + 0x2E" level="API" property="xTaskCreate" value="pxTaskCode=%x[val1], pcName=%x[val2], uxStackDepth=%d[val3], pvParameters=%x[val4]" info=""/>
798798
<event id="0xF000 + 0x2F" level="API" property="xTaskCreate" value="uxPriority=%d[val1], pxCreatedTask=%x[val2]" info=""/>
799799
<event id="0xF000 + 0x30" level="Op" property="xTaskCreate_Return" value="xReturn=%d[val1]" info=""/>
800-
<event id="0xF000 + 0x31" level="API" property="xTaskCreateAffinitySet" value="pxTaskCode=%x[val1], pcName=%x[val2], ulStackDepth=%d[val3], pvParameters=%x[val4]" info=""/>
800+
<event id="0xF000 + 0x31" level="API" property="xTaskCreateAffinitySet" value="pxTaskCode=%x[val1], pcName=%x[val2], uxStackDepth=%d[val3], pvParameters=%x[val4]" info=""/>
801801
<event id="0xF000 + 0x32" level="API" property="xTaskCreateAffinitySet" value="uxPriority=%d[val1], uxCoreAffinityMask=%x[val2], pxCreatedTask=%x[val3]" info=""/>
802802
<event id="0xF000 + 0x33" level="Op" property="xTaskCreateAffinitySet_Return" value="xReturn=%d[val1]" info=""/>
803803
<event id="0xF000 + 0x34" level="API" property="vTaskDelete" value="xTaskToDelete=%x[val1]" info=""/>
@@ -1003,8 +1003,8 @@
10031003
<event id="0xF200 + 0x02" level="Op" property="TimerCommandSend" value="xTimer=%x[val1], xMessageID=%x[val2], xOptionalValue=%x[val3], xReturn=%x[val4]" info=""/>
10041004
<event id="0xF200 + 0x03" level="Op" property="TimerCommandReceived" value="xTimer=%x[val1], xMessageID=%x[val2], xOptionalValue=%x[val3]" info=""/>
10051005
<event id="0xF200 + 0x04" level="Op" property="TimerExpired" value="pxTimer=%x[val1]" info=""/>
1006-
<event id="0xF200 + 0x05" level="Op" property="PendFuncCall" value="pxFunctionToPend=%x[val1], pvParameter1=%x[val2], ulParameter2=%x[val3], xReturn=%x[val4]" info=""/>
1007-
<event id="0xF200 + 0x06" level="Op" property="PendFuncCallFromIsr" value="pxFunctionToPend=%x[val1], pvParameter1=%x[val2], ulParameter2=%x[val3], xReturn=%x[val4]" info=""/>
1006+
<event id="0xF200 + 0x05" level="Op" property="PendFuncCall" value="xFunctionToPend=%x[val1], pvParameter1=%x[val2], ulParameter2=%x[val3], xReturn=%x[val4]" info=""/>
1007+
<event id="0xF200 + 0x06" level="Op" property="PendFuncCallFromIsr" value="xFunctionToPend=%x[val1], pvParameter1=%x[val2], ulParameter2=%x[val3], xReturn=%x[val4]" info=""/>
10081008

10091009
<event id="0xF200 + 0x10" level="API" property="xTimerCreateTimerTask" value="" info=""/>
10101010
<event id="0xF200 + 0x11" level="Op" property="xTimerCreateTimerTask_Return" value="xReturn=%d[val1]" info=""/>

CMSIS/RTOS2/FreeRTOS/Include/freertos_evr.h

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* --------------------------------------------------------------------------
2-
* Copyright (c) 2013-2024 Arm Limited. All rights reserved.
2+
* Copyright (c) 2013-2025 Arm Limited. All rights reserved.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -365,12 +365,12 @@ extern void EvrFreeRTOSTasks_xTaskCreateRestrictedAffinitySet_Return (uint32_t x
365365
\brief Event sent when function xTaskCreate is called (API).
366366
\param[in] pxTaskCode pointer to task function.
367367
\param[in] pcName pointer to task name string.
368-
\param[in] usStackDepth stack depth.
368+
\param[in] uxStackDepth stack depth.
369369
\param[in] pvParameters pointer to parameter(s) passed to task funtion.
370370
\param[in] uxPriority task priority.
371371
\param[in] pxCreatedTask pointer to where the created task handle is stored.
372372
*/
373-
extern void EvrFreeRTOSTasks_xTaskCreate (void *pxTaskCode, const char *pcName, uint32_t usStackDepth, void *pvParameters, uint32_t uxPriority, /*TCB_t*/void *pxCreatedTask);
373+
extern void EvrFreeRTOSTasks_xTaskCreate (void *pxTaskCode, const char *pcName, uint32_t uxStackDepth, void *pvParameters, uint32_t uxPriority, /*TCB_t*/void *pxCreatedTask);
374374

375375
/**
376376
\brief Event sent before function xTaskCreate returns (Op).
@@ -382,15 +382,15 @@ extern void EvrFreeRTOSTasks_xTaskCreate_Return (uint32_t xReturn);
382382
\brief Event sent when function xTaskCreateAffinitySet is called (API).
383383
\param[in] pxTaskCode pointer to task function.
384384
\param[in] pcName pointer to task name string.
385-
\param[in] usStackDepth stack depth.
385+
\param[in] uxStackDepth stack depth.
386386
\param[in] pvParameters pointer to parameter(s) passed to task funtion.
387387
\param[in] uxPriority task priority.
388388
\param[in] uxCoreAffinityMask task affinity mask
389389
\param[in] pxCreatedTask pointer to where the created task handle is stored.
390390
*/
391391
extern void EvrFreeRTOSTasks_xTaskCreateAffinitySet (void *pxTaskCode,
392392
const char *pcName,
393-
const uint32_t usStackDepth,
393+
const uint32_t uxStackDepth,
394394
void *pvParameters,
395395
uint32_t uxPriority,
396396
uint32_t uxCoreAffinityMask,
@@ -1596,21 +1596,21 @@ extern void EvrFreeRTOSTimers_TimerExpired (Timer_t pxTimer);
15961596

15971597
/**
15981598
\brief Event on pass of the function execution to the timer service task (Op)
1599-
\param[in] pxFunctionToPend pointer to callback function
1599+
\param[in] xFunctionToPend pointer to callback function
16001600
\param[in] pvParameter1 function parameter 1.
16011601
\param[in] ulParameter2 function parameter 2.
16021602
\param[in] xReturn return value.
16031603
*/
1604-
extern void EvrFreeRTOSTimers_PendFuncCall (PendedFunction_t pxFunctionToPend, void *pvParameter1, uint32_t ulParameter2, uint32_t xReturn);
1604+
extern void EvrFreeRTOSTimers_PendFuncCall (PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, uint32_t xReturn);
16051605

16061606
/**
16071607
\brief Event on pass of the function execution to the timer service task from the ISR (Op)
1608-
\param[in] pxFunctionToPend pointer to callback function
1608+
\param[in] xFunctionToPend pointer to callback function
16091609
\param[in] pvParameter1 function parameter 1.
16101610
\param[in] ulParameter2 function parameter 2.
16111611
\param[in] xReturn return value.
16121612
*/
1613-
extern void EvrFreeRTOSTimers_PendFuncCallFromIsr (PendedFunction_t pxFunctionToPend, void *pvParameter1, uint32_t ulParameter2, uint32_t xReturn);
1613+
extern void EvrFreeRTOSTimers_PendFuncCallFromIsr (PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, uint32_t xReturn);
16141614

16151615
/**
16161616
\brief Event sent when function xTimerCreateTimerTask is called (API).
@@ -2382,7 +2382,8 @@ extern void EvrFreeRTOSHeap_Free (void *pvAddress, uint32_t uiSize);
23822382
#endif
23832383

23842384
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceENTER_xTaskCreateStatic_DISABLE))
2385-
#define traceENTER_xTaskCreateStatic EvrFreeRTOSTasks_xTaskCreateStatic
2385+
#define traceENTER_xTaskCreateStatic(pxTC,pcN,ulS,pvP,uxP,puxS,pxTB) \
2386+
EvrFreeRTOSTasks_xTaskCreateStatic((void*)pxTC,pcN,ulS,pvP,uxP,puxS,pxTB)
23862387
#endif
23872388

23882389
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceRETURN_xTaskCreateStatic_DISABLE))
@@ -2430,7 +2431,8 @@ extern void EvrFreeRTOSHeap_Free (void *pvAddress, uint32_t uiSize);
24302431
#endif
24312432

24322433
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceENTER_xTaskCreate_DISABLE))
2433-
#define traceENTER_xTaskCreate EvrFreeRTOSTasks_xTaskCreate
2434+
#define traceENTER_xTaskCreate(pxT,pcN,uxS,pvP,uxP,pxC) \
2435+
EvrFreeRTOSTasks_xTaskCreate((void*)pxT,pcN,uxS,pvP,uxP,pxC)
24342436
#endif
24352437

24362438
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceRETURN_xTaskCreate_DISABLE))
@@ -3240,11 +3242,11 @@ extern void EvrFreeRTOSHeap_Free (void *pvAddress, uint32_t uiSize);
32403242
#endif
32413243

32423244
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(tracePEND_FUNC_CALL_DISABLE))
3243-
#define tracePEND_FUNC_CALL(px,pv,ul,x) EvrFreeRTOSTimers_PendFuncCall(px,pv,ul,x)
3245+
#define tracePEND_FUNC_CALL(xF,pvP,ulP,xR) EvrFreeRTOSTimers_PendFuncCall((void*)xF,pvP,ulP,xR)
32443246
#endif
32453247

32463248
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(tracePEND_FUNC_CALL_FROM_ISR_DISABLE))
3247-
#define tracePEND_FUNC_CALL_FROM_ISR(px,pv,ul,x) EvrFreeRTOSTimers_PendFuncCallFromIsr(px,pv,ul,x)
3249+
#define tracePEND_FUNC_CALL_FROM_ISR(xF,pvP,ulP,xR) EvrFreeRTOSTimers_PendFuncCallFromIsr((void*)xF,pvP,ulP,xR)
32483250
#endif
32493251

32503252

@@ -3257,15 +3259,16 @@ extern void EvrFreeRTOSHeap_Free (void *pvAddress, uint32_t uiSize);
32573259
#endif
32583260

32593261
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceENTER_xTimerCreate_DISABLE))
3260-
#define traceENTER_xTimerCreate EvrFreeRTOSTimers_xTimerCreate
3262+
#define traceENTER_xTimerCreate(pcT,xT,xA,pvT,pxC) EvrFreeRTOSTimers_xTimerCreate(pcT,xT,xA,pvT,(void*)pxC)
32613263
#endif
32623264

32633265
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceRETURN_xTimerCreate_DISABLE))
32643266
#define traceRETURN_xTimerCreate EvrFreeRTOSTimers_xTimerCreate_Return
32653267
#endif
32663268

32673269
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceENTER_xTimerCreateStatic_DISABLE))
3268-
#define traceENTER_xTimerCreateStatic EvrFreeRTOSTimers_xTimerCreateStatic
3270+
#define traceENTER_xTimerCreateStatic(pcT,xT,xA,pvT,pxC,pxT) \
3271+
EvrFreeRTOSTimers_xTimerCreateStatic(pcT,xT,xA,pvT,(void*)pxC,pxT)
32693272
#endif
32703273

32713274
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceRETURN_xTimerCreateStatic_DISABLE))
@@ -3377,15 +3380,17 @@ extern void EvrFreeRTOSHeap_Free (void *pvAddress, uint32_t uiSize);
33773380
#endif
33783381

33793382
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceENTER_xTimerPendFunctionCallFromISR_DISABLE))
3380-
#define traceENTER_xTimerPendFunctionCallFromISR EvrFreeRTOSTimers_xTimerPendFunctionCallFromISR
3383+
#define traceENTER_xTimerPendFunctionCallFromISR(xF,pvP,ulP,pxH) \
3384+
EvrFreeRTOSTimers_xTimerPendFunctionCallFromISR((void*)xF,pvP,ulP,pxH)
33813385
#endif
33823386

33833387
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceRETURN_xTimerPendFunctionCallFromISR_DISABLE))
33843388
#define traceRETURN_xTimerPendFunctionCallFromISR EvrFreeRTOSTimers_xTimerPendFunctionCallFromISR_Return
33853389
#endif
33863390

33873391
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceENTER_xTimerPendFunctionCall_DISABLE))
3388-
#define traceENTER_xTimerPendFunctionCall EvrFreeRTOSTimers_xTimerPendFunctionCall
3392+
#define traceENTER_xTimerPendFunctionCall(xF,pvP,ulP,xT) \
3393+
EvrFreeRTOSTimers_xTimerPendFunctionCall((void*)xF,pvP,ulP,xT)
33893394
#endif
33903395

33913396
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceRETURN_xTimerPendFunctionCall_DISABLE))

CMSIS/RTOS2/FreeRTOS/Source/freertos_evr.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* --------------------------------------------------------------------------
2-
* Copyright (c) 2013-2023 Arm Limited. All rights reserved.
2+
* Copyright (c) 2013-2025 Arm Limited. All rights reserved.
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -981,14 +981,14 @@ void EvrFreeRTOSTasks_xTaskCreateRestrictedAffinitySet_Return (uint32_t xReturn)
981981
#endif
982982

983983
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceENTER_xTaskCreate_DISABLE))
984-
void EvrFreeRTOSTasks_xTaskCreate (void *pxTaskCode, const char *pcName, uint32_t usStackDepth, void *pvParameters, uint32_t uxPriority, /*TCB_t*/void *pxCreatedTask) {
984+
void EvrFreeRTOSTasks_xTaskCreate (void *pxTaskCode, const char *pcName, uint32_t uxStackDepth, void *pvParameters, uint32_t uxPriority, /*TCB_t*/void *pxCreatedTask) {
985985
#if defined(RTE_Compiler_EventRecorder) || defined(RTE_CMSIS_View_EventRecorder)
986-
EventRecord4(EvtFreeRTOSTasks_xTaskCreate_0, (uint32_t)pxTaskCode, (uint32_t)pcName, usStackDepth, (uint32_t)pvParameters);
986+
EventRecord4(EvtFreeRTOSTasks_xTaskCreate_0, (uint32_t)pxTaskCode, (uint32_t)pcName, uxStackDepth, (uint32_t)pvParameters);
987987
EventRecord2(EvtFreeRTOSTasks_xTaskCreate_1, uxPriority, (uint32_t)pxCreatedTask);
988988
#else
989989
(void)pxTaskCode;
990990
(void)pcName;
991-
(void)usStackDepth;
991+
(void)uxStackDepth;
992992
(void)pvParameters;
993993
(void)uxPriority;
994994
(void)pxCreatedTask;
@@ -1009,18 +1009,18 @@ void EvrFreeRTOSTasks_xTaskCreate_Return (uint32_t xReturn) {
10091009
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(traceENTER_xTaskCreateAffinitySet_DISABLE))
10101010
void EvrFreeRTOSTasks_xTaskCreateAffinitySet (void *pxTaskCode,
10111011
const char *pcName,
1012-
const uint32_t usStackDepth,
1012+
const uint32_t uxStackDepth,
10131013
void *pvParameters,
10141014
uint32_t uxPriority,
10151015
uint32_t uxCoreAffinityMask,
10161016
void *pxCreatedTask) {
10171017
#if defined(RTE_Compiler_EventRecorder) || defined(RTE_CMSIS_View_EventRecorder)
1018-
EventRecord4(EvtFreeRTOSTasks_xTaskCreateAffinitySet_0, (uint32_t)pxTaskCode, (uint32_t)pcName, usStackDepth, (uint32_t)pvParameters);
1018+
EventRecord4(EvtFreeRTOSTasks_xTaskCreateAffinitySet_0, (uint32_t)pxTaskCode, (uint32_t)pcName, uxStackDepth, (uint32_t)pvParameters);
10191019
EventRecord4(EvtFreeRTOSTasks_xTaskCreateAffinitySet_1, uxPriority, uxCoreAffinityMask, (uint32_t)pxCreatedTask, 0U);
10201020
#else
10211021
(void)pxTaskCode;
10221022
(void)pcName;
1023-
(void)usStackDepth;
1023+
(void)uxStackDepth;
10241024
(void)pvParameters;
10251025
(void)uxPriority;
10261026
(void)uxCoreAffinityMask;
@@ -2969,11 +2969,11 @@ void EvrFreeRTOSTimers_TimerExpired (/*Timer_t*/void *pxTimer) {
29692969
#endif
29702970

29712971
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(tracePEND_FUNC_CALL_DISABLE))
2972-
void EvrFreeRTOSTimers_PendFuncCall (/*PendedFunction_t*/void *pxFunctionToPend, void *pvParameter1, uint32_t ulParameter2, uint32_t xReturn) {
2972+
void EvrFreeRTOSTimers_PendFuncCall (/*PendedFunction_t*/void *xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, uint32_t xReturn) {
29732973
#if defined(RTE_Compiler_EventRecorder) || defined(RTE_CMSIS_View_EventRecorder)
2974-
EventRecord4(EvtFreeRTOSTimers_PendFuncCall, (uint32_t)pxFunctionToPend, (uint32_t)pvParameter1, ulParameter2, xReturn);
2974+
EventRecord4(EvtFreeRTOSTimers_PendFuncCall, (uint32_t)xFunctionToPend, (uint32_t)pvParameter1, ulParameter2, xReturn);
29752975
#else
2976-
(void)pxFunctionToPend;
2976+
(void)xFunctionToPend;
29772977
(void)pvParameter1;
29782978
(void)ulParameter2;
29792979
(void)xReturn;
@@ -2982,11 +2982,11 @@ void EvrFreeRTOSTimers_PendFuncCall (/*PendedFunction_t*/void *pxFunctionToPend,
29822982
#endif
29832983

29842984
#if (!defined(EVR_FREERTOS_DISABLE) && !defined(tracePEND_FUNC_CALL_FROM_ISR_DISABLE))
2985-
void EvrFreeRTOSTimers_PendFuncCallFromIsr (/*PendedFunction_t*/void *pxFunctionToPend, void *pvParameter1, uint32_t ulParameter2, uint32_t xReturn) {
2985+
void EvrFreeRTOSTimers_PendFuncCallFromIsr (/*PendedFunction_t*/void *xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, uint32_t xReturn) {
29862986
#if defined(RTE_Compiler_EventRecorder) || defined(RTE_CMSIS_View_EventRecorder)
2987-
EventRecord4(EvtFreeRTOSTimers_PendFuncCallFromIsr, (uint32_t)pxFunctionToPend, (uint32_t)pvParameter1, ulParameter2, xReturn);
2987+
EventRecord4(EvtFreeRTOSTimers_PendFuncCallFromIsr, (uint32_t)xFunctionToPend, (uint32_t)pvParameter1, ulParameter2, xReturn);
29882988
#else
2989-
(void)pxFunctionToPend;
2989+
(void)xFunctionToPend;
29902990
(void)pvParameter1;
29912991
(void)ulParameter2;
29922992
(void)xReturn;

0 commit comments

Comments
 (0)