Post links and attach files for documentation here, also chat about these docs freely

User avatar
By tinhead
#135
obvy wrote:Next step is confirming how application code from external SPI FlashROM is bootloader.


well, this is how they works, all described in datasheet.

obvy wrote:And the heck, the very first step is figuring out which size in KBytes the FlashROM on modules has.
Please someone run available module photos thru Gimp to figure that out (I miss time to that myself for now).


i did checked tons of pictures yesterday. I saw "Wifi serial" modules with W25Q80, W25Q40
It would be nice to get an flash dump, someone already here having the hardware?
Last edited by tinhead on Sun Sep 07, 2014 3:52 am, edited 1 time in total.
User avatar
By obvy
#142
Next step is confirming how application code from external SPI FlashROM is bootloader.
well, this is how they works, all described in datasheet.


What exactly described and in which datasheet? The official English datasheet (ESP8266_Specifications_English.pdf) has a lot of inconsistencies:

  • p.4: Block diagram doesn't show any "ROM" at all.
  • p.5: "When ESP8266 hosts the application, and when it is the only application processor in the device,
    it is able to boot up directly from an external flash."
  • p.7 Schematic shows SPI FlashROM
  • p.8 "With ESP8266, the only external BOM are resistors, capacitors, and crystal."
  • p.12 "The memory controller contains ROM, and SRAM."
  • p.13 "SPI_EN0 is used as an enable signal to an external serial flash memory for downloading patch
    code and/or MIB-data to the baseband in an embedded application. In a host based application,
    patch code and MIB-data can alternatively be downloaded via the host interface."
  • p.16 "The application and firmware is executed in on-chip ROM and SRAM"
  • p.16 "The application and firmware is executed in on-chip ROM and SRAM, which loads the
    instructions during wake-up, through the SDIO interface, from the external flash."

As can be seen, the information is highly contradictory and ambiguous. So, the questions remain. I may imagine that it can work in one of following ways:

  • ESP8266 has smart flash controller which memory-maps serial flash so CPU can execute from it directly - well, then everything (including WiFi stack) is in Flash.
  • ESP8266 has dumb flash controller and sizable internal ROM (mask type or something) with bootloader and WiFi stack. Bootloader loads an app into I-RAM and start it from there. Problem: I-RAM is only 32K (and sample app binary is already 47K)
  • ESP8266 has dumb flash controller and minimal internal ROM with only bootloader, and entire WiFi stack is loaded from Flash. This is even more problematic with I-RAM size.
User avatar
By jonsmirl
#143
obvy wrote:
  • ESP8266 has smart flash controller which memory-maps serial flash so CPU can execute from it directly - well, then everything (including WiFi stack) is in Flash.
  • ESP8266 has dumb flash controller and sizable internal ROM (mask type or something) with bootloader and WiFi stack. Bootloader loads an app into I-RAM and start it from there. Problem: I-RAM is only 32K (and sample app binary is already 47K)
  • ESP8266 has dumb flash controller and minimal internal ROM with only bootloader, and entire WiFi stack is loaded from Flash. This is even more problematic with I-RAM size.



1) Serial flash can't be memory mapped, only parallel flash can.
2) There are two pieces of RAM - 32KB static RAM, 80KB DRAM. (from cnx-soft post)
3) There are a lot of library functions in the 200KB ROM.

So if the cnx-soft post is correct, there is 32 + 80 + 200 = 312KB of stuff to work with.

Compare that to MT7681 which I believe only has 64KB of SRAM
User avatar
By obvy
#144
1) Serial flash can't be memory mapped, only parallel flash can.


Of course it can be, the mentioned "smart flash controller" does just that.

2) There are two pieces of RAM - 32KB static RAM, 80KB DRAM. (from cnx-soft post)
3) There are a lot of library functions in the 200KB ROM.

So if the cnx-soft post is correct, there is 32 + 80 + 200 = 312KB of stuff to work with.


If "cnx-soft post is correct"?? You must be kidding me. cnx is just a guy like you and me who collects gossip on the internets, but lucky to have time and drive to compile, polish it a bit and post such gossip regularly. He is no final authority in questions he post about. As for "DRAM" stuff, I wrote above already proofstuff is in linker scripts and official Xtensa docs.