diff options
author | Stefan Agner <stefan@agner.ch> | 2016-09-20 20:37:58 -0700 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2016-09-20 20:41:11 -0700 |
commit | b0a46900de885644c30414caeb4d39fae493e931 (patch) | |
tree | 2165194d72d9c56341a7668fa0283254de9e3a29 | |
parent | 7ea3fa2641d6f3ea5a3ff2454dbfa89540e43f0b (diff) | |
download | micropython-b0a46900de885644c30414caeb4d39fae493e931.tar.gz micropython-b0a46900de885644c30414caeb4d39fae493e931.zip |
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.
-rw-r--r-- | stmhal/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/stmhal/main.c b/stmhal/main.c index 2446225034..e7fff69d9b 100644 --- a/stmhal/main.c +++ b/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"; |