nrf: Enable persistant code loading
This allows us to load .mpy files stored in the filesystem without having to invoke the compiler (e.g. with a much lower memory overhead). Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>wasp-os
parent
0abaa09f89
commit
d11200432c
|
@ -34,7 +34,7 @@
|
|||
#define MICROPY_VFS (0)
|
||||
#endif
|
||||
#define MICROPY_ALLOC_PATH_MAX (512)
|
||||
#define MICROPY_PERSISTENT_CODE_LOAD (0)
|
||||
#define MICROPY_PERSISTENT_CODE_LOAD (1)
|
||||
#ifndef MICROPY_EMIT_THUMB
|
||||
#define MICROPY_EMIT_THUMB (0)
|
||||
#endif
|
||||
|
@ -71,9 +71,16 @@
|
|||
#define MICROPY_FATFS_RPATH (2)
|
||||
#define MICROPY_FATFS_MULTI_PARTITION (1)
|
||||
|
||||
// TODO these should be generic, not bound to fatfs
|
||||
#define mp_type_fileio fatfs_type_fileio
|
||||
#define mp_type_textio fatfs_type_textio
|
||||
#if MICROPY_VFS_FAT
|
||||
#define mp_type_fileio mp_type_vfs_fat_fileio
|
||||
#define mp_type_textio mp_type_vfs_fat_textio
|
||||
#elif MICROPY_VFS_LFS1
|
||||
#define mp_type_fileio mp_type_vfs_lfs1_fileio
|
||||
#define mp_type_textio mp_type_vfs_lfs1_textio
|
||||
#elif MICROPY_VFS_LFS2
|
||||
#define mp_type_fileio mp_type_vfs_lfs2_fileio
|
||||
#define mp_type_textio mp_type_vfs_lfs2_textio
|
||||
#endif
|
||||
|
||||
// use vfs's functions for import stat and builtin open
|
||||
#if MICROPY_VFS
|
||||
|
@ -117,7 +124,7 @@
|
|||
#define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (0)
|
||||
#define MICROPY_PY_CMATH (0)
|
||||
#define MICROPY_PY_IO (1)
|
||||
#define MICROPY_PY_IO_FILEIO (0)
|
||||
#define MICROPY_PY_IO_FILEIO (1)
|
||||
#define MICROPY_PY_UERRNO (0)
|
||||
#define MICROPY_PY_UBINASCII (0)
|
||||
#define MICROPY_PY_URANDOM (0)
|
||||
|
|
Loading…
Reference in New Issue