Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flash-size agnostic builds #6690

Merged
merged 75 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
8834211
flash: mapping definition by sketch at runtime depending on flash chi…
d-a-v Oct 29, 2019
41bc6bc
Merge branch 'master' into nosizeconf
d-a-v Oct 29, 2019
0decdf4
fixes
d-a-v Oct 29, 2019
08e3b51
ESP.getFlashChipSize() returns ESP.getFlashChipRealSize()
d-a-v Oct 29, 2019
28e7d08
16MB no fs was missing
d-a-v Oct 29, 2019
6104b9d
fixes
d-a-v Oct 29, 2019
da308ad
fixes
d-a-v Oct 29, 2019
719f65a
fix
d-a-v Oct 30, 2019
dfb6a00
fix emulation on host
d-a-v Oct 30, 2019
c2747a4
Merge branch 'master' into nosizeconf
d-a-v Oct 30, 2019
4e05cc8
fix emulation on host when 32bit compiler is not available
d-a-v Oct 30, 2019
7063425
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
d-a-v Oct 30, 2019
94bb156
Merge branch 'master' into nosizeconf
d-a-v Nov 23, 2019
b8e4815
merge https://github.com/esp8266/Arduino/pull/6813
d-a-v Nov 23, 2019
855dd34
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
d-a-v Nov 23, 2019
9b0164a
Merge branch 'master' into nosizeconf
d-a-v Feb 25, 2020
7c9a832
Merge branch 'master' into nosizeconf
d-a-v Jul 30, 2020
c75e812
documentation, auto-256KBFS for 2MB chips
d-a-v Jul 31, 2020
3f30bec
doc format
d-a-v Aug 1, 2020
955a145
doc format
d-a-v Aug 1, 2020
38942f4
rst blackhole
d-a-v Aug 1, 2020
b2890d8
Merge branch 'master' into nosizeconf
d-a-v Aug 21, 2020
6d73c20
Merge branch 'master' into nosizeconf
d-a-v Aug 29, 2020
dd2d526
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
d-a-v Sep 5, 2020
7f3c65b
Merge branch 'master' into nosizeconf
d-a-v Sep 5, 2020
e4534ed
Merge branch 'master' into nosizeconf
d-a-v Oct 24, 2020
8bcc134
fix emulation on host
d-a-v Oct 25, 2020
3c807b0
emulation on host: fix 64 bits mode
d-a-v Oct 26, 2020
98e07d7
Merge branch 'master' into nosizeconf
d-a-v Oct 26, 2020
1a66a89
Merge branch 'master' into nosizeconf
d-a-v Nov 9, 2020
279db40
Merge branch 'master' into nosizeconf
d-a-v Dec 23, 2020
c01299b
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
d-a-v Dec 23, 2020
d55bf93
Merge branch 'master' into nosizeconf
d-a-v Dec 25, 2020
8adc14a
Merge branch 'master' into nosizeconf
d-a-v Dec 30, 2020
49a4d08
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
d-a-v Dec 30, 2020
5898eeb
Merge branch 'master' into nosizeconf
d-a-v Feb 28, 2021
843a096
Merge branch 'master' into nosizeconf
d-a-v Mar 6, 2021
ea319e2
merge with master
d-a-v Mar 6, 2021
f40f8f6
remove superfluous linker line
d-a-v Mar 6, 2021
665a0d9
Merge branch 'master' into nosizeconf
d-a-v Mar 11, 2021
c946421
missing change in httpupdateserver library
d-a-v Mar 11, 2021
83f04ff
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
d-a-v Mar 11, 2021
7788233
Merge branch 'master' into nosizeconf
d-a-v Mar 11, 2021
3347859
Merge branch 'master' into nosizeconf
d-a-v Apr 10, 2021
8791401
Merge branch 'master' into nosizeconf
d-a-v Jun 27, 2021
0419561
regen boards.txt
d-a-v Jun 27, 2021
7907ad5
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
d-a-v Jun 27, 2021
aa45adc
mode -DESP8266 from build.extra_flags to preprocessor flags
d-a-v Jul 8, 2021
25b74b1
regen boards.txt
d-a-v Jul 8, 2021
19d1f20
Merge branch 'master' into nosizeconf
d-a-v Jul 8, 2021
e922fea
sync with generated files
d-a-v Jul 9, 2021
60e1bd9
Merge branch 'master' into nosizeconf
d-a-v Jul 9, 2021
8ebc90f
Merge branch 'master' into nosizeconf
d-a-v Jul 11, 2021
45d5250
nosizeconf: when enabled, using FLASH_MAP_OTA_FS by default
d-a-v Sep 4, 2021
0760210
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
d-a-v Sep 5, 2021
6be7adf
Merge branch 'master' into nosizeconf
d-a-v Nov 30, 2021
069e54d
platform.txt: remove superfluous defines
d-a-v Dec 1, 2021
0b606da
improvements per mcspr's review
d-a-v Dec 2, 2021
96d9bd6
Merge branch 'master' into nosizeconf
d-a-v Dec 2, 2021
0b88291
restore data for fs uploader
d-a-v Dec 2, 2021
585a062
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
d-a-v Dec 2, 2021
fcf3508
Merge branch 'master' into nosizeconf
d-a-v Jan 5, 2022
5c4fee9
Merge branch 'master' into nosizeconf
d-a-v Jan 31, 2022
84582c3
Merge branch 'master' into nosizeconf
d-a-v Feb 6, 2022
3354f4d
rename: FLASHMAPCONFIG -> FLASH_MAP_SETUP_CONFIG
d-a-v Feb 6, 2022
058c201
rename: AUTOFLASHSIZE -> FLASH_MAP_SUPPORT
d-a-v Feb 6, 2022
9b32e80
Merge branch 'nosizeconf' of github.com:d-a-v/Arduino into nosizeconf
d-a-v Feb 6, 2022
ac2f270
review suggestion
d-a-v Feb 7, 2022
878d72f
review suggestion
d-a-v Feb 7, 2022
6e38ba7
review suggestion
d-a-v Feb 7, 2022
af939b7
review suggestion
d-a-v Feb 7, 2022
116a26c
review suggestion
d-a-v Feb 7, 2022
3e7349e
review suggestion
d-a-v Feb 7, 2022
1f4bf87
suggestion per review
d-a-v Feb 7, 2022
f2f7b0e
fix CI when hijacking flash_hal.h
d-a-v Feb 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
641 changes: 206 additions & 435 deletions boards.txt

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions cores/esp8266/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ void attachInterrupt(uint8_t pin, void (*)(void), int mode);
void detachInterrupt(uint8_t pin);
void attachInterruptArg(uint8_t pin, void (*)(void*), void* arg, int mode);

