Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists