Use PROGMEM for menu entries to save RAM #82

Merged
chschu merged 1 commits from feature/optimize-menu-entries into master 2021-04-10 17:09:56 -05:00
chschu commented 2021-02-14 08:58:31 -06:00 (Migrated from github.com)

Description

This PR uses PROGMEM for the LCD menu entries, saving a lot of RAM.

When building for env:MEGA_X from the current master:

RAM:   [========= ]  85.1% (used 6968 bytes from 8192 bytes)
Flash: [=====     ]  52.0% (used 132074 bytes from 253952 bytes)

With the changes from this PR:

RAM:   [========  ]  76.2% (used 6242 bytes from 8192 bytes)
Flash: [=====     ]  51.7% (used 131362 bytes from 253952 bytes)

Benefits

Freeing RAM allows increasing buffer sizes or adding features without risking a stack overflow.

Configurations

Any configuration that uses AnycubicTouchscreenClass.

None that I know of.

### Description This PR uses PROGMEM for the LCD menu entries, saving a lot of RAM. When building for env:MEGA_X from the current master: ``` RAM: [========= ] 85.1% (used 6968 bytes from 8192 bytes) Flash: [===== ] 52.0% (used 132074 bytes from 253952 bytes) ``` With the changes from this PR: ``` RAM: [======== ] 76.2% (used 6242 bytes from 8192 bytes) Flash: [===== ] 51.7% (used 131362 bytes from 253952 bytes) ``` ### Benefits Freeing RAM allows increasing buffer sizes or adding features without risking a stack overflow. ### Configurations Any configuration that uses AnycubicTouchscreenClass. ### Related Issues None that I know of.
knutwurst commented 2021-04-10 17:10:14 -05:00 (Migrated from github.com)

Ahh.. that's a great Idea! Thank you very much!

Ahh.. that's a great Idea! Thank you very much!
Sign in to join this conversation.
No description provided.