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


ISR wrapper required ? - ARM7/LPC2378/GCC

Posted by Andreas Pretzsch on June 26, 2008
FreeRTOS 5.0
ARM7 / NXP LPC2378
gcc 4.2.2 ; binutils 2.18

Based on some (maybe historic) comment in the forum and/or mailing list, I use the below construct for all my interrupt handlers.
Can anybody confirm or negate this is still needed or was needed at all ?

Thanks in advance,
A. Pretzsch

static void XXXHandler(void)
// real ISR

static void XXXIsr(void) __attribute__ ((naked));
static void XXXIsr(void)
/* Save the context of the interrupted task. */
/* Call the handler. This must be a separate function from the wrapper
to ensure the correct stack frame is set up. */
/* Restore the context of whichever task is going to run next. */

RE: ISR wrapper required ? - ARM7/LPC2378/GCC

Posted by Dave on June 26, 2008
As you are probably aware this was to work around a GCC bug. I don't know if the latest GCC versions have fixed this or not but I think it is a good idea to keep it there.

RE: ISR wrapper required ? - ARM7/LPC2378/GCC

Posted by Andreas Pretzsch on June 26, 2008
Well, now I am :-)

I've got another remark in my Makefile, probably related:
# Probably needed due a compiler bug up till 4.2.1, see
# http://sourceforge.net/forum/message.php?msg_id=4594229

I didn't have a look at the exact cause by now, neither at the current compiler status.

Do you know who discovered the problem, maybe he knows more ?
Might be worth a FAQ on the FreeRTOS site.
I'm not a fan of keeping workarounds forever...

[ 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