stm32: Implement flash size meter

Signed-off-by: Andrew 'Necromant' Andrianov <andrew@ncrmnt.org>