Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Parameters for traceCREATE_COUNTING_SEMAPHORES

Posted by ammaree on August 19, 2015

I am busy putting together a set of traceXXXX macros covering the whole scope of functions. Essentially I am mapping all functions into 3 different categories being:

vFreeRTOSTraceTASK(): all task related functions vFreeRTOSTraceQUEUE(): queue, mutex and semaphore vFreeRTOSTraceTIMER(): timer related functions

Within each of the functions I am just streaming max 8 character string (built compact just identifying the object and event) as fast and direct as possible to the UART.

What I have noticed is that with counting semaphores, no parameter is passed. When compared with queues and mutexes, I would have assumed passing the xHandle value would make sense. Am I missing something, a reason why nothing is passed?

Rgds

Andre


Parameters for traceCREATE_COUNTING_SEMAPHORES

Posted by rtel on August 19, 2015

Some of the macros were updated to accommodate the specific needs of the FreeRTOS+Trace tool, so it might be related to that.

Can you give a specific example of a queue trace macro that does include the paraemter, and a mutex macro that doesn't include the parameter, so I may be able to give a more specific answer.

Regards.


Parameters for traceCREATE_COUNTING_SEMAPHORES

Posted by ammaree on August 19, 2015

As an example, have a look at calling of: traceCREATEMUTEX(pxNewQueue) vs traceCREATECOUNTING_SEMAPHORE()

Would it not make sense to provide the xHandle as parameter to identify the semaphore?


Parameters for traceCREATE_COUNTING_SEMAPHORES

Posted by rtel on August 19, 2015

I would agree it is probably sub-optimal.

In the case of a counting semaphore more than one trace macro is invoiced, first the macros in xQueueGenericCreate() [which is itself called by xQueueCreateCountingSemaphore()] and then traceCREATECOUNTINGSEMAPHORE() - so presumably the handle is already known from when xQueueGenericCreate() was called.

You can still obtain the handle, but you would need to look at the code to see what the handle was called at the point the macro was called. In the case highlighted it is simply "xHandle".

Just looking at the macro definitions used by FreeRTOS+Trace (which are in /FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h) it appears traceCREATECOUNTINGSEMAPHORE() is not used - so maybe that is why it never had the parameter?

Regards.


Parameters for traceCREATE_COUNTING_SEMAPHORES

Posted by rtel on August 19, 2015

As an aside, I'm not sure a serial port would be sufficiently fast to stream data at the rate a running application would generate it.

Regards.


Parameters for traceCREATE_COUNTING_SEMAPHORES

Posted by ammaree on August 19, 2015

Currently running UART at 961.2k, and limiting the specific macros enabled to limit output volume, works reasonably for th exceptions I need to track.

Next step will be to provide support for GPIO pin status, mainly to track task switching on a logic analyser.

I can then mix the 2 output mechanisms based on the nature of the trace..


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner