Build a Project For Release

Last modified by Microchip on 2024/06/24 06:34

​Release Mode

A project built in Release mode is capable of running independently on the target hardware without any control or intervention by MPLAB® X IDE and any of its associated debug tools. When connected to a debug tool, MPLAB X IDE has no control of a target device in release mode other than to hold it in reset or to program it.

There are several options available when building a project in release mode. It is not necessary to explicitly choose a "Release" mode when performing a release build.

Build Project Build Project (Make)
Builds (makes) the project in release mode. This will build only files that have changed since the last build.

Rebuild Project  Clean and Build Project (Build All / Rebuild)
Cleans (deletes) all files generated by the previous build and then builds all files in the project in release mode.

Run Project Run Project
Builds (makes) the project in release mode, programs the target, and releases the device from reset so that the program starts running. The debug tool has no control over the program's execution in this mode.

Program Target Program Target Project
Programs the target device in release mode and holds the target device in reset.

The build process in MPLAB X IDE is a little different from other development environments. If you are working with a target board and wish to build and run your code on it, you do not need to do a Build or Clean and Build first. Instead, you simply need to do a Run Project.

The Run Project button performs the following tasks:

  1. Build (make) the project in release mode.
  2. If there are no build errors, your application is programmed into the target device using the debug/programming tool selected in the project options.
  3. The target device is released from reset and your code begins running unless you have selected Hold In Reset from the toolbar.

You DO NOT normally need to explicitly do a Build Build Projector Clean and Build Rebuild Project first. The Run Project Run Project and Program Target Project Program Target functions do a build (make) automatically.