diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-12-04 18:32:10 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-12-04 18:32:10 +1100 |
| commit | da1d849ad19eb04f3dea27e24ca723343225824e (patch) | |
| tree | 2662d4edc0c682d63670a41461d1aa419fb67e62 | |
| parent | 31cf528c754c5cf42410ff7c5471f0235493c0f2 (diff) | |
stm32,esp8266,cc3200: Use MICROPY_GC_STACK_ENTRY_TYPE to save some RAM.
| -rw-r--r-- | ports/cc3200/mpconfigport.h | 1 | ||||
| -rw-r--r-- | ports/esp8266/mpconfigport.h | 1 | ||||
| -rw-r--r-- | ports/stm32/mpconfigport.h | 7 |
3 files changed, 9 insertions, 0 deletions
diff --git a/ports/cc3200/mpconfigport.h b/ports/cc3200/mpconfigport.h index ee9a226e5..b1c68a2dc 100644 --- a/ports/cc3200/mpconfigport.h +++ b/ports/cc3200/mpconfigport.h @@ -34,6 +34,7 @@ // options to control how MicroPython is built +#define MICROPY_GC_STACK_ENTRY_TYPE uint16_t #define MICROPY_ALLOC_PATH_MAX (128) #define MICROPY_PERSISTENT_CODE_LOAD (1) #define MICROPY_EMIT_THUMB (0) diff --git a/ports/esp8266/mpconfigport.h b/ports/esp8266/mpconfigport.h index 890c4069e..ab3fe3584 100644 --- a/ports/esp8266/mpconfigport.h +++ b/ports/esp8266/mpconfigport.h @@ -3,6 +3,7 @@ // options to control how MicroPython is built #define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C) +#define MICROPY_GC_STACK_ENTRY_TYPE uint16_t #define MICROPY_ALLOC_PATH_MAX (128) #define MICROPY_ALLOC_LEXER_INDENT_INIT (8) #define MICROPY_ALLOC_PARSE_RULE_INIT (48) diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h index 2c052d77f..42e0bf3f1 100644 --- a/ports/stm32/mpconfigport.h +++ b/ports/stm32/mpconfigport.h @@ -32,6 +32,13 @@ #include "mpconfigboard_common.h" // memory allocation policies +#ifndef MICROPY_GC_STACK_ENTRY_TYPE +#if MICROPY_HW_SDRAM_SIZE +#define MICROPY_GC_STACK_ENTRY_TYPE uint32_t +#else +#define MICROPY_GC_STACK_ENTRY_TYPE uint16_t +#endif +#endif #define MICROPY_ALLOC_PATH_MAX (128) // emitters |
