Quality RTOS & Embedded Software

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


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 ]    [ 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.

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.


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


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