Quality RTOS & Embedded Software

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


Loading

port PIC24 and mplab compiler options

Posted by GregK on February 11, 2009
Hi
I have two issue

1. In FreeFRTOS' documentation to demo PIC24 is:

<quote>
Compiler options
As with all the ports, it is essential that the correct compiler options are used. The best way to ensure this is to base your application on the provided demo application files. In particular the 'Omit Frame Pointer' option within the MPLAB C30 optimisation dialogue must be checked.
<>

But when I open demo in version 5.1.1 and 5.1.2 I see options:

"-fno-omit-frame-pointer -g -Wall -DMPLAB_PIC24_PORT -mlarge-code -mlarge-data -O1 -fno-schedule-insns -fno-schedule-insns2"

so we have "NO" omit-frame-pointer... (-fno-omit... vs. -f-omit... ) it seems be confusing a little bit.
Which is correct?

2. Assuming -fno-omit-frame-pointer is correct what is reason to use that option?
I am asking for just academic reason, I suspect is something connected with context switch? I try understand limitations of this port.
From documentation of compiler for example instrict function: __builtin_return_address can not use -fomit-frame-pointer, but not other warnings or limits in documentation (DS51284H).

Best Regards
/Greg




RE: port PIC24 and mplab compiler options

Posted by PICmeup on February 11, 2009
-fno-omit-frame-pointer was needed because the PIC24 compiler generated bugged code when it not used. Maybe this is fixed now.

RE: port PIC24 and mplab compiler options

Posted by GregK on February 11, 2009
I have gcc version

v3.11 (B)
30 July 2008

Is good to know if it was fixed, and add proper comment to documentation that this flag is needed with version less then X.XX.

How I can check that?

Kind Regards




RE: port PIC24 and mplab compiler options

Posted by Richard on February 11, 2009
I think V3.10B was the version that introduced the bug. Prior to this the no-omit-frame-pointer options was not required. Check the C30 release notes.

Regards.

RE: port PIC24 and mplab compiler options

Posted by GregK on February 11, 2009
from README.html:

Fixed Issues
v3.11
Compiler

(...)
C30-523 - Interrupt functions can overwrite saved value of W14
This error applies only to interrupt service routines. This could cause an _AddressError trap or a reset. Valid work-arounds (if not applying this patch) are to use -fno-omit-framepointer or use no_auto_psv with interrupt functions.


I will try test this, mayby tommorow.
Kind Regards

RE: port PIC24 and mplab compiler options

Posted by GregK on February 17, 2009
I tested my application and I do not see any side effects with compiler 3.11.
Without -fno-omit-frame-pointer is slightly less rom size and stack usage, but could be significant only in really big project (tested with -O3).

BTW:
Demo documentation is still wrong, I expected someone fixed that.
“'Omit Frame Pointer' option within the MPLAB C30 optimisation dialogue must be checked.”
If is checked then to options is added “-fomit-frame-pointer”, not “-fno-omit-frame-pointer” mplab 8.15.


[ 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