ESP8266:从SD卡启动到Flash新固件

时间:2019-06-14 16:45:25

标签: esp8266 arduino-esp8266 ota

我的房子里有几个ESP8266小板,用于驱动灯,探测器...。我的第一个野马是使用ESP-201。 我遇到的问题是关于闪存的大小...。随着代码的增长,没有足够的空间进行OTA重新编程。 我的第二个硬件是ESP-07,它最初有更多的内存来保存我的代码,还有OTA和Flash中的少量文件... 现在,我达到了尺寸限制,必须再次修改硬件...,我在考虑ESP-12E,它的SPI总线引脚位于底部。

我的问题是

Is there any way to use this SPI bus (with an extra CS, for exampl GPIO15) to add a SDCard ? (with the SPI bus on bottom, the 'cost' would be only one GPIO : the CS). The idea is to use the SDCard for new firmware reprogramming (with booting ESP with the SDCard instead of inside flash)
The best would be to boot from SD, startting something like a BOOT.BIN (if this file is present) which job is only to copy a second file from the SD (for example FIRMWARE.BIN) to the inside ESP flash (like OTA does, but using extern memory)... then just reboot with flash (after renaming the BOOT.BIN to _BOOT.BIN, to handle reboot with inside flash).
And then (running from flash) the SD card should be used to save / read 'standard' files (logs, html pages,....), that will free the SPIFFS space on flash.

通过这种方式,重新编程仅需要将文件(物理上或通过空中)放在SD上,并且大小限制将大大增加!

我不确定我的问题是否足够清楚??? 有没有人做这样的事情?

谢谢 梅格

0 个答案:

没有答案