Nice idea... But that isn't what I need. Devices already have communication with PC or internet, so transferring data to device isn't problem.
I want to create one bootloader that will flash device from I2C EEPROM. Reason for that is that I2c is simple communication, so it won't take lot of space.
Code for communication is already in main app. So there is no need to have 10-20Kof code to get file from server. Download hex in main app, then goto bootloader, and write that data to FLASH.
For now I have working ERASECODE and WRITECODE to erase, and then write new code. And it's working... But still don't understand how to write config.
I need to understand how to parse hex file, and extract FLESH and EEPROM data... There is bootloader application from microchip written in VB6, so that shouldn't be problem.