diff options
| author | hathach <thach@tinyusb.org> | 2018-08-01 10:19:20 +0700 |
|---|---|---|
| committer | hathach <thach@tinyusb.org> | 2018-08-01 10:19:20 +0700 |
| commit | 8640d3714947e6556ea80709372d5d5f9e158280 (patch) | |
| tree | f4ab579127b19ba596f8806d76d6e438b78b7b77 | |
| parent | 6333cffa7dd2b30d343830cadc32051283c21ebf (diff) | |
try to address sys module, compile ok
| -rwxr-xr-x | ports/nrf/Makefile | 1 | ||||
| -rw-r--r-- | ports/nrf/mpconfigport.h | 13 |
2 files changed, 8 insertions, 6 deletions
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 0057bdc24..99b1e88b3 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -116,6 +116,7 @@ SRC_C += \ lib/utils/context_manager_helpers.c \ lib/utils/pyexec.c \ lib/utils/stdout_helpers.c \ + lib/utils/sys_stdio_mphal.c \ lib/libc/string0.c \ lib/mp-readline/readline.c \ diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 7d7d87969..a04ddc180 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -100,13 +100,13 @@ #define MICROPY_PY_BUILTINS_SLICE_ATTRS (0) #define MICROPY_PY_SYS_EXIT (1) #define MICROPY_PY_SYS_MAXSIZE (1) -#define MICROPY_PY_SYS_STDFILES (0) -#define MICROPY_PY_SYS_STDIO_BUFFER (0) +#define MICROPY_PY_SYS_STDFILES (1) +#define MICROPY_PY_SYS_STDIO_BUFFER (1) #define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0) #define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (0) #define MICROPY_PY_CMATH (0) -#define MICROPY_PY_IO (0) -#define MICROPY_PY_IO_FILEIO (0) +#define MICROPY_PY_IO (1) +#define MICROPY_PY_IO_FILEIO (1) #define MICROPY_PY_UERRNO (0) #define MICROPY_PY_UBINASCII (1) #define MICROPY_PY_URANDOM (0) @@ -161,6 +161,9 @@ typedef int mp_int_t; // must be pointer size typedef unsigned int mp_uint_t; // must be pointer size typedef long mp_off_t; +#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len) +#define mp_type_fileio mp_type_vfs_fat_fileio + // extra built in modules to add to the list of known ones extern const struct _mp_obj_module_t microcontroller_module; @@ -223,8 +226,6 @@ extern const struct _mp_obj_module_t mp_module_ubluepy; const char *readline_hist[8]; \ mp_obj_t gamepad_singleton; \ -#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len) - // We need to provide a declaration/definition of alloca() #include <alloca.h> |
