ESP8266 Thing flash and HTTPS

Is the ESP8266 Thing expected to have sufficient memory to perform an HTTPS (i.e. TLS) request? I’m using FreeRTOS and have successfully run ESP’s example HTTP request code, which has a total image size of 442,999 bytes. When I try to use their example HTTPS request code, however, the size is 555,543 bytes, and it fails to flash (MD5 error). I’m assuming this is because it’s exceeding the 512kB onboard flash memory. libmbedtls.a is 150k code+data.

I expected memory on this board to be limited, but I feel I’m possibly doing something wrong? I didn’t expect basic TLS to be beyond its reach.

I can’t say for certain if a lack of space in flash is causing your issue, but it’s very possible that’s the the problem and from what I understand you would get the error you’re seeing if the flash chip ran out of space. Our ESP8266 boards only have a 4Mb (megabit) flash chip on them, you might be able to replace that with a larger chip but I don’t know if anything else would need adjusted in the IDE to account for the larger flash.

I found a couple things that *might be useful…this topic mentions a lot of different constraints (it has enough flash for some encryption methods, but no others, for example) but this one stood out:

If you want to use TLSv1.2 you need the use the master build from GitHub. You need 160MHz clock speed and your certs/keys need to be in DER format.

See here: https://hackaday.io/project/12482-garag … ort-tlsv12

And then this one https://www.instructables.com/Using-TLS-V12-on-ESP8266/ uses a similar product with the same chip, so you may be able to achieve similar results following along there