Thanks for the helpful tips!
By analyzing resulted .hex files and core2-flasher source code, I figured out how to use stm32loader to flash hFramework firmware.
The main problem is that stm32loader does not erase flash memory at all when there are protected pages (or I’m doing something wrong). So I start by performing a write unprotect:
stm32loader -c rpi -W
Then, I erase memory and flash the bootloader:
stm32loader -c rpi -e -w -v bootloader_1_0_0_core2.bin
And now I write the firmware starting at the 0x08010000 address:
stm32loader -c rpi -w -v -a 0x08010000 myproject.bin
Flashing the bootloader each time is kind of a hassle but I can live with that.
The thing I’m concerned right now is this line in core2-flasher source code:
res = writeMemory(0x08008000, "\x00\x00\xff\xff", 4);
which writes 4 bytes at 0x08008000 address.
Is this some necessary step? I haven’t noticed any problems without it.