Is it possible to write flash at address 0?
I want to update boot from my code, I using next code:
Code: Select all
static const uint8_t BOOT_DATA[] ICACHE_RODATA_ATTR STORE_ATTR = { ... };
spi_flash_erase_sector(0);
spi_flash_write(0, (uint32*)&BOOT_DATA, sizeof(BOOT_DATA));
but looks like spi_flash_write does not writing. Instead of correct data I have all zeroes (dumping flash content to file to check).
Any suggestions?