Browse Source

stmhal: Use attribute to avoid inlining.

Use MP_NOINLINE macro to avoid inlining of init_flash_fs. This helps
to keep stack usage of main() low.
pull/2439/head
Stefan Agner 8 years ago
parent
commit
b0a46900de
  1. 5
      stmhal/main.c

5
stmhal/main.c

@ -165,9 +165,8 @@ static const char fresh_readme_txt[] =
"Please visit http://micropython.org/help/ for further help.\r\n"
;
// we don't make this function static because it needs a lot of stack and we
// want it to be executed without using stack within main() function
void init_flash_fs(uint reset_mode) {
// avoid inlining to avoid stack usage within main()
MP_NOINLINE STATIC void init_flash_fs(uint reset_mode) {
// init the vfs object
fs_user_mount_t *vfs = &fs_user_mount_flash;
vfs->str = "/flash";

Loading…
Cancel
Save