[TUT][SOFT] How to set up MPLAB-X IDE to use different compilers (Windows OS)

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Some time ago,  JohanEkdahl wrote a tutorial on how to setup Atmel Studio to use different compilers.

I will use the same format for MPLAB-X IDE 5.xx, limited to Windows, since this is the OS I'm using. But extension to other OSes should be straightforward. Forgive some plagiarism from the original tutorialblush


  1. Pull down the Tools menu and select Options...
  2. In the dialogue that follows, choose the Embedded sub-dialogue.
  3. Select the Build Tools tab.
  4. Press the Add... button.
  5. In the Add New Toolchain dialogue that follows, set the Base Directory. This is the path to the folder containing the compiler, linker etc (often "bin"). Note that there is a button to the right allowing you to browse to the folder (rather than typing the path in the text box).
  6. The toolchain target will be auto-detected, but it can be manually changed in the corresponding drop-down menu if needed.
  7. Press the OK button.
  8. You now have a new toolchain installed, but it might still not be usable, because the compiler version is often incorrectly detected. More on that later...




To use the new toolchain, do this:


  1. Pull down the Production menu and select Set Project Configuration -> Customize...
  2. The Project Properties dialogue window will appear, on the left side there is a list titled Categories:. Select the Conf: list item.
  3. You will now see on the right side a list of available toolchains, titled Compiler Toolchain:.
  4. Select a toolchain and press the OK button.



If you are using a third party toolchain, that is, not from Microchip/Atmel, the setup process will not detect the correct version number and will always display "v1.00".

The toolchain will then be unselectable (pretty convenient "bug", if you ask me... deterring users from non-microchip toolchains).


However this can be fixed:

  1. Close the MPLAB-X IDE.
  2. Open the file {user_path}\AppData\Roaming\mplab_ide\dev\v5.15\config\Preferences\com\microchip\mplab\nbide\embedded.properties in your favorite text editor.
  3. On windows, this directory is usually hidden, so make the necessary configuration adjustments to find this file. For other OSes, this config file should not be too hard to find, either.
  4. Search the file for the 1.00 string and replace all occurrences with the correct version. In my example, 8.3.0.
  5. Save and close the config file, then open the IDE again. Now you should be able to select the new toolchain.


Enjoy ;)

Last Edited: Sat. Mar 23, 2019 - 06:07 PM