• AVR Freaks

Hot!Enabling the Procedural Abstraction code-size optimization for SAM/PIC32C target devices

Author
JasonK
Moderator
  • Total Posts : 3404
  • Reward points : 0
  • Joined: 2003/11/14 09:49:40
  • Location: Microchip Technology in Arizona, USA
  • Status: offline
2020/02/26 10:49:31 (permalink)
0

Enabling the Procedural Abstraction code-size optimization for SAM/PIC32C target devices

MPLAB XC32 v2.40 (PRO) introduces a new aggressive code-size optimization called Procedural Abstraction. See the release notes for some information about this new optimization. This new optimization is available for the Thumb and Thumb2 instruction sets used on target devices featuring an ARM Cortex-M core such as the SAM MCUs.
 
To enable this new optimization in MPLAB X v5.30 or v5.35, add the -mpa option to the "Additional options" field in the project properties as shown here.
 
Future MPLAB X releases will add a new checkbox in the project properties for this new optimization.
 

Jason Kajita
 Follow me on Twitter
http://support.microchip.com for urgent questions
#1

3 Replies Related Threads

    JasonK
    Moderator
    • Total Posts : 3404
    • Reward points : 0
    • Joined: 2003/11/14 09:49:40
    • Location: Microchip Technology in Arizona, USA
    • Status: offline
    Re: Enabling the Procedural Abstraction code-size optimization for SAM/PIC32C target devic 2020/02/26 13:08:23 (permalink)
    0
    I should add that we have run Procedural Abstraction on a number of internal benchmarking projects that we have here at Microchip and we have seen improvements from less than 1% up to 38%. We would be interested to hear what improvement you see on your real-world application.

    Jason Kajita
     Follow me on Twitter
    http://support.microchip.com for urgent questions
    #2
    aschen0866
    Super Member
    • Total Posts : 4546
    • Reward points : 0
    • Joined: 2006/01/08 22:18:32
    • Location: San Diego
    • Status: offline
    Re: Enabling the Procedural Abstraction code-size optimization for SAM/PIC32C target devic 2020/02/26 15:15:23 (permalink)
    0
    What's the reason for making -mpa an option of its own rather than being part of -Os?
    #3
    JasonK
    Moderator
    • Total Posts : 3404
    • Reward points : 0
    • Joined: 2003/11/14 09:49:40
    • Location: Microchip Technology in Arizona, USA
    • Status: offline
    Re: Enabling the Procedural Abstraction code-size optimization for SAM/PIC32C target devic 2020/02/27 06:44:15 (permalink)
    +1 (1)
    aschen0866
    What's the reason for making -mpa an option of its own rather than being part of -Os?

    It's mostly precedent set by XC16. However, it's also because there is a performance penalty for enabling this optimization. We can revisit that decision once we get some feedback from all of you.

    Jason Kajita
     Follow me on Twitter
    http://support.microchip.com for urgent questions
    #4
    Jump to:
    © 2020 APG vNext Commercial Version 4.5