detect flash_ram size for stm32f2 and stm32f4