Quality RTOS & Embedded Software

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


Loading

Writing on the same console as the CLI

Posted by Olivier Monnom on June 19, 2013
Hi,
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?

Regards,

Olivier

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.

Regards.

RE: Writing on the same console as the CLI

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


[ 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