Hi,
I'm afraid there isn't a demo code for your case. You have to make it by yourself. Please read the Kinetis Bootloader v2.0.0 Reference Manual for the detail of the command.
But I think there is a way to speed up your work. There is a project called BusPal in NXP_Kinetis_Bootloader_2_0_0\apps\bus_pal which is an embedded software tool that is available as a companion to blhost. The tool acts as a bus translator with an established connection with blhost over UART and with the target device over I2C, SPI, or CAN. You can take it as a middle level component of your project.
Regards,
Jing