Programming HEX using MPLAB X IPE v6.15, leads to PIC not starting

673 Views Asked by At

When programming my PIC18F6722 using MPLAB IDE v8.91 (the 32bit version), my PIC works and starts successfully, but when I use the HEX generated from MPLAB IDE, but program it using MPLAB X IPE, the programming part is successful, but my PIC does not start up.

2

There are 2 best solutions below

0
B.Adlane On BEST ANSWER

Bug resolved. The issue was that MPLAB IPE was overwriting my configuration bits.. I only had to change the configuration bits in MPLAB IPE, to correspond to the ones already set in MPLAB IDE v8 (they were set via the code)

Comparing HEXs from both a successful PIC and a failed PIC told me that the issue was in the configuration bits (with the help of other people on the internet)

1
Dan1138 On

It is likely that you are programming a HEX file that will only run in a debug session invoked from the MPLABX IDE.

When programming a device using the MPLABX IPE only a HEX file built to run without debug will work.

For MPLABX v6.15 Microchip, in their infinite and near God like wisdom, changed the default action for the build icons on the tool ribbon to do a debug build.

Now to do a release build open the icon option list and select the second choice.

Incremental build: Incremental build

Clean and build: Clean and build