Hi,
Pls refer to the following website:
MCU Bootloader | NXP Semiconductors
On the host side, you have to develop the software like blhost tools. The blhost tools is open source, you can refer to it and adapts it to the host MCU. It is okay to port the blhost tools to MCU, but the task is huge I suppose.
Bootloader Host Application (blhost)
On the target side FRDM-KV31, the bootloader is not integrated into the flash of KV31, you have to install it to the flash of KV31.
The bootloader project is also in SDK package, you can compile and download it to flash of KV31.
https://mcuxpresso.nxp.com/en/welcome
Hope it can help you
BR
XiangJun Rong