diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-12-29 20:44:55 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-03-05 11:30:15 +0200 |
commit | 8ab16b6af041ffd756c66e05bfc3068064dcda06 (patch) | |
tree | fb1c7b723c12b9b899037384efec3d300bbb6fda /esp8266/mpconfigport.h | |
parent | c70637bc00425a0b0076e4f7cb7ba5553b54335d (diff) | |
download | micropython-8ab16b6af041ffd756c66e05bfc3068064dcda06.tar.gz micropython-8ab16b6af041ffd756c66e05bfc3068064dcda06.zip |
esp8266: Add custom _assert() function.
Enabling standard assert() (by removing -DNDEBUG) produces non-bootable
binary (because all messages go to .rodata which silently overflows).
So, for once-off debugging, have a custom _assert().
Diffstat (limited to 'esp8266/mpconfigport.h')
-rw-r--r-- | esp8266/mpconfigport.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/esp8266/mpconfigport.h b/esp8266/mpconfigport.h index 1f823c02e9..1f7ab09e27 100644 --- a/esp8266/mpconfigport.h +++ b/esp8266/mpconfigport.h @@ -113,3 +113,5 @@ extern const struct _mp_obj_module_t mp_module_machine; #define MICROPY_HW_BOARD_NAME "ESP module" #define MICROPY_HW_MCU_NAME "ESP8266" #define MICROPY_PY_SYS_PLATFORM "ESP8266" + +#define _assert(expr) ((expr) ? (void)0 : __assert_func(__FILE__, __LINE__, __func__, #expr)) |