Commit b0a46900 authored by Stefan Agner's avatar Stefan Agner
Browse files

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.
parent 7ea3fa26
...@@ -165,9 +165,8 @@ static const char fresh_readme_txt[] = ...@@ -165,9 +165,8 @@ static const char fresh_readme_txt[] =
"Please visit http://micropython.org/help/ for further help.\r\n" "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 // avoid inlining to avoid stack usage within main()
// want it to be executed without using stack within main() function MP_NOINLINE STATIC void init_flash_fs(uint reset_mode) {
void init_flash_fs(uint reset_mode) {
// init the vfs object // init the vfs object
fs_user_mount_t *vfs = &fs_user_mount_flash; fs_user_mount_t *vfs = &fs_user_mount_flash;
vfs->str = "/flash"; vfs->str = "/flash";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment