Browse Source

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.
pull/4486/head
Damien George 6 years ago
parent
commit
3431ea7205
  1. 9
      ports/stm32/main.c

9
ports/stm32/main.c

@ -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…
Cancel
Save