1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

flash-size agnostic builds (#6690)

* flash: mapping definition by sketch at runtime depending on flash chip size and user configuration
This commit is contained in:
david gauchard
2022-02-10 18:25:18 +01:00
committed by GitHub
parent 3027acaf11
commit f60defc3d3
22 changed files with 552 additions and 542 deletions

View File

@ -31,7 +31,7 @@ extern "C" {
#include "spi_flash.h"
}
extern "C" uint32_t _EEPROM_start;
#include <flash_hal.h>
EEPROMClass::EEPROMClass(uint32_t sector)
: _sector(sector)
@ -39,7 +39,7 @@ EEPROMClass::EEPROMClass(uint32_t sector)
}
EEPROMClass::EEPROMClass(void)
: _sector((((uint32_t)&_EEPROM_start - 0x40200000) / SPI_FLASH_SEC_SIZE))
: _sector(((EEPROM_start - 0x40200000) / SPI_FLASH_SEC_SIZE))
{
}