Thanks Steve. I will give a try to that...
Other subject :
I have added a new "page offset" option in TKG-Flash CLI. This allows to flash a bin firmware file from any bootloader at the right address.
The stm32duino bootloader flash at FLASH BASE+ 0x2000, last version of HID bootloader flash at +0x800, older version of HID booloader flash at 0x1000, etc... When you need to upload a bin file compiled and linked to a specific address with a different bootloader, most of the time, you will recompile the firmware. Not this time maybe ?
With that "-o" option, you add some pages to the usual start page (@FLASH BASE + 0x1000 also for a 4k bootloader size) to match the bin file original address. The booloader will flash at the offset required, but will also write the MSP / Reset handler in its first "user" page, so the vector table will be valid.
Ex : myfirmware.bin was compiled to be uploaded with the stm32duino bootloader, at @FLASH BASE + 0x2000 but my bootloader flash at 0x1000.
With a medium density Bluepill, the page size is 0x400 bytes. So I need to offset (0x2000- 0x1000) / 0x400 pages=> 4 pages.
Will do the adjustment, and will launch the firmware at the right address.