|
15 | 15 | #define MICROPY_PORT_MODE MODE_REPL_NEWLIB |
16 | 16 | #endif |
17 | 17 |
|
18 | | -// Use CORE_FEATURES ROM level as base, then explicitly enable what we need |
19 | | -#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_CORE_FEATURES) |
| 18 | +// Use EXTRA_FEATURES for full-featured REPL_NEWLIB, CORE_FEATURES for minimal modes |
| 19 | +#if (MICROPY_PORT_MODE == MODE_REPL_NEWLIB) |
| 20 | + #define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES) |
| 21 | +#else |
| 22 | + #define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_CORE_FEATURES) |
| 23 | +#endif |
20 | 24 |
|
21 | 25 | // Float support - disabled for HEADLESS and REPL_UART to eliminate libc dependencies |
22 | 26 | #if (MICROPY_PORT_MODE == MODE_REPL_NEWLIB) |
23 | 27 | #define MICROPY_PY_BUILTINS_FLOAT (1) |
24 | 28 | #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT) |
25 | 29 | #define MICROPY_PY_MATH (1) |
26 | | - #define MICROPY_PY_CMATH (0) |
27 | 30 | #else |
28 | 31 | #define MICROPY_PY_BUILTINS_FLOAT (0) |
29 | 32 | #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_NONE) |
30 | 33 | #define MICROPY_PY_MATH (0) |
31 | | - #define MICROPY_PY_CMATH (0) |
32 | 34 | #endif |
33 | 35 |
|
34 | 36 | #define MICROPY_ENABLE_COMPILER (1) |
|
65 | 67 | #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_NONE) |
66 | 68 | #endif |
67 | 69 | #define MICROPY_PY_BUILTINS_COMPLEX (0) |
| 70 | +#define MICROPY_PY_CMATH (0) |
68 | 71 | #define MICROPY_PY_IO (0) // no file system or streams |
69 | 72 |
|
70 | 73 | // Explicitly enable modules we need (some may not be in CORE_FEATURES) |
|
79 | 82 | #define MICROPY_PY_BINASCII (1) |
80 | 83 | #define MICROPY_PY_RE (1) |
81 | 84 | #define MICROPY_PY_HEAPQ (1) |
82 | | -#define MICROPY_PY_HASHLIB (0) |
83 | 85 | #define MICROPY_PY_JSON (1) |
84 | 86 | #define MICROPY_PY_UCTYPES (1) |
85 | 87 |
|
|
89 | 91 | #define MICROPY_PY_MACHINE_MEMX (1) |
90 | 92 | #define MICROPY_PY_MACHINE_SIGNAL (0) |
91 | 93 |
|
| 94 | +// Additional modules for REPL_NEWLIB mode only |
| 95 | +#if (MICROPY_PORT_MODE == MODE_REPL_NEWLIB) |
| 96 | + // Cryptographic hashing for checksums and data integrity |
| 97 | + #define MICROPY_PY_HASHLIB (1) |
| 98 | + #define MICROPY_PY_HASHLIB_SHA1 (1) |
| 99 | + #define MICROPY_PY_HASHLIB_SHA256 (1) |
| 100 | +#else |
| 101 | + #define MICROPY_PY_HASHLIB (0) |
| 102 | +#endif |
| 103 | + |
92 | 104 | #define MICROPY_PY_SYS (1) |
93 | 105 | #define MICROPY_PY_SYS_MODULES (1) |
94 | 106 | #define MICROPY_PY_SYS_PLATFORM "riscv-emu.py" |
|
0 commit comments