Under each chip architecture directory (Wiced/Platform/ARM_Cortex_xx/<specific chip type>) there is a directory called bootloader_ota which contains all the platform specific bootloader and OTA upgrade functionality. The specific file of interest is called platform_bootloader.c and it contains the functions that:
You are free to modify those functions to implement the functionality you require however it is recommended that you make copy of the chip architecture you are changing and give it a custom name.
Some things to note when creating a new/modified chip architecture:
You will need to rename the makefile so that it matches the name of the directory. e.g Wiced/Platform/ARM_Cortex_M3/my_STM32F2xx/my_STM32F2xx.mk
In your platform makefile change the declaration of $(NAME)_COMPONENTS to the address of your new chip e.g. $(NAME)_COMPONENTS := common/ARM_Cortex_M3/my_STM32F2xx
We recommend creating a duplicate chip architecture to ensure you always have a copy of the original reference code that will assist you in finding any bugs that might occur while you are doing your changes. Having your own chip architecture can also make it easier to migrate to new SDK revisions as it will permit you to copy and paste your directory into the new SDK and then compare the old and new revisions to see if there are any changes you may need to port to your modified chip architecture.