FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2008 Threads] ISR wrapper required ? - ARM7/LPC2378/GCCPosted by Andreas Pretzsch on June 26, 2008 Environment: 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. */ portSAVE_CONTEXT(); /* Call the handler. This must be a separate function from the wrapper to ensure the correct stack frame is set up. */ XXXHandler(); /* Restore the context of whichever task is going to run next. */ portRESTORE_CONTEXT(); }
RE: ISR wrapper required ? - ARM7/LPC2378/GCCPosted 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/GCCPosted 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 CFLAGS+=-fomit-frame-pointer
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...
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|