RAM is quite limited in ESP8266. The article below explains tricks that can be used to get extra free RAM.
https://blog.attachix.com/get-extra-fre ... n-esp8266/
It should work for both NONOS and FreeRTOS SDKs.
Additional free RAM for ESP82266.
Re: Additional free RAM for ESP82266.
Postby pratik » Wed Sep 21, 2016 11:04 am
Hello,
A good post!
However, a note to all users doing that - be extremely careful with alignment issues on old compiler versions! If you store a const array of 16-bit (short) type, and directly read it from flash - you will get a fatal exception for misaligned access.
For stuff stored in flash, you must access it with word alignment and in blocks of 4 bytes for reliable program.
A good post!
However, a note to all users doing that - be extremely careful with alignment issues on old compiler versions! If you store a const array of 16-bit (short) type, and directly read it from flash - you will get a fatal exception for misaligned access.
For stuff stored in flash, you must access it with word alignment and in blocks of 4 bytes for reliable program.

Re: Additional free RAM for ESP82266.
Postby eriksl » Mon Oct 10, 2016 9:43 pm
Use readonly strings from flash instead, no hassle with aligning and lots of space to be reclaimed. Just make sure every string is copied to a temporary buffer in RAM before passing the string to os_printf, because these functions count on the strings being in RAM. I have been using this mechanism for over a year and it works like a charm, freeing up lots of RAM.
Who is online
Users browsing this forum: No registered users and 332 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.