-->
Page 1 of 1

Support for bigger flash sizes?

PostPosted: Mon Apr 13, 2015 6:16 am
by uhrheber
Hi.
Is it possible to add support for bigger flash sizes?
I have a bunch of 64Mbit flash chips here, and would like to try them.

Thanks
Uhrheber

Re: Support for bigger flash sizes?

PostPosted: Wed Apr 15, 2015 7:46 am
by draco
Support in terms of what? I am running the ESP8266 Arduino port on my ESP-12, which has a 32Mbit flash. It works fine, but the boards.txt file limits the Arduino IDE to building a 512k firmware. I can't imagine a way I would realistically write an Arduino sketch that would even approach that 512k limit... But it would be nice to utilize the extra space in the SPI flash for data storage.

I've poked into the EEPROM library for the ESP8266 Arduino, and it looks like it should be possible to do something very similar to access all that extra flash space. I am planning to see if I can get a crude version of it working when I can find the time.

What I think would be really awesome is a port of SPIFFS which could use everything >512k as a nice place to write files. the LUA firmware has it already, so it's obviously possible -- not sure I have the smarts to integrate that with Arduino, unfortunately. But it would be awesome!

Re: Support for bigger flash sizes?

PostPosted: Sun Apr 19, 2015 5:27 pm
by Ben Baron
You should just need to modify the boards.txt file to change

Code: Select allgeneric.upload.maximum_size=524288


to

Code: Select allgeneric.upload.maximum_size=4194304


or however big your flash is.


In my case, I added a new board type for the ESPD-12 model (ESP-12 with 32mbit flash) which has the larger size. You could easily add a new board type for your large flash boards if you can get the flash wired up.

Here's my boards.txt file:

Code: Select allmenu.UploadSpeed=Upload Speed
menu.CpuFrequency=CPU Frequency

##############################################################
generic.name=Generic ESP8266 Module

generic.upload.tool=esptool
generic.upload.speed=115200
generic.upload.resetmethod=ck
generic.upload.maximum_size=524288
generic.upload.wait_for_upload_port=true
generic.serial.disableDTR=true
generic.serial.disableRTS=true

generic.build.mcu=esp8266
generic.build.f_cpu=80000000L
generic.build.board=ESP8266_ESP01
generic.build.core=esp8266
generic.build.variant=generic

generic.menu.CpuFrequency.80=80 MHz
generic.menu.CpuFrequency.80.build.f_cpu=80000000L
generic.menu.CpuFrequency.160=160 MHz
generic.menu.CpuFrequency.160.build.f_cpu=160000000L

generic.menu.UploadSpeed.115200=115200
generic.menu.UploadSpeed.115200.upload.speed=115200
generic.menu.UploadSpeed.9600=9600
generic.menu.UploadSpeed.9600.upload.speed=9600
generic.menu.UploadSpeed.57600=57600
generic.menu.UploadSpeed.57600.upload.speed=57600
generic.menu.UploadSpeed.256000=256000
generic.menu.UploadSpeed.256000.upload.speed=256000
generic.menu.UploadSpeed.921600=921600
generic.menu.UploadSpeed.921600.upload.speed=921600


##############################################################
espd12.name=ESPD-12

espd12.upload.tool=esptool
espd12.upload.speed=115200
espd12.upload.resetmethod=ck
espd12.upload.maximum_size=4194304
espd12.upload.wait_for_upload_port=true
espd12.serial.disableDTR=true
espd12.serial.disableRTS=true

espd12.build.mcu=esp8266
espd12.build.f_cpu=80000000L
espd12.build.board=ESP8266_ESP01
espd12.build.core=esp8266
espd12.build.variant=espd12

espd12.menu.CpuFrequency.80=80 MHz
espd12.menu.CpuFrequency.80.build.f_cpu=80000000L
espd12.menu.CpuFrequency.160=160 MHz
espd12.menu.CpuFrequency.160.build.f_cpu=160000000L

espd12.menu.UploadSpeed.115200=115200
espd12.menu.UploadSpeed.115200.upload.speed=115200
espd12.menu.UploadSpeed.9600=9600
espd12.menu.UploadSpeed.9600.upload.speed=9600
espd12.menu.UploadSpeed.57600=57600
espd12.menu.UploadSpeed.57600.upload.speed=57600
espd12.menu.UploadSpeed.256000=256000
espd12.menu.UploadSpeed.256000.upload.speed=256000
espd12.menu.UploadSpeed.921600=921600
espd12.menu.UploadSpeed.921600.upload.speed=921600


##############################################################
wifio.name=Wifio

wifio.upload.tool=esptool
wifio.upload.speed=115200
wifio.upload.resetmethod=wifio
wifio.upload.maximum_size=524288
wifio.upload.wait_for_upload_port=true

wifio.build.mcu=esp8266
wifio.build.f_cpu=80000000L
wifio.build.board=ESP8266_WIFIO
wifio.build.core=esp8266
wifio.build.variant=wifio

wifio.menu.CpuFrequency.80=80MHz
wifio.menu.CpuFrequency.80.build.f_cpu=80000000L
wifio.menu.CpuFrequency.160=160MHz
wifio.menu.CpuFrequency.160.build.f_cpu=160000000L

wifio.upload.tool=esptool