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



Posted by Nobody/Anonymous on November 9, 2006
I've tried to make a FreeRTOS port for imagecraft's ICCAVR compiler, but i can't it get to work in avrstudio simulator. I don't understand, what should functions portENTER_CRITICAL() and portEXIT_CRITICAL() to do, because in both ports are they quite different.
Has anyone already done port to iccavr?
Please help me


Posted by Nobody/Anonymous on November 9, 2006
Enter and exit critical should always do the same thing or at least have the same effect. Which two ports are you comparing?


Posted by Nobody/Anonymous on November 10, 2006
the IAR port has this:
void vPortEnterCritical( void )

void vPortExitCritical( void )
if( uxCriticalNesting == portNO_CRITICAL_NESTING )

and the GCC port:
#define portENTER_CRITICAL()
asm ( "in__tmp_reg__, 0x3F" );\
asm ( "cli" );\
asm ( "push__tmp_reg__" )

#define portEXIT_CRITICAL()
asm ( "pop__tmp_reg__" );\
asm ( "out0x3F, __tmp_reg__" )


Posted by Nobody/Anonymous on November 10, 2006
These effectively do the same thing.

The idea is not to nest calls. In other words if you call:


interrupts are not reenabled until the second call to portEXIT_CRITICAL().

The GCC port does this by pushing the status flags onto the stack within each call to portENTER_CRITICAL(). A second or third call to portENTER_CRITICAL() will already have interrupts disabled when the flags are pushed, so popping the flags will not re enable interrupts again until the first push is popped.

The IAR port simply keeps a count of the number of time portENTER_CRITICAL() is called, and does not re-enable interrupts until the count reaches zero. The count has to be stored as part of the task context as each task has its own count.


Posted by Nobody/Anonymous on November 11, 2006
OK,thank you for explaining.
I've found in meantime, that a port to iccavr exists. This is at http://www.dragonsgate.net/icc_forums/showthread.php?t=3&highlight=freertos,
but i cant download it. I've registered there, but i'm still not able to download it. Deos anyone have that file?

[ 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