Skip to content

Move UMM debug messages into PMEM #3478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cores/esp8266/umm_malloc/umm_malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@

#include <stdio.h>
#include <string.h>
#include <pgmspace.h>

#include "umm_malloc.h"

Expand All @@ -512,6 +513,9 @@
# define DBG_LOG_LEVEL DBG_LOG_LEVEL
#endif

// Macro to place constant strings into PROGMEM and print them properly
#define printf(fmt, ...) do { static const char fstr[] PROGMEM = fmt; char rstr[sizeof(fmt)]; for (size_t i=0; i<sizeof(rstr); i++) rstr[i] = fstr[i]; printf(rstr, ##__VA_ARGS__); } while (0)

/* -- dbglog {{{ */

/* ----------------------------------------------------------------------------
Expand Down