We do not have example project as per your requirement. To ensure a valid application in the flash, you can make use of either Dual-application bootloader or Golden Image bootloader. Both of them allow two bootloadable applications to reside in flash. However, each application has one half of the flash available from what would have been available for a "standard" bootloader project. You can find more details on dual application and golden image bootloader in below documents.