We detect you are using an unsupported browser. For the best experience, please visit the site using Chrome, Firefox, Safari, or Edge. X

MPLAB® XC32 Compiler

The MPLAB® XC32 C/C++ Compiler is a powerful, optimizing compiler that converts your ISO C and C++ programs into high-performance, assembly-language instructions to run bare metal on our 32-bit PIC® microcontrollers and SAM microcontrollers and microprocessors. This compiler offers many command-line options and language extensions that enable full access to the device’s hardware features, including Tightly Coupled Memory (TCM), L1 cache coherence, and best-fit memory allocation.

Whether you're working on Microchip devices with 32-bit Arm® or MIPS® cores, the MPLAB XC32 Compiler empowers you to optimize and fine-tune your code for efficiency and minimize your development time for bare-metal or RTOS embedded applications. 

MPLAB XC32 Compiler v4.35 Released


This release provides the following new features. Please see the release notes for more detailed information.

  • New runtime-performance optimization heuristics for Arm® Cortex®-M cores, enabled at optimizations O2 and O3
  • New code-size optimization heuristics for Arm Cortex-M cores
  • Faster memcpy() and related string functions for both Arm Cortex and MIPS cores
  • Reduced code size with data-initialization compression
  • Assembler improvements for Arm Cortex-M4 with FPU, including supporting additional instruction syntax and mnemonics

IMPORTANT: Upcoming change in the default function in the C Compiler—a future MPLAB XC32 release will change the default for the C Compiler from -fcommon to -fno-common. We recommend changing your projects to use -fno-common now to prepare for this upcoming change. The -fno-common option inhibits the merging of tentative definitions by the linker, so you get a multiple-definition error if the same variable is accidentally defined in more than one compilation unit. In MPLAB X Integrated Development Environment (IDE) v6.1x, you can find this option under [Project Properties » xc32-gcc » Option categories: Optimization » Use common tentative definitions: Disable].

NOTE: MPLAB X IDE v6.15 performance improvement—the MPLAB X IDE v6.15 release introduced a significant improvement to the loading speed of MPLAB XC32 output ELF files with DWARF debugging information. We recommend upgrading to MPLAB X IDE v6.15 or later for improved project build/load times.

MPLAB XC32 Compiler Downloads


Title
Version Number
Date
MPLAB XC32 C-Compiler (Windows)
56b028e3... fac2
4.35 18 Sep 2023 Download
MPLAB XC32 C-Compiler (macOS)
f4664a26... 79c2
4.35 18 Sep 2023 Download
MPLAB XC32 C-Compiler (Linux)
56004fd6... 2709
4.35 18 Sep 2023 Download
MPLAB XC32 C-Compiler Source 4.35 18 Sep 2023 Download

MPLAB XC32 Compiler Documentation 


Title
Date
MPLAB XC32 Release Notes 18 Sep 2023 Download
MPLAB XC32 C/C++ Compiler User's Guide for PIC32C/SAM MCUs 19 Jun 2023 Download
MPLAB XC32 C/C++ Compiler User's Guide for PIC32M MCUs 19 Jun 2023 Download
MPLAB XC32 Assembler, Linker and Utilities User's Guide 19 Jun 2023 Download
MPLAB XC32 Users Guide for Embedded Engineers 30 Mar 2017 Download
32-Bit Language Tools Libraries 15 Oct 2012 Download
MPLAB XC32 Users Guide for Embedded Engineers - Code Examples 08 Aug 2023 Download

MPLAB XC32 Functional Safety Downloads


Title
Version Number
Date
MPLAB XC32 FuSa Compiler (Windows)
00b51538... 215a
4.09 18 May 2022 Download
MPLAB XC32 FuSa Compiler (OSX)
23f17702... defd
4.09 18 May 2022 Download
MPLAB XC32 FuSa Compiler (Linux)
6897958b... aa0a
4.09 18 May 2022 Download
MPLAB XC32 FuSa ReadMe 4.09 18 May 2022 Download