1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00
Files
esp8266/cores/esp8266/debug.h
Earle F. Philhower, III d96c8f393e Move some exception strings to PROGMEM (#5050)
The memory allocation failure message was accidentally stored in RAM
and not in PROGMEM.

panic() did not place the __FILE__ string in PROGMEM, either.

Move both to PROGMEM, save ~64 bytes of heap (depends on size of path
of the Arduino core library).
2018-08-16 08:15:02 -07:00

34 lines
602 B
C

#ifndef ARD_DEBUG_H
#define ARD_DEBUG_H
#include <stddef.h>
#include <stdint.h>
#ifdef DEBUG_ESP_CORE
#define DEBUGV(...) ets_printf(__VA_ARGS__)
#endif
#ifndef DEBUGV
#define DEBUGV(...)
#endif
#ifdef __cplusplus
void hexdump(const void *mem, uint32_t len, uint8_t cols = 16);
#else
void hexdump(const void *mem, uint32_t len, uint8_t cols);
#endif
#ifdef __cplusplus
extern "C" {
#endif
void __panic_func(const char* file, int line, const char* func) __attribute__((noreturn));
#define panic() __panic_func(PSTR(__FILE__), __LINE__, __func__)
#ifdef __cplusplus
}
#endif
#endif//ARD_DEBUG_H