15.3.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/<version>/bin/xc32-gcc -mprocessor=32MZ2048ECH100 -mchp-stack-usage -O0 test.c