If you want to program via I2C, you can use the internal bootloader and the AN4221 as a basis for your own development.
Hope that helps?
Regards /Peter
In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.