diff options
author | Damien George <damien.p.george@gmail.com> | 2014-07-29 23:15:35 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-07-29 23:15:35 +0100 |
commit | 07133415d26d740b866f4542222bb92c06c863d1 (patch) | |
tree | fa160e4e73cf93fe7b70eaec9ed881eb0fecb7b5 /unix | |
parent | d0f5e61ab58892ecd3b0838adeea3cde330da3f1 (diff) | |
parent | 5b7fd20fea6d4329bb3ab45f63df41f46f242688 (diff) | |
download | micropython-07133415d26d740b866f4542222bb92c06c863d1.tar.gz micropython-07133415d26d740b866f4542222bb92c06c863d1.zip |
Merge pull request #738 from dhylands/except-args
Add support for storing args during an exception raised by an irq.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/main.c | 3 | ||||
-rw-r--r-- | unix/mpconfigport.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/unix/main.c b/unix/main.c index 03718c22e5..936d7a13a0 100644 --- a/unix/main.c +++ b/unix/main.c @@ -278,6 +278,9 @@ int main(int argc, char **argv) { char *heap = malloc(heap_size); gc_init(heap, heap + heap_size); #endif +#if MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF + mp_init_emergency_exception_buf(); +#endif qstr_init(); mp_init(); diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index ce4365d365..ff30eec340 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -64,6 +64,9 @@ #define MICROPY_GCREGS_SETJMP (0) #endif +#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1) +#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (128) + extern const struct _mp_obj_module_t mp_module_os; extern const struct _mp_obj_module_t mp_module_time; extern const struct _mp_obj_module_t mp_module_socket; |