stm32/main: Make thread and FS state static and exclude when not needed.
Without the static qualifier these objects will be kept by the linker even
if they are unused.  So this patch saves some RAM when these features are
unused by a board.
void SystemClock_Config(void);
-pyb_thread_t pyb_thread_main;
-fs_user_mount_t fs_user_mount_flash;
+#if MICROPY_PY_THREAD
+STATIC pyb_thread_t pyb_thread_main;
+#endif
+
+#if MICROPY_HW_ENABLE_STORAGE
+STATIC fs_user_mount_t fs_user_mount_flash;
+#endif
void flash_error(int n) {
for (int i = 0; i < n; i++) {
