Skip to content

Conversation

earlephilhower
Copy link
Collaborator

Store the UMM debug format strings in PMEM instead of RODATA. Frees around 300 bytes of RAM with debugging disabled, much more when debugging is enabled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're doing this, can we also #define printf(...) printf_P(__VA_ARGS__)? It will make it much easier to upgrade umm to upstream version, if we ever want to do that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the collaborator status. I'm happy to help out.

I'll refactor the patch this weekend and put in a new one with printf() macro'd instead of the changes inline.

@igrr
Copy link
Member

igrr commented Aug 1, 2017

(p.s. Thank you for all the contributions — I have also added you as collaborator to the repository!)

UMM debugging strings are normally placed in RODATA, which uses up scarse
memory.  Move them to PROGMEM and use macros to replace printf with a
version that can handle ROM strings.
@earlephilhower
Copy link
Collaborator Author

Here's the new, 2-liner.

@igrr igrr merged commit 4bed115 into esp8266:master Aug 7, 2017
d-a-v pushed a commit to d-a-v/Arduino that referenced this pull request Sep 29, 2017
UMM debugging strings are normally placed in RODATA, which uses up scarse
memory.  Move them to PROGMEM and use macros to replace printf with a
version that can handle ROM strings.
@earlephilhower earlephilhower deleted the ummdebugtopmem branch November 18, 2020 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants