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:
parent
5b66c7b712
commit
3431ea7205
@ -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++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user