34 Document Revision History

Revision A (August 2018)

  • Initial revision of the document.

Revision B (April 2020)

Revision C (May 2023)

  • Updated the stated size and information relating to the double type, which is now 64 bits wide.
  • Corrected examples of using the __pack specifier.
  • Updated information on the compiler option controls available in the MPLAB X IDE.
  • Provided dedicated sections on all compiler options in addition to a summary table.
  • Added new section on the compiler's code coverage feature.
  • Added a new section on the stack and the stack guidance feature.
  • Added -f[no-]common option description, which controls the placement of global variables defined without an initializer.
  • Added -Warray-bounds option description, which can warn on out-of-bounds array indices and pointer offsets.
  • Added -Wmultistatement-macros option description, which warns on unsafe macro expansion.
  • Added -Wsizeof-pointer-div option description, which warns on suspicious divisions involving pointers.
  • Indicated that the -foptimize-register-move option no longer has any effect.
  • Added information on the iar argument to the -mext option.
  • Added information on the used variable attribute.
  • Added information on the externally_visible function attribute and variable attribute.
  • Expanded information on the naked function attribute.
  • Updated and expanded the sections relating to variables in program memory, reflecting changes in the compiler.
  • Expanded information on fixed-point types and arithmetic.
  • Expanded information on interrupt context switching.
  • Updated information on the runtime startup code, including information on the data initialization template.
  • Added information on smart IO library features.
  • Expanded information on optimizations performed.
  • Added section on preprocessor arithmetic.
  • Added information on the default_function_attributes, default_variable_attributes, message, GCC optimize, pack, and weak pragmas.
  • Removed reference to the __PIC__ and __pic__ position independent code macros, which are no longer supported.
  • Indicated in the default linker script information that selecting an alternate DFP will affect the script used.
  • Added information on __builtin_mfc0 and __builtin_mtc0 built-in functions.
  • Corrected information relating to the return value for the __builtin_bcc0, __builtin_bsc0, and __builtin_bcsc0 built-in functions.

Revision D (September 2023)

  • Merged the MIPS-related library content in the 32-Bit Language Tools Libraries document into this guide.
  • Updated references to the C++ standard to reflect that the ISO/IEC 14882:2014 C++ program language is now supported.
  • Renamed references to the MPLAB XC16 compiler to be MPLAB XC-DSC to reflect the change in product name.
  • Defined the compiler's implementation-defined behavior for the C++14 standard in a new section.
  • Clarified information in the runtime startup section.
  • Updated Common C Interface chapter to reflect recent changes in MPLAB XC compilers.
  • Removed reference to MPLAB XC8 in the Embedded Compiler Compatibility Mode chapter, as this compiler no longer supports this mode.

Revision E (June 2024)

  • Added new How To explaining how the stack usage for each function in a module can be displayed
  • 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
  • Updated information relating to runtime startup files
  • Added the following option descriptions to the guide:
    -mmalloc-variant-mips16e--version
    -mlibc-variant-std-Wformat-smart-io
    -dA-fdiagnostics-show-caret-fframe-base-loclist
    -mno-info-linker-ffat-lto-objects-finline-small-functions
    -flto-partition-fpeel-loops-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
  • Updated the Dynamic Memory Allocation section to include the new allocation schemes
  • Updated several items in the Common C Interface section to improve readability and include the XC-DSC compiler
  • Expanded the description of the __builtin_disable_interrupts and __builtin_enable_interrupts Built-in Functions

Revision F (June 2025)

  • Modified compiler command-line examples to now use the -mdfp option
  • Update dreferenced compiler installation paths from pic32mx to pic32m
  • Updated the paths where the runtime startup code files can be found after extraction from the shipped archive file
  • Indicated that improved object file compatibility might mean that some Microchip-specific features may not work with third party tools_p
  • Added more information to the -mdfp option regarding the use of DFPs
  • 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 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
  • Adjusted the default setting for the feature controlled by -fcommon, which has recently changed in the compiler
  • 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 address attribute
  • Added description of the -msemihost option
  • Added description of the -finline option
  • Added description of the -ftree-vrp option
  • Added description of the -nostdlib++ option
  • Clarified that objects and library archives built with LTO enabled are platform dependent
  • Corrected typo in -fcall-used-reg option description
  • Removed floating-point macro definitions that are now documented in the Microchip Unified Standard Library Reference Guide
  • Removed information on the default_function_attributes and default_variable_attributes, which had been incorrectly added
  • 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 function have arbitrary names
  • Added new section relating to the thread-local storage (TLS) memory management feature relevant for programs using threads
  • Added description of new __thread object qualifier
  • Added description of new __has_builtin operator
  • Added description of new access attribute
  • Added description of new __builtin_has_attribute built-in function
  • Added descriptions for new __builtin_bswap16, __builtin_bswap32, and __builtin_bswap64 built-in functions
  • Provided more examples of function attributes
  • Clarified that care must be taken when using inline assembly code that defines labels
  • 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.