-->
Page 1 of 1

What size user program is possible

PostPosted: Fri Mar 13, 2015 8:23 am
by picstart
I have some PIC c code. A specific pic MCU apart from the speed, word size, interrupt, and other stuff is boxed in by program flash size and ram size.
Constants like font representations share space with the program in flash
Now converting the code to the esp8266 and seeing what happens is one way to go.
Question
if the esp8266 has 4 m bytes ( 512k byte flash was swapped out for 4 m byte) can it have (say) around 4m bytes of program space?
I'm trying to know the program space the esp8266 needs for its wifi work and what is left for general use?

Re: What size user program is possible

PostPosted: Fri Mar 13, 2015 5:27 pm
by joostn
Yes you'll have plenty of space. You need roughly 200 kbytes for the SDK libraries, and the upper 16k of flash will be used by the ESP for storing configuration data. The rest you can use for code, fonts and whatever.

Swapping out the flash chip for a 32Mbit one works fine (they are less than $1 on eBay). When building the bin file you need to indicate the actual flash size in the file header. Esptool.py now has a command line option to set this field. And you need to adjust the linker script with the actual flash size.