Quality RTOS & Embedded Software

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


signed portCHAR for strings, why?

Posted by Norbert Unterberg on March 11, 2010
I wonder why FreeRTOS is using "signed portCHAR" as data type for C-strings in its public API. Since the type of a string literal in C is "char*" and not "signed char*", my gcc complains when I use a string literal as xTaskCreate or a normal char buffer for vTaskList.

I changed these text string APIs from using signed portCHAR* to just portChar* in my copy of ReeRTOS, and my warnings are gone.

Thank you

RE: signed portCHAR for strings, why?

Posted by Richard on March 11, 2010
There is a lot of casting and qualification (such as the signed in this case) in FreeRTOS that does not seem to have an obvious reason if you are just using one port. This arises because FreeRTOS is compiled with so many different compilers - some of which issue contradicting warning messages so you can't win.

With regard to the char casting, if warnings are generated then you can re-cast in the application code. Not ideal I know.


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

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

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo, Nuvoton Cortex-M23 demo & STM32H745 dual core (AMP) demo.

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

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


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

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

Xilinx Microblaze and Zynq partner