mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Move ASSERT() macro file text to PMEM (#3477)
Every assert() includes a __FILE__ constant string to RODATA which can be quite large as it includes the complete path as well as the filename. Move that string into PMEM, and update the postmortem to work with either PMEM or RAM strings for dumping abort/assert/exception information.
This commit is contained in:
committed by
Ivan Grokhotkov
parent
f5b6e16474
commit
a662e81146
@ -7,13 +7,14 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "_ansi.h"
|
||||
#include <pgmspace.h>
|
||||
|
||||
#undef assert
|
||||
|
||||
#ifdef NDEBUG /* required by ANSI standard */
|
||||
# define assert(__e) ((void)0)
|
||||
#else
|
||||
# define assert(__e) ((__e) ? (void)0 : __assert_func (__FILE__, __LINE__, \
|
||||
# define assert(__e) ((__e) ? (void)0 : __assert_func (PSTR(__FILE__), __LINE__, \
|
||||
__ASSERT_FUNC, #__e))
|
||||
|
||||
# ifndef __ASSERT_FUNC
|
||||
|
Reference in New Issue
Block a user