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 2016-09-20 20:37:58 -07:00
rodzic 7ea3fa2641
commit b0a46900de
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -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";