#if FLASH_MAP_SUPPORT
#include <flash_hal.h>
d-a-v marked this conversation as resolved.
Show resolved Hide resolved
#endif
void preinit(void);
void setup(void);
void loop(void);
Expand Down
12 changes: 8 additions & 4 deletions cores/esp8266/Esp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "MD5Builder.h"
#include "umm_malloc/umm_malloc.h"
#include "cont.h"

#include "flash_hal.h"
#include "coredecls.h"
#include "umm_malloc/umm_malloc.h"
#include <pgmspace.h>
Expand Down Expand Up @@ -291,13 +291,17 @@ uint32_t EspClass::getFlashChipRealSize(void)

uint32_t EspClass::getFlashChipSize(void)
{
#if FLASH_MAP_SUPPORT
return getFlashChipRealSize();
#else
uint32_t data;
uint8_t * bytes = (uint8_t *) &data;
// read first 4 byte (magic byte + flash config)
if(spi_flash_read(0x0000, &data, 4) == SPI_FLASH_RESULT_OK) {
return magicFlashChipSize((bytes[3] & 0xf0) >> 4);
}
return 0;
#endif
}

uint32_t EspClass::getFlashChipSpeed(void)
Expand All @@ -323,6 +327,7 @@ FlashMode_t EspClass::getFlashChipMode(void)
return mode;
}

