I've finished off the firmware upload code but I canonly test on my little NanoVNA-H (STM32F072 MCU), I can't test on the H4, so proceed with caution.
If you try it and it fails then do let me know, and also make sure you have an ST-Link of some sorts to hand to recover your VNA.