diff options
author | Damien George <damien.p.george@gmail.com> | 2019-07-03 12:55:57 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-07-03 12:55:57 +1000 |
commit | ef00048fed079c922a4e2bc9ce854cc3824e2bfc (patch) | |
tree | 05ab4e7b127c9959eec6ae31ce149358d5781772 /extmod/modwebrepl.c | |
parent | fa2c7ece8f0c48cab77098f8f4ffe940c459dfee (diff) |
extmod/modwebrepl: Add config option to put filebuf[512] on stack/bss.
Since the esp8266 has a small stack this buffer is kept in the BSS.
Diffstat (limited to 'extmod/modwebrepl.c')
-rw-r--r-- | extmod/modwebrepl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/extmod/modwebrepl.c b/extmod/modwebrepl.c index 3c0cfe72f..c92d1dc1b 100644 --- a/extmod/modwebrepl.c +++ b/extmod/modwebrepl.c @@ -245,7 +245,11 @@ STATIC mp_uint_t _webrepl_read(mp_obj_t self_in, void *buf, mp_uint_t size, int } if (self->data_to_recv != 0) { - static byte filebuf[512]; + // Ports that don't have much available stack can make this filebuf static + #if MICROPY_PY_WEBREPL_STATIC_FILEBUF + static + #endif + byte filebuf[512]; filebuf[0] = *(byte*)buf; mp_uint_t buf_sz = 1; if (--self->data_to_recv != 0) { |