There seems to be 256kB of extra flash. The program tests only 32kB of it.
It seems that the STM32 processors are often sold as smaller capacity devices. I.e. the manufacturer does not bother to actually make 256 kB parts separately, but instead sells the 512 kB parts as 256 kB. It could also be that there is some error in the extra flash, which is why it would be sold as 256 kB device - but I have not found any problems so far.
I’m not sure how the bootloader would act on a smaller capacity device, and that is why I only test the 32 kB region corresponding to APP4 in second bank. This way if the second bank does not exist, the test program will not overwrite anything else but itself.
Because the current space per application is only 32kB, the 256kB of extra flash is a big thing.