#if !FLASH_MAP_SUPPORT
uint32_t EspClass::magicFlashChipSize(uint8_t byte) {
switch(byte & 0x0F) {
case 0x0: // 4 Mbit (512KB)
Expand All @@ -343,6 +348,7 @@ uint32_t EspClass::magicFlashChipSize(uint8_t byte) {
return 0;
}
}
#endif

uint32_t EspClass::magicFlashChipSpeed(uint8_t byte) {
switch(byte & 0x0F) {
Expand Down Expand Up @@ -612,14 +618,12 @@ uint32_t EspClass::getSketchSize() {
return result;
}

extern "C" uint32_t _FS_start;

uint32_t EspClass::getFreeSketchSpace() {

uint32_t usedSize = getSketchSize();
// round one sector up
uint32_t freeSpaceStart = (usedSize + FLASH_SECTOR_SIZE - 1) & (~(FLASH_SECTOR_SIZE - 1));
uint32_t freeSpaceEnd = (uint32_t)&_FS_start - 0x40200000;
uint32_t freeSpaceEnd = (uint32_t)FS_start - 0x40200000;

#ifdef DEBUG_SERIAL
DEBUG_SERIAL.printf("usedSize=%u freeSpaceStart=%u freeSpaceEnd=%u\r\n", usedSize, freeSpaceStart, freeSpaceEnd);
Expand Down
59 changes: 59 additions & 0 deletions cores/esp8266/FlashMap.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

// - do not edit - autogenerated by boards.txt.py

#ifndef __FLASH_MAP_H
#define __FLASH_MAP_H

#include <stdint.h>
#include <stddef.h>

typedef struct
{
uint32_t eeprom_start;
uint32_t fs_start;
uint32_t fs_end;
uint32_t fs_block_size;
uint32_t fs_page_size;
uint32_t flash_size_kb;
} flash_map_s;

/*
Following definitions map the above structure, one per line.
FLASH_MAP_* is a user choice in sketch:
`FLASH_MAP_SETUP_CONFIG(FLASH_MAP_OTA_FS)`
Configuration is made at boot with detected flash chip size (last argument 512..16384)
Other values are defined from `tools/boards.txt.py`.
*/

#define FLASH_MAP_OTA_FS \
{ \
{ .eeprom_start = 0x402fb000, .fs_start = 0x402eb000, .fs_end = 0x402fb000, .fs_block_size = 0x1000, .fs_page_size = 0x100, .flash_size_kb = 1024 }, \
{ .eeprom_start = 0x403fb000, .fs_start = 0x403c0000, .fs_end = 0x403fb000, .fs_block_size = 0x1000, .fs_page_size = 0x100, .flash_size_kb = 2048 }, \
{ .eeprom_start = 0x405fb000, .fs_start = 0x40400000, .fs_end = 0x405fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 4096 }, \
{ .eeprom_start = 0x409fb000, .fs_start = 0x40400000, .fs_end = 0x409fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 8192 }, \
{ .eeprom_start = 0x411fb000, .fs_start = 0x40400000, .fs_end = 0x411fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 16384 }, \
{ .eeprom_start = 0x4027b000, .fs_start = 0x40273000, .fs_end = 0x4027b000, .fs_block_size = 0x1000, .fs_page_size = 0x100, .flash_size_kb = 512 }, \
}

#define FLASH_MAP_MAX_FS \
{ \
{ .eeprom_start = 0x402fb000, .fs_start = 0x4027b000, .fs_end = 0x402fb000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 1024 }, \
{ .eeprom_start = 0x403fb000, .fs_start = 0x40300000, .fs_end = 0x403fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 2048 }, \
{ .eeprom_start = 0x405fb000, .fs_start = 0x40300000, .fs_end = 0x405fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 4096 }, \
{ .eeprom_start = 0x409fb000, .fs_start = 0x40300000, .fs_end = 0x409fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 8192 }, \
{ .eeprom_start = 0x411fb000, .fs_start = 0x40300000, .fs_end = 0x411fa000, .fs_block_size = 0x2000, .fs_page_size = 0x100, .flash_size_kb = 16384 }, \
{ .eeprom_start = 0x4027b000, .fs_start = 0x4025b000, .fs_end = 0x4027b000, .fs_block_size = 0x1000, .fs_page_size = 0x100, .flash_size_kb = 512 }, \
}
d-a-v marked this conversation as resolved.
Show resolved Hide resolved

#define FLASH_MAP_NO_FS \
{ \
{ .eeprom_start = 0x402fb000, .fs_start = 0x402fb000, .fs_end = 0x402fb000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 1024 }, \
{ .eeprom_start = 0x403fb000, .fs_start = 0x403fb000, .fs_end = 0x403fb000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 2048 }, \
{ .eeprom_start = 0x405fb000, .fs_start = 0x405fb000, .fs_end = 0x405fb000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 4096 }, \
{ .eeprom_start = 0x409fb000, .fs_start = 0x409fb000, .fs_end = 0x409fb000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 8192 }, \
{ .eeprom_start = 0x411fb000, .fs_start = 0x411fb000, .fs_end = 0x411fb000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 16384 }, \
{ .eeprom_start = 0x4027b000, .fs_start = 0x4027b000, .fs_end = 0x4027b000, .fs_block_size = 0x0, .fs_page_size = 0x0, .flash_size_kb = 512 }, \
}

#endif // __FLASH_MAP_H

17 changes: 10 additions & 7 deletions cores/esp8266/Updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ extern "C" {
#include "user_interface.h"
}

extern "C" uint32_t _FS_start;
extern "C" uint32_t _FS_end;
#include <flash_hal.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include <flash_hal.h>
#include "flash_hal.h"

Copy link
Collaborator Author

@d-a-v d-a-v Feb 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one has been reverted because

  • mock version of flash_hal.h needs to be loaded first, to redefine FS_start and FS_end

This is only needed in sources files

  • located in cores/esp8266/
  • which make use of FS_start or FS_end


UpdaterClass::UpdaterClass()
{
Expand Down Expand Up @@ -118,7 +117,7 @@ bool UpdaterClass::begin(size_t size, int command, int ledPin, uint8_t ledOn) {

if (command == U_FLASH) {
//address of the end of the space available for sketch and update
uintptr_t updateEndAddress = (uintptr_t)&_FS_start - 0x40200000;
uintptr_t updateEndAddress = FS_start - 0x40200000;

updateStartAddress = (updateEndAddress > roundedSize)? (updateEndAddress - roundedSize) : 0;

Expand All @@ -135,14 +134,14 @@ bool UpdaterClass::begin(size_t size, int command, int ledPin, uint8_t ledOn) {
}
}
else if (command == U_FS) {
if((uintptr_t)&_FS_start + roundedSize > (uintptr_t)&_FS_end) {
if(FS_start + roundedSize > FS_end) {
_setError(UPDATE_ERROR_SPACE);
return false;
}

#ifdef ATOMIC_FS_UPDATE
//address of the end of the space available for update
uintptr_t updateEndAddress = (uintptr_t)&_FS_start - 0x40200000;
uintptr_t updateEndAddress = FS_start - 0x40200000;

updateStartAddress = (updateEndAddress > roundedSize)? (updateEndAddress - roundedSize) : 0;

Expand All @@ -151,7 +150,7 @@ bool UpdaterClass::begin(size_t size, int command, int ledPin, uint8_t ledOn) {
return false;
}
#else
updateStartAddress = (uintptr_t)&_FS_start - 0x40200000;
updateStartAddress = FS_start - 0x40200000;
#endif
}
else {
Expand Down Expand Up @@ -314,7 +313,7 @@ bool UpdaterClass::end(bool evenIfRemaining){
eboot_command ebcmd;
ebcmd.action = ACTION_COPY_RAW;
ebcmd.args[0] = _startAddress;
ebcmd.args[1] = (uintptr_t)&_FS_start - 0x40200000;
ebcmd.args[1] = FS_start - 0x40200000;
ebcmd.args[2] = _size;
eboot_command_write(&ebcmd);
#endif
Expand Down Expand Up @@ -460,6 +459,9 @@ bool UpdaterClass::_verifyEnd() {
return false;
}

// it makes no sense to check flash size in auto flash mode
// (sketch size would have to be set in bin header, instead of flash size)
#if !FLASH_MAP_SUPPORT
uint32_t bin_flash_size = ESP.magicFlashChipSize((buf[3] & 0xf0) >> 4);

// check if new bin fits to SPI flash
Expand All @@ -468,6 +470,7 @@ bool UpdaterClass::_verifyEnd() {
_setError(UPDATE_ERROR_NEW_FLASH_CONFIG);
return false;
}
#endif

return true;
} else if(_command == U_FS) {
Expand Down
9 changes: 9 additions & 0 deletions cores/esp8266/core_esp8266_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,12 @@ extern "C" void __disableWiFiAtBootTime (void)
wifi_fpm_do_sleep(0xFFFFFFF);
}

#if FLASH_MAP_SUPPORT
#include "flash_hal.h"
extern "C" void flashinit (void);
uint32_t __flashindex;
#endif

extern "C" void user_init(void) {
struct rst_info *rtc_info_ptr = system_get_rst_info();
memcpy((void *) &resetInfo, (void *) rtc_info_ptr, sizeof(resetInfo));
Expand Down Expand Up @@ -421,6 +427,9 @@ extern "C" void user_init(void) {

#if defined(MMU_IRAM_HEAP)
umm_init_iram();
#endif
#if FLASH_MAP_SUPPORT
flashinit();
#endif
preinit(); // Prior to C++ Dynamic Init (not related to above init() ). Meant to be user redefinable.
__disableWiFiAtBootTime(); // default weak function disables WiFi
Expand Down
10 changes: 10 additions & 0 deletions cores/esp8266/flash_hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,13 @@ int32_t flash_hal_erase(uint32_t addr, uint32_t size) {
}
return FLASH_HAL_OK;
}

#if FLASH_MAP_SUPPORT

// default weak configuration:
FLASH_MAP_SETUP_CONFIG_ATTR(__attribute__((weak)), FLASH_MAP_OTA_FS)

// can be overridden by user with:
//FLASH_MAP_SETUP_CONFIG(FLASH_MAP_some_configuration)

#endif
64 changes: 54 additions & 10 deletions cores/esp8266/flash_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,58 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifdef ARDUINO
extern "C" uint32_t _FS_start;
extern "C" uint32_t _FS_end;
extern "C" uint32_t _FS_page;
extern "C" uint32_t _FS_block;

#define FS_PHYS_ADDR ((uint32_t) (&_FS_start) - 0x40200000)
#define FS_PHYS_SIZE ((uint32_t) (&_FS_end) - (uint32_t) (&_FS_start))
#define FS_PHYS_PAGE ((uint32_t) &_FS_page)
#define FS_PHYS_BLOCK ((uint32_t) &_FS_block)

#ifdef __cplusplus
extern "C" {
#endif

#if FLASH_MAP_SUPPORT
#include <FlashMap.h>

extern uint32_t spi_flash_get_id (void); // <user_interface.h>
extern void flashinit(void);
extern uint32_t __flashindex;
extern const flash_map_s __flashdesc[];

#define FLASH_MAP_SETUP_CONFIG(conf) FLASH_MAP_SETUP_CONFIG_ATTR(,conf)
#define FLASH_MAP_SETUP_CONFIG_ATTR(attr, conf...) \
const flash_map_s __flashdesc[] PROGMEM = conf; \
void flashinit (void) attr; \
void flashinit (void) \
{ \
uint32_t flash_chip_size_kb = 1 << (((spi_flash_get_id() >> 16) & 0xff) - 10); \
for (__flashindex = 0; __flashindex < sizeof(__flashdesc) / sizeof(__flashdesc[0]); __flashindex++) \
if (__flashdesc[__flashindex].flash_size_kb == flash_chip_size_kb) \
return; \
panic(); /* configuration not found */ \
}

#define EEPROM_start (__flashdesc[__flashindex].eeprom_start)
#define FS_start (__flashdesc[__flashindex].fs_start)
#define FS_end (__flashdesc[__flashindex].fs_end)
#define FS_block (__flashdesc[__flashindex].fs_block_size)
#define FS_page (__flashdesc[__flashindex].fs_page_size)

#else // !FLASH_MAP_SUPPORT

extern uint32_t _FS_start;
extern uint32_t _FS_end;
extern uint32_t _FS_page;
extern uint32_t _FS_block;
extern uint32_t _EEPROM_start;
#define EEPROM_start ((uint32_t)&_EEPROM_start)
#define FS_start ((uint32_t)&_FS_start)
#define FS_end ((uint32_t)&_FS_end)
#define FS_page ((uint32_t)&_FS_page)
#define FS_block ((uint32_t)&_FS_block)

#endif // FLASH_MAP_SUPPORT

#define FS_PHYS_ADDR ((uint32_t)FS_start - 0x40200000)
#define FS_PHYS_SIZE ((uint32_t)(FS_end - FS_start))
#define FS_PHYS_PAGE ((uint32_t)FS_page)
#define FS_PHYS_BLOCK ((uint32_t)FS_block)

// Return values of the following functions
#define FLASH_HAL_OK (0)
#define FLASH_HAL_READ_ERROR (-1)
Expand All @@ -46,4 +86,8 @@ extern int32_t flash_hal_write(uint32_t addr, uint32_t size, const uint8_t *src)
extern int32_t flash_hal_erase(uint32_t addr, uint32_t size);
extern int32_t flash_hal_read(uint32_t addr, uint32_t size, uint8_t *dst);

#ifdef __cplusplus
} // extern "C"
#endif

#endif // !defined(flash_hal_h)
2 changes: 1 addition & 1 deletion cores/esp8266/spiffs_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern "C" {
};
#include "debug.h"
#include "flash_utils.h"
#include "flash_hal.h"
#include <flash_hal.h>
d-a-v marked this conversation as resolved.
Show resolved Hide resolved

using namespace fs;

Expand Down
5 changes: 5 additions & 0 deletions doc/faq/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,8 @@ indeed off at boot and is powered on only when starting to be used with the
regular API.

Read more at `former WiFi persistent mode <../esp8266wifi/generic-class.rst#persistent>`__.

How to resolve "undefined reference to ``flashinit`'" error ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please read `flash layout <../filesystem.rst>`__ documentation entry.
Loading