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] [April 2007 Threads] GCC ARM port and use of -fomit-frame-pointerPosted by *anonymous on April 14, 2007 I see the GCC ARM port issue regarding thread unsafe function returns is still biting people. I find the use of -fomit-frame-pointer interferes with some debuggers' abilities to unwind the stack. Some time ago I suggested a FreeRTOS port fix for it. I have been using the fix successfully for some time now. It seems to take care of the issue. I think it should be in the official ARM port so that the problem doesn't keep coming back.
Here it is again (without explanation):
In the portSAVE_CONTEXT() macro of portmacro.h add the commented line in the position shown below
____/* Set R0 to point to the task stack pointer. */
________"STMDB SP,{SP}^ nt"
________"NOP nt"
________"SUB SP, SP, #4 nt"
________"LDMIA SP!,{R0} nt"
/*gb - step over possible GCC stacked items (GCC bug)*/
________"SUB R0, R0, #8 nt"
GCC ARM port and use of -fomit-frame-pointerPosted by nobody on April 19, 2007 No response to this? Looks like a good idea.
Does this mean it uses an extra 8 bytes of RAM for each context? Should not be a problem I don't think.
GCC ARM port and use of -fomit-frame-pointerPosted by *anonymous on April 19, 2007 Yes, eight bytes of stack space are wasted for each task, except the running task (and except for those tasks that were in the non thread-safe state when their context was saved). Also, the cost of a context switch goes up by the execution of one register-to-register instruction.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|