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

IAR AVR 3.20 compile warning? why?

Posted by Nobody/Anonymous on January 4, 2005
Hello

I compiled your RTOS 2.5.4 for AVR-IAR but this warnings occured i n Tasks.c file,how overcome these bugs?(the problem is to be "signed" or not to be)

I used IAR v3.20 for AVR

static void prvInitialiseTCBVariables( tskTCB *pxTCB, unsigned portSHORT usStackDepth, const signed portCHAR * const pcName, unsigned portCHAR ucPriority )
{
pxTCB->usStackDepth = usStackDepth;

/* Make sure the name is not too long before copying it into the TCB. */
--->if( strlen( pcName ) < ( unsigned portSHORT ) tskMAX_TASK_NAME_LEN )
{
portENTER_CRITICAL();
--->strcpy( pxTCB->pcTaskName, pcName );
portEXIT_CRITICAL();
}
else
{
portENTER_CRITICAL();
--->strncpy( pxTCB->pcTaskName, pcName, ( unsigned portSHORT ) tskMAX_TASK_NAME_LEN );
portEXIT_CRITICAL();
pxTCB->pcTaskName[ ( unsigned portSHORT ) tskMAX_TASK_NAME_LEN - ( unsigned portSHORT ) 1 ] = '\0';
}


Warning[Pe167]: argument of type "signed char const *" is incompatible with parameter of type "char const *"
Warning[Pe167]: argument of type "signed char *" is incompatible with parameter of type "char *"
Warning[Pe167]: argument of type "signed char const *" is incompatible with parameter of type "char const *"
Warning[Pe167]: argument of type "signed char *" is incompatible with parameter of type "char *"
Warning[Pe167]: argument of type "signed char const *" is incompatible with parameter of type "char const *"


Best Regards
Yaaavar

RE: IAR AVR 3.20 compile warning? why?

Posted by Richard on January 4, 2005
The IAR compiler is unusual in that it has particularly pedantic checking - but then supplies libraries that have 'char' types (as defined by the C standard) compiled as 'unsigned char', hence the warnings.

The FreeRTOS source code is compiled with a lot of different compilers so cannot deviate from the standard to remove warnings for one particular compiler. This is the only port that generates compilation warnings.

You can either modify the source code to typecast and in so doing remove the warnings, or modify the project to suppress the warnings, or ignore them.

This problem is listed on the port WEB page - see the section "6. Compiler Warnings".

Unfortunately the IAR port is not supported any more as I no longer have access to the compiler. The limitations with the IAR inline assembler make the port less than optimal anyway, with GCC providing a much cleaner solution.


[ 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