15.4.3 Enabling the Stack Usage Report

The feature can be used only when a PRO XC32 license is present. The stack-usage report is enabled through the -mchp-stack-usage command-line option, which is passed to XC32 when the Stack Guidance checkbox is enabled in the MPLAB X Project Properties.

To enable Stack Usage Analysis from MPLAB X, set Stack Guidance in Project Properties > XC32 > Analysis.

Figure 15-2. Project Properties for Stack Guidance

or pass -mchp-stack-usage in command line.

xc32-gcc -mprocessor=ATSAME54P20A
                                        -mdfp="Microchip/SAME54_DFP/3.9.244" -mchp-stack-usage -O0 test.c