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.
This commit is contained in:
Damien George 2019-01-11 01:52:17 +11:00
parent 5b66c7b712
commit 3431ea7205

View File

@ -65,8 +65,13 @@
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++) {