Quality RTOS & Embedded Software

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


Writing on the same console as the CLI

Posted by Olivier Monnom on June 19, 2013
I use FreeRTOS-CLI with success (channel is serial line). Now I want to write on the output from one of my task.
Is it possible? Or CLI has the exclusivity of the channel?



RE: Writing on the same console as the CLI

Posted by Richard on June 19, 2013
If you can guarantee that only one thing will try and access the serial line at the same time then you can do it. Otherwise you will need to guard the serial port with a mutex.

Look at the file FreeRTOS-Plus\Demo\FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC\Examples\USB_CDC\CDCCommandConsole.c for an example.

In that file you will see xCDCMutex being used to ensure the command console has access to the (in this case) virtual COM port when it want to send, and a function called vOutputString() that can be called by other tasks to write to the same COM, again protected by the same xCDCMutex mutex.


RE: Writing on the same console as the CLI

Posted by Olivier Monnom on July 5, 2013
Thank you Richard.

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

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

Latest News

Meet us at Embedded World. Hall 3A-525.

Hear from Richard Barry at Embedded World. Feb 28, 16:00, Hall 4-428.

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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