We went through your scenarios and found some things that may help.
#1 - The "Erase All Before Program” is disabled by default, but to enable it, you can do a “Read” operation first in IPE and the option would be applied. You can uncheck the drop down and then program. This will erase (or not) the memory image before programming. The other option is to use the “Preserve program memory” option.This would also not erase everything and preserve the needed.
I agree that this is not intuitive and will create a request to add better usability to this.
#2 and #3, was not able to duplicate this. But hopefully if #1 works for you, you will not need to use hexmate to combine the images as you were doing. We also didn't see any issues with programming the full range either.
We were using MPLAB X IDE v5.30 for our analysis.
Let us know if you have any problems in performing a READ first.
Howard, thanks for chiming in and attempting to duplicate.
I went the route of using "Preserve Program Memory Range(s)" when programming the application section after bootloader. I'm not sure how I may have missed this option before, or if perhaps it was greyed out before I performed a read. I did a read before each attempt at programming. It appears to me that IPE takes memory ranges as 16-bit words, so my 32K memory device prog memory range is 0-3FFF words. So after the bootloader was flashed successfully, I checked "Preserve" and entered the memory range that my bootloader is in. Then I manually entered the range to program to be the range of the application section.
The result: with "Preserve Program Memory Range(s)" checked, and my application hex loaded, it appears IPE did not do any programming - in fact, I could watch my bootloader code continually looping (debug output) as I attempted to program, so it appears IPE did not even reset the chip to start. If I unchecked Preserve, it would actually program but the bootloader section would be, possibly as expected, erased. Here is a screenshot link of the programming window showing logs and memory settings - one the successful bootloader programming, and then the unsuccessful attempt at programming the application afterwards. https://imgur.com/a/yEGO2RY
Also, as before, the full application does not get flashed - it gets cut off somewhere around 2/3 of the way through as I described in the original post.
Here are my bootloader and app memory sections...
Bootloader: 0-17FF (bytes) = 0-0BFF (words)
Application: 1800-7FFF (bytes) = 0C00-3FFF (words)
So I'm still scratching my head here... thanks again for helping look into this.