Quality RTOS & Embedded Software

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


Loading

signed portCHAR for strings, why?

Posted by Norbert Unterberg on March 11, 2010
Hi,
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
Norbert

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.

Regards.


[ 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