Quality RTOS & Embedded Software

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


Loading

PIC24/dsPIC port: frame pointer ?

Posted by Dave Nadler on October 6, 2012
Hi - Richard's instructions for this port say the 'Omit Frame Pointer' option within the MPLAB C30 optimisation dialogue must be checked:
http://www.freertos.org/portpic24_dspic.html
Unfortunately this option causes the debugger not to function sensibly (can't see local variables or function arguments).
I did a test and leaving this unchecked - all seems to work OK.
Before I dig deeper, any quick hint as to why this option might really be necessary ?
Thanks as always,
Best Regards, Dave

RE: PIC24/dsPIC port: frame pointer ?

Posted by Richard on October 6, 2012
Sorry not to be of more help - but I can't remember the details. The port was written a long time ago, and it might be that the version of the compiler used now no longer requires the frame pointer to be omitted. I know this is true of old ARM7 GCC versions where the frame pointer caused problems, whereas the latest ARM7 GCC versions are fine. As the PIC24 compiler is based on GCC, it might be true there too.

Reagrds.

RE: PIC24/dsPIC port: frame pointer ?

Posted by Dave Nadler on October 7, 2012
OK, I'll dig further and report back.
Thanks Richard !
Best Regards, Dave

RE: PIC24/dsPIC port: frame pointer ?

Posted by Richard Damon on October 7, 2012
I believe the problem went away when the vPortYeid function was changed from C with inline assembly to pure ASM. I think that the problem was that the way the optimization worked, not using it created wrong code here. I seem to remember that from a few years ago.

RE: PIC24/dsPIC port: frame pointer ?

Posted by Dave Nadler on October 9, 2012
Hi Richard - I read port.c and can't find any reason the frame-pointer should cause problems. Testing with the frame-pointer in place shows no issues that I can find anyway (on PIC24F). As omitting the frame pointer makes debug impossible, I suggest removing this recommendation - your thoughts ?
Thanks,
Best Regards, Dave

RE: PIC24/dsPIC port: frame pointer ?

Posted by Richard Damon on October 10, 2012
When I first started using the PIC24/dsPic port about 5 years ago, port.c had the code for portYield using inline assembly. As I remember it was really only port.c that needed to have the option set for, the rest of the code could use the frame pointers.
Shortly after that, a new version came out that put portYield as assembly, and I thought that got around the problem. I forget exactly what was the real source of the issue, I think it was a GCC bug with frame pointers (since mplab was based on GCC), and with that routine converted to assembly, the bug couldn't bite.

RE: PIC24/dsPIC port: frame pointer ?

Posted by Dave Nadler on October 10, 2012
Thanks for the clarification !
Best Regards, Dave


[ 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