Autodetect flash size on runtime.