diff options
| author | Ayke van Laethem <aykevanlaethem@gmail.com> | 2018-02-06 18:45:23 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-07-18 17:12:25 +1000 |
| commit | 1b988f1e7d2b333fd908cc0555d92b112d66ab7e (patch) | |
| tree | 7e873c94e2a51e4251644a12067ba40e3dd10a18 | |
| parent | c1cd7e5155c7dccac60985f2758951199eaf8b74 (diff) | |
nrf/mpconfigport: Reduce GC stack size for nrf51.
This frees 128 bytes of .bss RAM on the nRF51, at the cost of possibly
more expensive GC cycles. Leave it as-is on the nRF52 as that chip has a
lot more RAM.
This is also done in the micro:bit:
https://github.com/bbcmicrobit/micropython/blob/a7544718a7138a04168e8e6b283e14e500ffbe8b/inc/microbit/mpconfigport.h#L6
| -rw-r--r-- | ports/nrf/mpconfigport.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h index 61729f6d0..cfb7187b7 100644 --- a/ports/nrf/mpconfigport.h +++ b/ports/nrf/mpconfigport.h @@ -55,6 +55,9 @@ #else #define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT) #endif +#if NRF51 +#define MICROPY_ALLOC_GC_STACK_SIZE (32) +#endif #define MICROPY_OPT_COMPUTED_GOTO (0) #define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (0) |
