MPLAB® XC8 C Compiler

Microchip’s latest compiler line, the MPLAB® XC, provides a comprehensive solution for your project’s development software needs and replaces all MPLAB C and HI-TECH compilers. The MPLAB XC8 compiler:

  • Supports all 8-bit PIC® MCUs
  • Integrates with MPLAB® X IDE to provide a full graphical front end:
    • Editing errors and breakpoints match the corresponding lines in source code
    • Single step through C source code to inspect variables and structures at critical points
    • Data structures with defined data types, including floating point, display in watch windows
  • Runs on Windows, Linux and Mac OS X
  • Offers different optimization levels to suit your needs with FREE downloads available
Click image to enlarge.

 Self-Paced Training

The material in these training modules exists elsewhere on this site in a general reference format. However, the training modules present it in an organized, step-by-step sequence to help you learn the topic from the ground up.

 Frequently Asked Questions

How do I change the output.hex file name in MPLAB® X IDE?
The Extended CPU Mode configuration bit is enabled, but the program was not built using extended CPU instructions.
Why Does It Take So Long To Build My Project?
Can the XC8 Compiler check for MISRA compliance?
What could cause glitches on an output port?
What could cause pins in a port to change from values I assign to them?
What could cause corrupted variables or code failure when I am using interrupts?
How do I fix errors relating to 'illegal conversion between pointer types' or 'illegal conversion of integer to pointer'?
Why don't the line numbers in an error message match the problematic line of code?
What does an error like "Can’t generate code" mean?
Why do I get the fixup error, and how can I correct it?
Why do I get an "Arithmetic overflow in constant expression" message?
Why a "Can’t find space error" message is issued even though there is plenty of space left in a device’s memory?
How do I interpret the pointer reference graph in the list file generated by the XC8 compiler?
How do I interpret the call graph in the XC8 list file?
Where can I find the call graph produced by the XC8 Compiler?
How can I use the TO and PD bits to determine the cause of reset on PIC® devices?
How do I access a variable in external program space of PIC18 Device?
How do I fill unused program memory with a known value using the XC8 compiler?
How do I position code or variables at a specific location with the XC8 compiler?
How do I ensure declarations are consistent across files?
How do I write and read data from EEPROM using the XC8 compiler?
How do I program the PIC® MCU's ID Locations?
How do I read the OSCCAL value for my PIC® device?
How do I access bits in a RAM variable?
How can I speed up my interrupt service routine?
How do I write interrupt routines in XC8?
How do I create an array of pointers in program space (ROM)?
What does printf() output to in an XC8 program?
Why are some of my variables shown as not used?
Why are SFRs undefined in my assembly code?
How can I create a delay in my XC8 program?
Can I access XC8 C pointers from assembly code?
What do I need to do to C code that assigns an integer to a pointer when migrating this code to the XC8 compiler?
When should I cast an expression?
Do I need to do anything to C source code that contains a #pragma interrupt_level directive with XC8 compiler?
What do I need to do to assembly code that reserves data memory when migrating this code to XC8 compiler?
Do I need to do anything to a project that includes user-defined libraries when porting this to XC8 compiler?
How do I allow C variables to be accessed by assembly code that expects them in certain banks?
Is there any limit to the size of objects I can define?
What are the nesting limits of function calls on 8-bit PIC® devices?
Can I define a function that will be expanded inline?
Does XC8 Compiler support malloc-style functions?
Does the XC8 compiler support the extended instruction set?
Why don’t checksums or fills work when generating a binary output?
How can I reserve memory and prevent it be used by the compiler?
What Identifier lengths are supported in the XC8 Compiler?
How can I create a library?
Can I install two or more versions of the XC8 compiler?
How do I install XC8 compiler on a Linux Machine?
How do I install Mac version of XC8 compiler?
Where can I find the older compiler versions?
Where can I find information about compiler messages?
Does the same XC8 Compiler serial number work with Windows, OS X and Linux compilers?
Are administrator rights required to use the compiler in MPLAB® X IDE?
What is HPA (High Priority Access)?
Do you support this device?

20th Annual
Microchip MASTERs Conference 2016

JW Marriott Desert Ridge Resort-Phoenix, AZ

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.