28 Document Revision History

Revision A (June 2019)

  • Initial revision of the document.

Revision B (October 2021)

  • Added code coverage information
  • Added stack guidance
  • Reformatted and renumbered

Revision C (April 2023)

  • Updated library information to reflect recent changes, including the Microchip Unified Standard Library
  • Corrected examples of using the __pack specifier
  • Removed 'How To' on the cause or reset, which was not appropriate for PIC32C/SAM devices
  • Updated the size of floating-point types to reflect recent compiler changes
  • Updated information on how to ensure a function is not removed
  • Updated information relating to using a debugger
  • Updated information on the compiler option controls available in the MPLAB X IDE
  • Updated information on the runtime startup code, including information on the data initialization template
  • Provided dedicated sections on all compiler options in addition to a summary table
  • Added new information on -mdfp, -mpure-code, -feliminate-unused-debug-symbols, -Og, and --dinit-compress options
  • Some options and description were not relevant for PIC32/SAM devices and were removed
  • Added divergences from the C99 language standard
  • Expanded configuration bit access information
  • Improved information on tightly coupled memories
  • Added used variable attribute
  • Added externally_visible and nopa function attributes
  • Added information on placing code in eXecute Only Memory (XOM)
  • Updated information on interrupt context switch
  • Improved information on smart IO features
  • Many general corrections and improvements

Revision D (September 2023)

  • Updated references to the C++ standard to reflect that the ISO/IEC 14882:2014 C++ program language is now supported
  • Defined the compiler's implementation-defined behavior for the C++14 standard in a new section
  • Included additional information on interrupt operation
  • Removed the CCI chapter and references to this, as CCI is not supported for C/SAM devices and the feature is disabled in the MPLAB X IDE

Revision E (June 2024)

  • Added new How To explaining how the stack usage for each function in a module can be displayed
  • Added new How To showing how to prevent a program's checksum to change
  • Added summary of supported Arm architectures and cores
  • Removed reference to the unsupported -mreserve option from a How To
  • Updated compiler options used with the Linktime Optimizations setting in XC32 Global options tab of the MPLAB X IDE Project Properties
  • Added option present in the xc32-ar (Library Archive) tab of the MPLAB X IDE Project Properties
  • Added a diagram indicating the internal compiler applications
  • Added the following options to the guide:
    -marm-mcmse-mlibc-variant
    -mmalloc-variant--version-std
    -Wformat-smart-io-dA-fdiagnostics-show-caret
    -fframe-base-loclist-mno-info-linker -madj-exiting-edge-prob
    -mauto-indexing-ffat-lto-objects-finline-small-functions
    -mloop-rename-registers-flto-partition-fpeel-loops
    -mthumb2-align-loop-ftracer-fuse-linker-plugin
    -T
  • Corrected typo in the name of what should have been the --dint-compression option and specified this with the -Wl, prefix, since it is a linker option
  • Added tcm variable attribute
  • Removed erroneous text and corrected the example in the Variables in Register section
  • Updated the Dynamic Memory Allocation section to include the new allocation schemes
  • Updated the runtime startup code section to include the on-exit feature

Revision F (June 2025)

  • Modified command-line examples to now use the -mdfp option
  • Adjusted the default setting for the feature controlled by -fcommon, which has recently changed in the compiler
  • Indicated that improved object file compatibility might mean that some Microchip-specific features may not work with third party tools
  • Clarified that the -msmart-io option does not work when using the -mchp-stdlib=picolibc option.
  • Removed the section for -aux-info, as this option is not fully supported
  • Corrected information in the -D and -U preprocessor macro option sections relating to when this option is processed
  • Corrected the name give to sections used to hold objects or functions that use the addressattribute
  • Added more information to the -mdfp option regarding the use of DFPs
  • Added description of the -msemihost and -mgeneral-regs-only options
  • Added description of the -mchp-stdlibc and -nostdlib++ options
  • Added description of the -ftree-vrp option
  • Corrected typo in -fcall-used-reg option description
  • Clarified that objects and library archives built with LTO enabled are platform dependent
  • Added new options: -Warray-compare, -Warray-parameter, -Wenum-int-mismatch, -Wmismatched-dealloc, -Wmismatched-new-delete, -Wself-move, -Wsizeof-array-div, -Wvla-parameter, -Wzero-length-bounds, -Wabsolute-value, -Waddress-of-packed-member, -Wbidi-chars, -Wc++11-extensions, -Wc++14-extensions, -Wc++17-extensions, -Wc++20-extensions, -Wc++23-extensions, -Wctad-maybe-unsupported, -Wdangling-reference, -Wdeprecated-enum-enum-conversion, -Wdeprecated-enum-float-conversion, -Wmissing-requires, -Wrange-loop-construct, -Wstring-compare, -Wstringop-overread, -Wvexing-parse, and -Wxor-used-as-pow
  • Added arguments to the -falign-functions, -falign-labels, -falign-loopsnow supported by the compiler
  • Removed floating-point macro definitions that are now documented in the Microchip Unified Standard Library Reference Guide
  • Added section describing noload variable attribute
  • Added description of the no_stack_protector attribute to discussions on stack protection feature
  • Elaborated the text in the section on inline assembly code to indicate how the present of assembly labels can lead to build failures
  • Provided code example that can save the FPU registers for interrupt handlers using floating-point code on Cortex-A devices
  • Indicated in the descriptions of the -o and -save-temps options that they additionally control the name and location of aux and dump files
  • Added new section relating to the thread-local storage (TLS) memory management feature relevant for programs using threads
  • Corrected floating-point options used for multilib generation
  • Added description of new __thread object qualifier
  • Added description of new __has_builtin operator
  • Added information relating to the picolibc library, with support for thread-local storage
  • Added new section on the __thread qualifier
  • Added description of new access and stack_protect attributes
  • Expanded information on interrupt context switching relating to FPU registers
  • Updated the example that shows how to set canary values with the stack smashing protection feature
  • Indicated that section names associated with persistent objects can vary if other attributes are used with the object
  • Indicated that section names associated with absolute objects and functions have arbitrary names
  • Added description of new __builtin_has_attributebuilt-in function
  • Added descriptions for new __builtin_bswap16, __builtin_bswap32, and __builtin_bswap64 built-in functions
  • Provided more examples of function attributes
  • Added section listing new ACLE built-in functions
  • Included xc32-objdump command to generate an assembly listing in the How Do I Know What Code the Compiler Is Producing? How To
  • Clarified the difference between Free and PRO compilers in the What's the Difference Between a Free and PRO Compiler? How To.