diff --git a/cores/esp8266/core_esp8266_phy.c b/cores/esp8266/core_esp8266_phy.c index df8da3ec4..6086c920c 100644 --- a/cores/esp8266/core_esp8266_phy.c +++ b/cores/esp8266/core_esp8266_phy.c @@ -24,7 +24,9 @@ #include #include -static uint8_t phy_init_data[128] = +#include "c_types.h" + +static const uint8_t ICACHE_FLASH_ATTR phy_init_data[128] = { [0] = 5, // Reserved, do not change [1] = 0, // Reserved, do not change @@ -241,9 +243,12 @@ static uint8_t phy_init_data[128] = }; extern int __real_register_chipv6_phy(uint8_t* init_data); -extern int __wrap_register_chipv6_phy(uint8_t* unused) { - phy_init_data[107] = __get_adc_mode(); - return __real_register_chipv6_phy(phy_init_data); +extern int __wrap_register_chipv6_phy(uint8_t* init_data) { + if (init_data != NULL) { + memcpy(init_data, phy_init_data, sizeof(phy_init_data)); + init_data[107] = __get_adc_mode(); + } + return __real_register_chipv6_phy(init_data); } extern int __get_rf_mode(void) __attribute__((weak)); diff --git a/cores/esp8266/spiffs_api.cpp b/cores/esp8266/spiffs_api.cpp index f189b4d4e..77b9c2ea2 100644 --- a/cores/esp8266/spiffs_api.cpp +++ b/cores/esp8266/spiffs_api.cpp @@ -495,7 +495,7 @@ static bool isSpiffsFilenameValid(const char* name) { if (name == nullptr) return false; auto len = strlen(name); - return len > 0 && len <= SPIFFS_OBJ_NAME_LEN; + return len > 0 && len < SPIFFS_OBJ_NAME_LEN; } // these symbols should be defined in the linker script for each flash layout diff --git a/doc/filesystem.md b/doc/filesystem.md index 4beae1e15..d903bcede 100644 --- a/doc/filesystem.md +++ b/doc/filesystem.md @@ -169,8 +169,14 @@ struct FSInfo { }; ``` -This is the structure which may be filled using FS::info method. Field names -are self-explanatory. +This is the structure which may be filled using FS::info method. +- `totalBytes` — total size of useful data on the file system +- `usedBytes` — number of bytes used by files +- `blockSize` — SPIFFS block size +- `pageSize` — SPIFFS logical page size +- `maxOpenFiles` — max number of files which may be open simultaneously +- `maxPathLength` — max file name length (including one byte for zero termination) + ## Directory object (Dir) diff --git a/libraries/ESP8266WiFiMesh/examples/HelloMesh/HelloMesh.ino b/libraries/ESP8266WiFiMesh/examples/HelloMesh/HelloMesh.ino index 0423c20cf..492605bd0 100644 --- a/libraries/ESP8266WiFiMesh/examples/HelloMesh/HelloMesh.ino +++ b/libraries/ESP8266WiFiMesh/examples/HelloMesh/HelloMesh.ino @@ -1,6 +1,9 @@ #include #include +unsigned int request_i = 0; +unsigned int response_i = 0; + /* Create the mesh node object */ ESP8266WiFiMesh mesh_node = ESP8266WiFiMesh(ESP.getChipId(), manageRequest); @@ -17,7 +20,9 @@ String manageRequest(String request) Serial.println(request); /* return a string to send back */ - return String("Hello world response."); + char response[60]; + sprintf(response, "Hello world response #%d from Mesh_Node%d.", response_i++, ESP.getChipId()); + return response; } void setup() @@ -39,6 +44,8 @@ void loop() mesh_node.acceptRequest(); /* Scan for other nodes and send them a message */ - mesh_node.attemptScan("Hello world request."); + char request[60]; + sprintf(request, "Hello world request #%d from Mesh_Node%d.", request_i++, ESP.getChipId()); + mesh_node.attemptScan(request); delay(1000); } diff --git a/tools/sdk/changelog.txt b/tools/sdk/changelog.txt index 9080be8ad..a3228229b 100644 --- a/tools/sdk/changelog.txt +++ b/tools/sdk/changelog.txt @@ -1,3 +1,9 @@ +esp_iot_sdk_v1.5.0_15_12_15_p1 Release Note +---------------------------------------- +Here is a patch based on ESP8266_NONOS_SDK_V1.5.0 solved a problem that calling espconn_abort may cause unexpected reset. + +Sorry for the inconvenience. + esp_iot_sdk_v1.5.0_15_11_27 Release Note ---------------------------------------- Resolved Issues (Bugs listed below apply to Bug Bounty Program): diff --git a/tools/sdk/ld/eagle.rom.addr.v6.ld b/tools/sdk/ld/eagle.rom.addr.v6.ld index 076a240dd..19576cb73 100644 --- a/tools/sdk/ld/eagle.rom.addr.v6.ld +++ b/tools/sdk/ld/eagle.rom.addr.v6.ld @@ -343,5 +343,8 @@ PROVIDE ( xthal_window_spill = 0x4000e324 ); PROVIDE ( xthal_window_spill_nw = 0x4000e320 ); PROVIDE ( Te0 = 0x3fffccf0 ); +PROVIDE ( Td0 = 0x3fffd100 ); +PROVIDE ( Td4s = 0x3fffd500); +PROVIDE ( rcons = 0x3fffd0f0); PROVIDE ( UartDev = 0x3fffde10 ); PROVIDE ( flashchip = 0x3fffc714); diff --git a/tools/sdk/lib/libaxtls.a b/tools/sdk/lib/libaxtls.a index edf2b9043..b0dad0ba2 100644 Binary files a/tools/sdk/lib/libaxtls.a and b/tools/sdk/lib/libaxtls.a differ diff --git a/tools/sdk/lib/liblwip.a b/tools/sdk/lib/liblwip.a index d2983951a..7974750d5 100644 Binary files a/tools/sdk/lib/liblwip.a and b/tools/sdk/lib/liblwip.a differ diff --git a/tools/sdk/version b/tools/sdk/version index bc80560fa..3e06e6e70 100644 --- a/tools/sdk/version +++ b/tools/sdk/version @@ -1 +1 @@ -1.5.0 +1.5.0_15_12_15_p1 \ No newline at end of file