Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By elektronika_ba
#2286 Hello,

Did anyone try compiling anything on SDK 0.9.2 that references these two functions?

They seem not to exist!

In SDK 0.9.1 they are declared in user_interface.h but in SKD 0.9.2 they are missing. When I declare them in user_interface.h of SDK 0.9.2 I get the same error while compiling.

Am I missing something here?

Regards,
Muris
User avatar
By igrr
#2314 They were removed :D
Not deprecated, removed completely with a minor version bump. Wish i could change my APIs like that ;)
New functions are called spi_flash_read, spi_flash_write, spi_flash_erase_sector.
This seems to work: https://github.com/igrr/atproto/blob/master/target/esp8266/config_store.c.
User avatar
By elektronika_ba
#2315 Thanks, I thought they were removed but it seemed too silly to be truth. How did you find out they were removed, or you just saw they were missing as well?

I recently found out how to use those new FLASH functions from the "user_esp_platform.c", but they didn't say that amount of memory we write/read from flash must be dividable by 4!!!
User avatar
By Squonk
#2318
elektronika_ba wrote:Thanks, I thought they were removed but it seemed too silly to be truth. How did you find out they were removed, or you just saw they were missing as well?

I recently found out how to use those new FLASH functions from the "user_esp_platform.c", but they didn't say that amount of memory we write/read from flash must be dividable by 4!!!

Probably it must be long-word aligned, this is generally the case for 32-bit CPUs.