Quality RTOS & Embedded Software

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


Loading

dspic33 & gcc -fomit-frame-pointers

Posted by Rich Painter on May 28, 2008
I am using freertos 5.0.
I am using MPLAB 8.10, dspic33 and C30 3.10 from Microchip.

armag1234 raised the issue with -fomit-frame-pointers in http://sourceforge.net/forum/forum.php?thread_id=1888310&forum_id=382005 for which I had asked for my info. But no reply...

So, I will ask the group these questions:

1. Why must -fomit-frame-pointers be used for freertos compilation? It seems to me that if there is a need to decouple the gcc frame pointer for freertos so it can perform context switching then why is this option ONLY set for the specific freertos module(s) that deal with the switch?

2. Better yet, since the context switch is so important, especially for speed why don't we have the context switch module in an assembler module? (I could write one if that would help.)

3. Do we have to use -fomit-frame-pointers on ALL our gcc modules in the entire load? If so, why (see Q1).

4. When I use -O3 gcc optimization on the freertos src the system acts strangely. I'm still looking in to why... Does anyone have any input on this?

thanks,
rich



RE: dspic33 & gcc -fomit-frame-pointers

Posted by Dave on May 29, 2008
Q1 and 3. That would be for Richard to answer.

Q2. This is just a portability thing. It would not be possible to maintain assembly code that would be different for every port. Currently only the push pop of registers is in assembly code.

Q4. The PIC32 port works fine at -O3, sorry I cannot comment on the dsPIC port.


RE: dspic33 & gcc -fomit-frame-pointers

Posted by Richard on May 29, 2008
This is from memory, I would have to double check.

The context switch in the PIC24 port is quite simple and just uses a function call. The way the function exits has to be identical to the way interrupts exit (for the most part). If the frame pointer is used the function epilogue code changes, meaning the exit code no longer matches that used in interrupts.

You might get away with just port.c using the -f-omit-frame-pointer option. Try it and see. The other alternative would be to use an assembly file instead of a C file for the yield function so you control the code exactly, this would remove the need (I think) for the -fomit-frame-pointer flag altogether.

Regards.


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

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

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.


Careers

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

Renesas

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