Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists