Quality RTOS & Embedded Software

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


Loading

IAR AVR 5.40 warning

Posted by Zal Zalak on February 3, 2010
Hello

I compiler freeRTOS demo project for AVR with IAR ver 5.40 ,but the compiler generates 1 warning at line 422 of tasks.c file:
pxTopOfStack = ( portSTACK_TYPE * ) ( ( ( unsigned long ) pxTopOfStack ) & ( ( unsigned long ) portBYTE_ALIGNMENT_MASK ) );

this is warning message of compiler:
Warning[Pe1053]: conversion from integer to smaller pointer E:\freeRTOS_AVRProj\freeRTOS\tasks.c 422

Please help me to edit this line and file for removing this warning.

best regards
Zal




RE: IAR AVR 5.40 warning

Posted by MEdwards on February 3, 2010
Try changing the tow (unsigned long) casts to (unsigned portSTACK_TYPE) or just (portSTACK_TYPE) if it is already unsigned. Post back if this works or not.

RE: IAR AVR 5.40 warning

Posted by Zal Zalak on February 6, 2010
The above change will not work !

please help me Mr barry.




RE: IAR AVR 5.40 warning

Posted by Bernardo on February 9, 2010
To solve it you can cast to unsigned int instead of unsigned long, it works and it should be correct because pointers are two bytes in size, as so the correct cast is to a two-byte wide type.


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


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

Careers

FreeRTOS and other embedded software careers at AWS.


Latest News

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


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

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