Do you need to change the XC8 or XC16 or XC32 compiler optimization level? You can choose it on below window.




There are two kinds of method to select Project Properties.


1. MPLAB X --> Project name --> "Right click on project name" --> Properties

2. MPLAB X --> Dashboard --> Properties



Please refer to the optimization level option as below.


- 0 - Do not optimize. The compiler’s goal is to reduce the cost of compilation and to make debugging produce the expected results.
- 1 - Optimize. Optimizing compilation takes somewhat longer, and a lot more host memory for a large function. The compiler tries to reduce code size and execution time.
- 2 - Optimize even more. The compiler performs nearly all supported optimizations that do not involve a space-speed trade-off.
- 3 - Optimize yet more favoring speed (superset of O2).

- s - Optimize yet more favoring size (superset of O2). 


Posted by KennyShin
,