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.
This commit is contained in:
parent
7ea3fa2641
commit
b0a46900de
@ -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…
Reference in New Issue
Block a user