ports/sh: enable split GC

This commit is contained in:
Lephenixnoir 2022-10-29 11:32:43 +02:00
parent f930ff95db
commit e1df7e5f0b
Signed by untrusted user: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 9 additions and 0 deletions

View File

@ -74,6 +74,14 @@ int main(int argc, char **argv)
/* Initialize MicroPython */
mp_stack_ctrl_init();
gc_init(heap, heap + sizeof(heap));
// TODO: gc_add(start, end) for each area we want to allocate to
// fx-9860G III:
// * (nothing? x_x)
// fx-CG 50:
// * The entirety of _uram
// * The entirety of the extra VRAM
// * Possibly memory past 2M
// * (keep the OS heap for normal malloc())
mp_init();
// Start a normal REPL; will exit when ctrl-D is entered on a blank line.

View File

@ -8,6 +8,7 @@
/* Main features */
#define MICROPY_ENABLE_COMPILER (1)
#define MICROPY_ENABLE_GC (1)
#define MICROPY_GC_SPLIT_HEAP (1)
#define MP_ENDIANNESS_BIG (1)
#define MICROPY_READER_POSIX (1)
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)