
I am using this bootloader in the KM34 microcontroller. In the bootloader code, I only changed the memory addresses to make it compatible with the KM34.
The mem_write function is a wrapper that uses the flash_program function to write to flash. However, it executes faster than the flash_program function, which I used directly in my application.
You can find this function in "bl_context.c"

In this file, there is a structure named g_bootloaderContext, which contains a structure variable called memoryInterface. The value of g_memoryInterface is assigned to it, and within g_memoryInterface, you will find the mem_write function.

I have attached the bootloader SDK example that I'm using.