An alternative is to go a different way and receive the new firmware by your application and do a self-update. It requires storing the received new firmware in an unused region of flash and then copy it over once it has been fully received. How to do this (receiving as well as updating) is left to your application.
I made a bootloader that just checks on start whether a valid (by CRC) image is in flash. If so, it copies it over to the working area and erases the image. How it was placed there is unimportant (the application will receive it through its normal wireless link). It won't work if the currently running application is faulty, but for a field-update with a verified firmware, this is good enough.