@No_Name wrote:
It seems that I have to create a protocol and a special bootloader for firmware updates via VCP
Correct.
Although, as noted, you don't have to do all that from scratch - there are plenty of existing building blocks you can use.
@No_Name wrote:
It seems that I have to ... using HAL Flash ?
You don't have to use HAL
@No_Name wrote:
is HAL Flash safe for updating firmware larger than 400> kb via a custom bootloader 0x8000000 64kb?
No more nor less "safe" than any other way of doing it.
And, as @Tesla DeLorean said, beware that you can't be executing code from the same flash that you're erasing/programming...