Hi Yuriy,
On Thu, Jun 30, 2016 at 12:53:58PM -0700, Yuriy wrote:
> The test passes on my ESP-12E module as well as on my linux machine.
> github/posix_fs
> <
https://github.com/sheinz/esp-open-rtos/tree/experiments/posix_fs>
Nice! I'm at a conference today and the next couple of days, but I'll take a look at this ASAP.
> Another thing I've been working on lately is to reverse engineer SPI flash
> read/write operations form the SDK.
> Currently I have a rewritten read/write/erase implementation in C. My
> implementation does exactly the same as the SDK.
> It only bypasses SDK library but still uses low level SPI flash access
> functions from ROM.
> I only verified that SPIFFS with my implementation works.
> The original intention to dig it up was to find a way to eliminate 4-bytes
> address/buffer/size alignment for flash access operations.
> But I haven't figured out it yet...
> Reversed engineered SPI flash access.
> <
https://github.com/sheinz/esp-open-rtos/blob/experiments/spi_flash_reimplement/extras/spiffs/esp_spiffs.c>
Excellent. As it happens, foogod also did these functions as part of the "open-libmain" branch:
https://github.com/SuperHouse/esp-open-rtos/blob/open-libmain/open_esplibs/libmain/spi_flash.c
It's been in a separate branch for a while, but I just opened a PR to merge it:
https://github.com/SuperHouse/esp-open-rtos/pull/154
... would be interested in any comments you have on the differences between the ops you reverse engineered, and these ones.
Regarding supporting unaligned operations, this would be great! I agree it should be possible, but I think we'll have to add some "special case" wrappers to deal with the various unaligned cases by calling the ROM functions multiple times. Does that make sense?
Angus