1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-22 21:23:07 +03:00

Merge branch 'master' into wifi_mesh_update_2.2

This commit is contained in:
Earle F. Philhower, III 2019-07-28 12:17:03 -07:00 committed by GitHub
commit 235b02edee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
67 changed files with 417 additions and 229 deletions

View File

@ -114,7 +114,7 @@ Please provide as much context as possible, as well as the information requested
### Contributing
For minor fixes of code and documentation, please go ahead and submit a pull request.
For minor fixes of code and documentation, please go ahead and submit a pull request. A gentle introduction to the process can be found [here](https://www.freecodecamp.org/news/a-simple-git-guide-and-cheat-sheet-for-open-source-contributors/).
Check out the list of issues that are easy to fix — [easy issues pending](https://github.com/esp8266/Arduino/issues?q=is%3Aopen+is%3Aissue+label%3A%22level%3A+easy%22). Working on them is a great way to move the project forward.

View File

@ -365,6 +365,8 @@ generic.menu.led.14=14
generic.menu.led.14.build.led=-DLED_BUILTIN=14
generic.menu.led.15=15
generic.menu.led.15.build.led=-DLED_BUILTIN=15
generic.menu.led.16=16
generic.menu.led.16.build.led=-DLED_BUILTIN=16
generic.menu.sdk.nonosdk222_100=nonos-sdk 2.2.1+100 (testing)
generic.menu.sdk.nonosdk222_100.build.sdk=NONOSDK22y
generic.menu.sdk.nonosdk221=nonos-sdk 2.2.1 (legacy)
@ -466,8 +468,6 @@ generic.menu.wipe.all=All Flash Contents
generic.menu.wipe.all.upload.erase_cmd=erase_flash
generic.menu.baud.115200=115200
generic.menu.baud.115200.upload.speed=115200
generic.menu.baud.9600=9600
generic.menu.baud.9600.upload.speed=9600
generic.menu.baud.57600=57600
generic.menu.baud.57600.upload.speed=57600
generic.menu.baud.230400.linux=230400
@ -641,6 +641,8 @@ esp8285.menu.led.14=14
esp8285.menu.led.14.build.led=-DLED_BUILTIN=14
esp8285.menu.led.15=15
esp8285.menu.led.15.build.led=-DLED_BUILTIN=15
esp8285.menu.led.16=16
esp8285.menu.led.16.build.led=-DLED_BUILTIN=16
esp8285.menu.ip.lm2f=v2 Lower Memory
esp8285.menu.ip.lm2f.build.lwip_include=lwip2/include
esp8285.menu.ip.lm2f.build.lwip_lib=-llwip2-536-feat
@ -736,8 +738,6 @@ esp8285.menu.wipe.all=All Flash Contents
esp8285.menu.wipe.all.upload.erase_cmd=erase_flash
esp8285.menu.baud.115200=115200
esp8285.menu.baud.115200.upload.speed=115200
esp8285.menu.baud.9600=9600
esp8285.menu.baud.9600.upload.speed=9600
esp8285.menu.baud.57600=57600
esp8285.menu.baud.57600.upload.speed=57600
esp8285.menu.baud.230400.linux=230400
@ -932,8 +932,6 @@ espduino.menu.wipe.all=All Flash Contents
espduino.menu.wipe.all.upload.erase_cmd=erase_flash
espduino.menu.baud.115200=115200
espduino.menu.baud.115200.upload.speed=115200
espduino.menu.baud.9600=9600
espduino.menu.baud.9600.upload.speed=9600
espduino.menu.baud.57600=57600
espduino.menu.baud.57600.upload.speed=57600
espduino.menu.baud.230400.linux=230400
@ -1120,8 +1118,6 @@ huzzah.menu.wipe.all=All Flash Contents
huzzah.menu.wipe.all.upload.erase_cmd=erase_flash
huzzah.menu.baud.115200=115200
huzzah.menu.baud.115200.upload.speed=115200
huzzah.menu.baud.9600=9600
huzzah.menu.baud.9600.upload.speed=9600
huzzah.menu.baud.57600=57600
huzzah.menu.baud.57600.upload.speed=57600
huzzah.menu.baud.230400.linux=230400
@ -1308,8 +1304,6 @@ inventone.menu.wipe.all=All Flash Contents
inventone.menu.wipe.all.upload.erase_cmd=erase_flash
inventone.menu.baud.115200=115200
inventone.menu.baud.115200.upload.speed=115200
inventone.menu.baud.9600=9600
inventone.menu.baud.9600.upload.speed=9600
inventone.menu.baud.57600=57600
inventone.menu.baud.57600.upload.speed=57600
inventone.menu.baud.230400.linux=230400
@ -1499,8 +1493,6 @@ cw01.menu.wipe.all=All Flash Contents
cw01.menu.wipe.all.upload.erase_cmd=erase_flash
cw01.menu.baud.115200=115200
cw01.menu.baud.115200.upload.speed=115200
cw01.menu.baud.9600=9600
cw01.menu.baud.9600.upload.speed=9600
cw01.menu.baud.57600=57600
cw01.menu.baud.57600.upload.speed=57600
cw01.menu.baud.230400.linux=230400
@ -1690,8 +1682,6 @@ espresso_lite_v1.menu.wipe.all=All Flash Contents
espresso_lite_v1.menu.wipe.all.upload.erase_cmd=erase_flash
espresso_lite_v1.menu.baud.115200=115200
espresso_lite_v1.menu.baud.115200.upload.speed=115200
espresso_lite_v1.menu.baud.9600=9600
espresso_lite_v1.menu.baud.9600.upload.speed=9600
espresso_lite_v1.menu.baud.57600=57600
espresso_lite_v1.menu.baud.57600.upload.speed=57600
espresso_lite_v1.menu.baud.230400.linux=230400
@ -1881,8 +1871,6 @@ espresso_lite_v2.menu.wipe.all=All Flash Contents
espresso_lite_v2.menu.wipe.all.upload.erase_cmd=erase_flash
espresso_lite_v2.menu.baud.115200=115200
espresso_lite_v2.menu.baud.115200.upload.speed=115200
espresso_lite_v2.menu.baud.9600=9600
espresso_lite_v2.menu.baud.9600.upload.speed=9600
espresso_lite_v2.menu.baud.57600=57600
espresso_lite_v2.menu.baud.57600.upload.speed=57600
espresso_lite_v2.menu.baud.230400.linux=230400
@ -2072,8 +2060,6 @@ phoenix_v1.menu.wipe.all=All Flash Contents
phoenix_v1.menu.wipe.all.upload.erase_cmd=erase_flash
phoenix_v1.menu.baud.115200=115200
phoenix_v1.menu.baud.115200.upload.speed=115200
phoenix_v1.menu.baud.9600=9600
phoenix_v1.menu.baud.9600.upload.speed=9600
phoenix_v1.menu.baud.57600=57600
phoenix_v1.menu.baud.57600.upload.speed=57600
phoenix_v1.menu.baud.230400.linux=230400
@ -2263,8 +2249,6 @@ phoenix_v2.menu.wipe.all=All Flash Contents
phoenix_v2.menu.wipe.all.upload.erase_cmd=erase_flash
phoenix_v2.menu.baud.115200=115200
phoenix_v2.menu.baud.115200.upload.speed=115200
phoenix_v2.menu.baud.9600=9600
phoenix_v2.menu.baud.9600.upload.speed=9600
phoenix_v2.menu.baud.57600=57600
phoenix_v2.menu.baud.57600.upload.speed=57600
phoenix_v2.menu.baud.230400.linux=230400
@ -2451,8 +2435,6 @@ nodemcu.menu.wipe.all=All Flash Contents
nodemcu.menu.wipe.all.upload.erase_cmd=erase_flash
nodemcu.menu.baud.115200=115200
nodemcu.menu.baud.115200.upload.speed=115200
nodemcu.menu.baud.9600=9600
nodemcu.menu.baud.9600.upload.speed=9600
nodemcu.menu.baud.57600=57600
nodemcu.menu.baud.57600.upload.speed=57600
nodemcu.menu.baud.230400.linux=230400
@ -2639,8 +2621,6 @@ nodemcuv2.menu.wipe.all=All Flash Contents
nodemcuv2.menu.wipe.all.upload.erase_cmd=erase_flash
nodemcuv2.menu.baud.115200=115200
nodemcuv2.menu.baud.115200.upload.speed=115200
nodemcuv2.menu.baud.9600=9600
nodemcuv2.menu.baud.9600.upload.speed=9600
nodemcuv2.menu.baud.57600=57600
nodemcuv2.menu.baud.57600.upload.speed=57600
nodemcuv2.menu.baud.230400.linux=230400
@ -2847,8 +2827,6 @@ modwifi.menu.wipe.all=All Flash Contents
modwifi.menu.wipe.all.upload.erase_cmd=erase_flash
modwifi.menu.baud.115200=115200
modwifi.menu.baud.115200.upload.speed=115200
modwifi.menu.baud.9600=9600
modwifi.menu.baud.9600.upload.speed=9600
modwifi.menu.baud.57600=57600
modwifi.menu.baud.57600.upload.speed=57600
modwifi.menu.baud.230400.linux=230400
@ -3035,8 +3013,6 @@ thing.menu.wipe.all=All Flash Contents
thing.menu.wipe.all.upload.erase_cmd=erase_flash
thing.menu.baud.115200=115200
thing.menu.baud.115200.upload.speed=115200
thing.menu.baud.9600=9600
thing.menu.baud.9600.upload.speed=9600
thing.menu.baud.57600=57600
thing.menu.baud.57600.upload.speed=57600
thing.menu.baud.230400.linux=230400
@ -3223,8 +3199,6 @@ thingdev.menu.wipe.all=All Flash Contents
thingdev.menu.wipe.all.upload.erase_cmd=erase_flash
thingdev.menu.baud.115200=115200
thingdev.menu.baud.115200.upload.speed=115200
thingdev.menu.baud.9600=9600
thingdev.menu.baud.9600.upload.speed=9600
thingdev.menu.baud.57600=57600
thingdev.menu.baud.57600.upload.speed=57600
thingdev.menu.baud.230400.linux=230400
@ -3411,8 +3385,6 @@ esp210.menu.wipe.all=All Flash Contents
esp210.menu.wipe.all.upload.erase_cmd=erase_flash
esp210.menu.baud.57600=57600
esp210.menu.baud.57600.upload.speed=57600
esp210.menu.baud.9600=9600
esp210.menu.baud.9600.upload.speed=9600
esp210.menu.baud.115200=115200
esp210.menu.baud.115200.upload.speed=115200
esp210.menu.baud.230400.linux=230400
@ -3599,8 +3571,6 @@ d1_mini.menu.wipe.all=All Flash Contents
d1_mini.menu.wipe.all.upload.erase_cmd=erase_flash
d1_mini.menu.baud.921600=921600
d1_mini.menu.baud.921600.upload.speed=921600
d1_mini.menu.baud.9600=9600
d1_mini.menu.baud.9600.upload.speed=9600
d1_mini.menu.baud.57600=57600
d1_mini.menu.baud.57600.upload.speed=57600
d1_mini.menu.baud.115200=115200
@ -3770,8 +3740,6 @@ d1_mini_pro.menu.wipe.all=All Flash Contents
d1_mini_pro.menu.wipe.all.upload.erase_cmd=erase_flash
d1_mini_pro.menu.baud.921600=921600
d1_mini_pro.menu.baud.921600.upload.speed=921600
d1_mini_pro.menu.baud.9600=9600
d1_mini_pro.menu.baud.9600.upload.speed=9600
d1_mini_pro.menu.baud.57600=57600
d1_mini_pro.menu.baud.57600.upload.speed=57600
d1_mini_pro.menu.baud.115200=115200
@ -3998,8 +3966,6 @@ d1_mini_lite.menu.wipe.all=All Flash Contents
d1_mini_lite.menu.wipe.all.upload.erase_cmd=erase_flash
d1_mini_lite.menu.baud.921600=921600
d1_mini_lite.menu.baud.921600.upload.speed=921600
d1_mini_lite.menu.baud.9600=9600
d1_mini_lite.menu.baud.9600.upload.speed=9600
d1_mini_lite.menu.baud.57600=57600
d1_mini_lite.menu.baud.57600.upload.speed=57600
d1_mini_lite.menu.baud.115200=115200
@ -4186,8 +4152,6 @@ d1.menu.wipe.all=All Flash Contents
d1.menu.wipe.all.upload.erase_cmd=erase_flash
d1.menu.baud.921600=921600
d1.menu.baud.921600.upload.speed=921600
d1.menu.baud.9600=9600
d1.menu.baud.9600.upload.speed=9600
d1.menu.baud.57600=57600
d1.menu.baud.57600.upload.speed=57600
d1.menu.baud.115200=115200
@ -4377,8 +4341,6 @@ espino.menu.wipe.all=All Flash Contents
espino.menu.wipe.all.upload.erase_cmd=erase_flash
espino.menu.baud.115200=115200
espino.menu.baud.115200.upload.speed=115200
espino.menu.baud.9600=9600
espino.menu.baud.9600.upload.speed=9600
espino.menu.baud.57600=57600
espino.menu.baud.57600.upload.speed=57600
espino.menu.baud.230400.linux=230400
@ -4565,8 +4527,6 @@ espinotee.menu.wipe.all=All Flash Contents
espinotee.menu.wipe.all.upload.erase_cmd=erase_flash
espinotee.menu.baud.115200=115200
espinotee.menu.baud.115200.upload.speed=115200
espinotee.menu.baud.9600=9600
espinotee.menu.baud.9600.upload.speed=9600
espinotee.menu.baud.57600=57600
espinotee.menu.baud.57600.upload.speed=57600
espinotee.menu.baud.230400.linux=230400
@ -4813,8 +4773,6 @@ wifinfo.menu.wipe.all=All Flash Contents
wifinfo.menu.wipe.all.upload.erase_cmd=erase_flash
wifinfo.menu.baud.115200=115200
wifinfo.menu.baud.115200.upload.speed=115200
wifinfo.menu.baud.9600=9600
wifinfo.menu.baud.9600.upload.speed=9600
wifinfo.menu.baud.57600=57600
wifinfo.menu.baud.57600.upload.speed=57600
wifinfo.menu.baud.230400.linux=230400
@ -5013,8 +4971,6 @@ arduino-esp8266.menu.wipe.all=All Flash Contents
arduino-esp8266.menu.wipe.all.upload.erase_cmd=erase_flash
arduino-esp8266.menu.baud.115200=115200
arduino-esp8266.menu.baud.115200.upload.speed=115200
arduino-esp8266.menu.baud.9600=9600
arduino-esp8266.menu.baud.9600.upload.speed=9600
arduino-esp8266.menu.baud.57600=57600
arduino-esp8266.menu.baud.57600.upload.speed=57600
arduino-esp8266.menu.baud.230400.linux=230400
@ -5202,8 +5158,6 @@ gen4iod.menu.wipe.all=All Flash Contents
gen4iod.menu.wipe.all.upload.erase_cmd=erase_flash
gen4iod.menu.baud.115200=115200
gen4iod.menu.baud.115200.upload.speed=115200
gen4iod.menu.baud.9600=9600
gen4iod.menu.baud.9600.upload.speed=9600
gen4iod.menu.baud.57600=57600
gen4iod.menu.baud.57600.upload.speed=57600
gen4iod.menu.baud.230400.linux=230400
@ -5391,8 +5345,6 @@ oak.menu.wipe.all=All Flash Contents
oak.menu.wipe.all.upload.erase_cmd=erase_flash
oak.menu.baud.921600=921600
oak.menu.baud.921600.upload.speed=921600
oak.menu.baud.9600=9600
oak.menu.baud.9600.upload.speed=9600
oak.menu.baud.57600=57600
oak.menu.baud.57600.upload.speed=57600
oak.menu.baud.115200=115200
@ -5579,8 +5531,6 @@ wifiduino.menu.wipe.all=All Flash Contents
wifiduino.menu.wipe.all.upload.erase_cmd=erase_flash
wifiduino.menu.baud.921600=921600
wifiduino.menu.baud.921600.upload.speed=921600
wifiduino.menu.baud.9600=9600
wifiduino.menu.baud.9600.upload.speed=9600
wifiduino.menu.baud.57600=57600
wifiduino.menu.baud.57600.upload.speed=57600
wifiduino.menu.baud.115200=115200
@ -5877,8 +5827,6 @@ wifi_slot.menu.wipe.all=All Flash Contents
wifi_slot.menu.wipe.all.upload.erase_cmd=erase_flash
wifi_slot.menu.baud.115200=115200
wifi_slot.menu.baud.115200.upload.speed=115200
wifi_slot.menu.baud.9600=9600
wifi_slot.menu.baud.9600.upload.speed=9600
wifi_slot.menu.baud.57600=57600
wifi_slot.menu.baud.57600.upload.speed=57600
wifi_slot.menu.baud.230400.linux=230400
@ -6065,8 +6013,6 @@ wiolink.menu.wipe.all=All Flash Contents
wiolink.menu.wipe.all.upload.erase_cmd=erase_flash
wiolink.menu.baud.115200=115200
wiolink.menu.baud.115200.upload.speed=115200
wiolink.menu.baud.9600=9600
wiolink.menu.baud.9600.upload.speed=9600
wiolink.menu.baud.57600=57600
wiolink.menu.baud.57600.upload.speed=57600
wiolink.menu.baud.230400.linux=230400
@ -6253,8 +6199,6 @@ espectro.menu.wipe.all=All Flash Contents
espectro.menu.wipe.all.upload.erase_cmd=erase_flash
espectro.menu.baud.115200=115200
espectro.menu.baud.115200.upload.speed=115200
espectro.menu.baud.9600=9600
espectro.menu.baud.9600.upload.speed=9600
espectro.menu.baud.57600=57600
espectro.menu.baud.57600.upload.speed=57600
espectro.menu.baud.230400.linux=230400

View File

@ -167,8 +167,6 @@ public:
bool operator== (AddressListIterator& o) { return netIf.equal(*o); }
bool operator!= (AddressListIterator& o) { return !netIf.equal(*o); }
AddressListIterator& operator= (const AddressListIterator& o) { netIf = o.netIf; return *this; }
AddressListIterator operator++ (int)
{
AddressListIterator ret = *this;

View File

@ -159,7 +159,7 @@ void ets_intr_unlock();
// level 15 will disable ALL interrupts,
// level 0 will enable ALL interrupts,
//
#define xt_rsil(level) (__extension__({uint32_t state; __asm__ __volatile__("rsil %0," __STRINGIFY(level) : "=a" (state)); state;}))
#define xt_rsil(level) (__extension__({uint32_t state; __asm__ __volatile__("rsil %0," __STRINGIFY(level) : "=a" (state) :: "memory"); state;}))
#define xt_wsr_ps(state) __asm__ __volatile__("wsr %0,ps; isync" :: "a" (state) : "memory")
#define interrupts() xt_rsil(0)

View File

@ -272,6 +272,13 @@ bool FS::gc() {
return _impl->gc();
}
bool FS::check() {
if (!_impl) {
return false;
}
return _impl->check();
}
bool FS::format() {
if (!_impl) {
return false;

View File

@ -221,7 +221,9 @@ public:
bool rmdir(const char* path);
bool rmdir(const String& path);
// Low-level FS routines, not needed by most applications
bool gc();
bool check();
friend class ::SDClass; // More of a frenemy, but SD needs internal implementation to get private FAT bits
protected:
@ -241,6 +243,7 @@ using fs::SeekCur;
using fs::SeekEnd;
using fs::FSInfo;
using fs::FSConfig;
using fs::SPIFFSConfig;
#endif //FS_NO_GLOBALS
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SPIFFS)

View File

@ -85,6 +85,7 @@ public:
virtual bool mkdir(const char* path) = 0;
virtual bool rmdir(const char* path) = 0;
virtual bool gc() { return true; } // May not be implemented in all file systems.
virtual bool check() { return true; } // May not be implemented in all file systems.
};
} // namespace fs

View File

@ -36,7 +36,7 @@
#define IP_SET_TYPE_VAL(x,y) do { (void)0; } while (0)
#define IP_ANY_TYPE (&ip_addr_any)
#define IP4_ADDR_ANY IPADDR_ANY
#define IP4_ADDR_ANY4 IPADDR_ANY
#define IP4_ADDR_ANY4 IP_ADDR_ANY
#define IPADDR4_INIT(x) { x }
#define CONST /* nothing: lwIP-v1 does not use const */
#define ip4_addr_netcmp ip_addr_netcmp
@ -136,6 +136,7 @@ class IPAddress: public Printable {
// Overloaded copy operators to allow initialisation of IPAddress objects from other types
IPAddress& operator=(const uint8_t *address);
IPAddress& operator=(uint32_t address);
IPAddress& operator=(const IPAddress&) = default;
virtual size_t printTo(Print& p) const;
String toString() const;

View File

@ -205,7 +205,6 @@ bool UpdaterClass::end(bool evenIfRemaining){
#endif
if (sigLen != _verify->length()) {
_setError(UPDATE_ERROR_SIGN);
_reset();
return false;
}
@ -231,7 +230,6 @@ bool UpdaterClass::end(bool evenIfRemaining){
uint8_t *sig = (uint8_t*)malloc(sigLen);
if (!sig) {
_setError(UPDATE_ERROR_SIGN);
_reset();
return false;
}
ESP.flashRead(_startAddress + binSize, (uint32_t *)sig, sigLen);
@ -244,7 +242,6 @@ bool UpdaterClass::end(bool evenIfRemaining){
#endif
if (!_verify->verify(_hash, (void *)sig, sigLen)) {
_setError(UPDATE_ERROR_SIGN);
_reset();
return false;
}
#ifdef DEBUG_UPDATER
@ -254,7 +251,6 @@ bool UpdaterClass::end(bool evenIfRemaining){
_md5.calculate();
if (strcasecmp(_target_md5.c_str(), _md5.toString().c_str())) {
_setError(UPDATE_ERROR_MD5);
_reset();
return false;
}
#ifdef DEBUG_UPDATER
@ -467,7 +463,6 @@ size_t UpdaterClass::writeStream(Stream &data) {
if(toRead == 0) { //Timeout
_currentAddress = (_startAddress + _size);
_setError(UPDATE_ERROR_STREAM);
_reset();
return written;
}
}
@ -494,6 +489,7 @@ void UpdaterClass::_setError(int error){
#ifdef DEBUG_UPDATER
printError(DEBUG_UPDATER);
#endif
_reset(); // Any error condition invalidates the entire update, so clear partial status
}
void UpdaterClass::printError(Print &out){

View File

@ -82,6 +82,12 @@ class String {
return 0;
}
}
inline void clear(void) {
setLen(0);
}
inline bool isEmpty(void) const {
return length() == 0;
}
// creates a copy of the assigned value. if the value is null or
// invalid, or if the memory allocation fails, the string will be

View File

@ -31,6 +31,29 @@ extern int umm_last_fail_alloc_size;
extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__));
extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__));
#ifndef __cpp_exceptions
void *operator new(size_t size)
{
void *ret = malloc(size);
if (0 != size && 0 == ret) {
umm_last_fail_alloc_addr = __builtin_return_address(0);
umm_last_fail_alloc_size = size;
}
return ret;
}
void *operator new[](size_t size)
{
void *ret = malloc(size);
if (0 != size && 0 == ret) {
umm_last_fail_alloc_addr = __builtin_return_address(0);
umm_last_fail_alloc_size = size;
}
return ret;
}
#endif
void __cxa_pure_virtual(void)
{
panic();

View File

@ -507,7 +507,6 @@ bool i2s_rxtx_begin(bool enableRx, bool enableTx) {
PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTMS_U, FUNC_I2SI_WS);
}
_i2s_sample_rate = 0;
if (!i2s_slc_begin()) {
// OOM in SLC memory allocations, tear it all down and abort!
i2s_end();
@ -530,7 +529,13 @@ bool i2s_rxtx_begin(bool enableRx, bool enableTx) {
// I2STXCMM, I2SRXCMM=0 => Dual channel mode
I2SCC &= ~((I2STXCMM << I2STXCM) | (I2SRXCMM << I2SRXCM)); // Set RX/TX CHAN_MOD=0
i2s_set_rate(44100);
// Ensure a sane clock is set, but don't change any pre-existing ones.
// But we also need to make sure the other bits weren't reset by a previous
// reset. So, store the present one, clear the flag, then set the same
// value (writing all needed config bits in the process
uint32_t save_rate = _i2s_sample_rate;
_i2s_sample_rate = 0;
i2s_set_rate(save_rate ? save_rate : 44100);
if (rx) {
// Need to prime the # of samples to receive in the engine

View File

@ -121,6 +121,14 @@ extern "C" void optimistic_yield(uint32_t interval_us) {
}
}
extern "C" void __loop_end (void)
{
run_scheduled_functions();
run_scheduled_recurrent_functions();
}
extern "C" void loop_end (void) __attribute__ ((weak, alias("__loop_end")));
static void loop_wrapper() {
static bool setup_done = false;
preloop_update_frequency();
@ -129,8 +137,7 @@ static void loop_wrapper() {
setup_done = true;
}
loop();
run_scheduled_functions();
run_scheduled_recurrent_functions();
loop_end();
esp_schedule();
}

View File

@ -52,6 +52,13 @@ static void uart0_write_char_d(char c);
static void uart1_write_char_d(char c);
static void print_stack(uint32_t start, uint32_t end);
// using numbers different from "REASON_" in user_interface.h (=0..6)
enum rst_reason_sw
{
REASON_USER_SWEXCEPTION_RST = 254
};
static int s_user_reset_reason = REASON_DEFAULT_RST;
// From UMM, the last caller of a malloc/realloc/calloc which failed:
extern void *umm_last_fail_alloc_addr;
extern int umm_last_fail_alloc_size;
@ -86,24 +93,20 @@ void __wrap_system_restart_local() {
register uint32_t sp asm("a1");
uint32_t sp_dump = sp;
if (gdb_present()) {
/* When GDBStub is present, exceptions are handled by GDBStub,
but Soft WDT will still call this function.
Trigger an exception to break into GDB.
TODO: check why gdb_do_break() or asm("break.n 0") do not
break into GDB here. */
raise_exception();
}
struct rst_info rst_info;
memset(&rst_info, 0, sizeof(rst_info));
if (s_user_reset_reason == REASON_DEFAULT_RST)
{
system_rtc_mem_read(0, &rst_info, sizeof(rst_info));
if (rst_info.reason != REASON_SOFT_WDT_RST &&
rst_info.reason != REASON_EXCEPTION_RST &&
rst_info.reason != REASON_WDT_RST)
{
return;
rst_info.reason = REASON_DEFAULT_RST;
}
}
else
rst_info.reason = s_user_reset_reason;
// TODO: ets_install_putc1 definition is wrong in ets_sys.h, need cast
ets_install_putc1((void *)&uart_write_char_d);
@ -128,6 +131,9 @@ void __wrap_system_restart_local() {
else if (rst_info.reason == REASON_SOFT_WDT_RST) {
ets_printf_P(PSTR("\nSoft WDT reset\n"));
}
else {
ets_printf_P(PSTR("\nGeneric Reset\n"));
}
uint32_t cont_stack_start = (uint32_t) &(g_pcont->stack);
uint32_t cont_stack_end = (uint32_t) g_pcont->stack_end;
@ -222,7 +228,13 @@ static void uart1_write_char_d(char c) {
}
static void raise_exception() {
__asm__ __volatile__ ("syscall");
if (gdb_present())
__asm__ __volatile__ ("syscall"); // triggers GDB when enabled
s_user_reset_reason = REASON_USER_SWEXCEPTION_RST;
ets_printf_P(PSTR("\nUser exception (panic/abort/assert)"));
__wrap_system_restart_local();
while (1); // never reached, needed to satisfy "noreturn" attribute
}

View File

@ -43,7 +43,7 @@ void delay_end(void* arg) {
esp_schedule();
}
void delay(unsigned long ms) {
void __delay(unsigned long ms) {
if(ms) {
os_timer_setfn(&delay_timer, (os_timer_func_t*) &delay_end, 0);
os_timer_arm(&delay_timer, ms, ONCE);
@ -56,6 +56,8 @@ void delay(unsigned long ms) {
}
}
void delay(unsigned long ms) __attribute__ ((weak, alias("__delay")));
void micros_overflow_tick(void* arg) {
(void) arg;
uint32_t m = system_get_time();

View File

@ -252,7 +252,7 @@ extern void initPins() {
extern void pinMode(uint8_t pin, uint8_t mode) __attribute__ ((weak, alias("__pinMode")));
extern void digitalWrite(uint8_t pin, uint8_t val) __attribute__ ((weak, alias("__digitalWrite")));
extern int digitalRead(uint8_t pin) __attribute__ ((weak, alias("__digitalRead")));
extern int digitalRead(uint8_t pin) __attribute__ ((weak, alias("__digitalRead"), nothrow));
extern void attachInterrupt(uint8_t pin, voidFuncPtr handler, int mode) __attribute__ ((weak, alias("__attachInterrupt")));
extern void attachInterruptArg(uint8_t pin, voidFuncPtrArg handler, void* arg, int mode) __attribute__((weak, alias("__attachInterruptArg")));
extern void detachInterrupt(uint8_t pin) __attribute__ ((weak, alias("__detachInterrupt")));

View File

@ -219,6 +219,11 @@ public:
return SPIFFS_gc_quick( &_fs, 0 ) == SPIFFS_OK;
}
bool check() override
{
return SPIFFS_check(&_fs) == SPIFFS_OK;
}
protected:
friend class SPIFFSFileImpl;
friend class SPIFFSDirImpl;

View File

@ -91,7 +91,7 @@ void* realloc_loc (void* p, size_t s, const char* file, int line);
#define UMM_BEST_FIT
/* Start addresses and the size of the heap */
extern char _heap_start;
extern char _heap_start[];
#define UMM_MALLOC_CFG__HEAP_ADDR ((uint32_t)&_heap_start)
#define UMM_MALLOC_CFG__HEAP_SIZE ((size_t)(0x3fffc000 - UMM_MALLOC_CFG__HEAP_ADDR))

View File

@ -116,7 +116,7 @@ the ``F()`` macro and possibly the FPSTR() macro. These are defined in `WString.
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
#define F(string_literal) (FPSTR(PSTR(string_literal)))
So ``FSPTR()`` takes a PROGMEM pointer to a string and casts it to this
So ``FPSTR()`` takes a PROGMEM pointer to a string and casts it to this
``__FlashStringHelper`` class. Thus if you have defined a string as
above ``xyz`` you can use ``FPSTR()`` to convert it to
``__FlashStringHelper`` for passing into functions that take it.

View File

@ -109,7 +109,7 @@ See the `BearSSL_CertStore` example for full details as the `BearSSL::CertStore`
Supported Crypto
~~~~~~~~~~~~~~~~
Please see the `BearSSL website <htps://bearssl.org>`__ for detailed cryptographic information. In general, TLS 1.2, TLS 1.1, and TLS 1.0 are supported with RSA and Elliptic Curve keys and a very rich set of hashing and symmetric encryption codes. Please note that Elliptic Curve (EC) key operations take a significant amount of time.
Please see the `BearSSL website <https://bearssl.org>`__ for detailed cryptographic information. In general, TLS 1.2, TLS 1.1, and TLS 1.0 are supported with RSA and Elliptic Curve keys and a very rich set of hashing and symmetric encryption codes. Please note that Elliptic Curve (EC) key operations take a significant amount of time.
BearSSL::WiFiClientSecure Class
@ -139,6 +139,8 @@ setFingerprint(const uint8_t fp[20]) / setFingerprint(const char \*fpStr)
Verify the SHA1 fingerprint of the certificate returned matches this one. If the server certificate changes, it will fail. If an array of 20 bytes are sent in, it is assumed they are the binary SHA1 values. If a `char*` string is passed in, it is parsed as a series of human-readable hex values separated by spaces or colons (e.g. `setFingerprint("00:01:02:03:...:1f");`)
This fingerprint is calcuated on the raw X509 certificate served by the server. In very rare cases, these certificates have certain encodings which should be normalized before taking a fingerprint (but in order to preserve memory BearSSL does not do this normalization since it would need RAM for an entire copy of the cert), and the fingerprint BearSSL calculates will not match the fingerprint OpenSSL calculates. In this case, you can enable SSL debugging and get a dump of BearSSL's calculated fingerprint and use that one in your code, or use full certificate validation. See the `original issue and debug here <https://github.com/esp8266/Arduino/issues/6209>`__.
setTrustAnchors(BearSSL::X509List \*ta)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -14,6 +14,13 @@ Methods documented for the `Server Class <https://www.arduino.cc/en/Reference/Wi
Methods and properties described further down are specific to ESP8266. They are not covered in `Arduino WiFi library <https://www.arduino.cc/en/Reference/WiFi>`__ documentation. Before they are fully documented please refer to information below.
write (write to all clients) not supported
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please note that the ``write`` method on the ``WiFiServer`` object is not implemented and returns failure always. Use the returned
``WiFiClient`` object from the ``WiFiServer::available()`` method to communicate with individual clients. If you need to send
the exact same packets to a series of clients, your application must maintain a list of connected clients and iterate over them manually.
setNoDelay
~~~~~~~~~~

View File

@ -402,6 +402,31 @@ block size - ``pageSize`` — filesystem logical page size - ``maxOpenFiles``
``maxPathLength`` — max file name length (including one byte for zero
termination)
gc
~~
.. code:: cpp
SPIFFS.gc()
Only implemented in SPIFFS. Performs a quick garbage collection operation on SPIFFS,
possibly making writes perform faster/better in the future. On very full or very fragmented
filesystems, using this call can avoid or reduce issues where SPIFFS reports free space
but is unable to write additional data to a file. See `this discussion
<https://github.com/esp8266/Arduino/pull/6340#discussion_r307042268>` for more info.
check
~~~~~
.. code:: cpp
SPIFFS.begin();
SPIFFS.check();
Only implemented in SPIFFS. Performs an in-depth check of the filesystem metadata and
correct what is repairable. Not normally needed, and not guaranteed to actually fix
anything should there be corruption.
Directory object (Dir)
----------------------

View File

@ -16,7 +16,7 @@ static const char serverIndex[] PROGMEM =
</form>
</body></html>)";
static const char successResponse[] PROGMEM =
"<META http-equiv=\"refresh\" content=\"15;URL=/\">Update Success! Rebooting...\n";
"<META http-equiv=\"refresh\" content=\"15;URL=/\">Update Success! Rebooting...";
template <typename ServerType>
ESP8266HTTPUpdateServerTemplate<ServerType>::ESP8266HTTPUpdateServerTemplate(bool serial_debug)

View File

@ -156,7 +156,7 @@ bool ESP8266NetBIOS::begin(const char *name)
}
_pcb = udp_new();
udp_recv(_pcb, &_s_recv, (void *) this);
err_t err = udp_bind(_pcb, INADDR_ANY, NBNS_PORT);
err_t err = udp_bind(_pcb, (ip_addr_t*)INADDR_ANY, NBNS_PORT);
if(err != ERR_OK) {
end();
return false;

@ -1 +1 @@
Subproject commit 6326c71ff1f6294756b6e348edaf723bfe7be3e7
Subproject commit af4ed0c5ec3084cb3883df51ec2052791ca2bff2

View File

@ -135,6 +135,8 @@ public:
void sendContent(const String& content);
void sendContent_P(PGM_P content);
void sendContent_P(PGM_P content, size_t size);
void sendContent(const char *content) { sendContent_P(content); }
void sendContent(const char *content, size_t size) { sendContent_P(content, size); }
static String credentialHash(const String& username, const String& realm, const String& password);
@ -216,6 +218,7 @@ protected:
using ESP8266WebServer = esp8266webserver::ESP8266WebServerTemplate<WiFiServer>;
using RequestHandler = esp8266webserver::RequestHandler<WiFiServer>;
#endif //ESP8266WEBSERVER_H

View File

@ -473,7 +473,7 @@ extern "C" int __ax_port_read(int fd, uint8_t* buffer, size_t count)
}
return cb;
}
extern "C" void ax_port_read() __attribute__ ((weak, alias("__ax_port_read")));
extern "C" int ax_port_read(int fd, uint8_t* buffer, size_t count) __attribute__ ((weak, alias("__ax_port_read")));
extern "C" int __ax_port_write(int fd, uint8_t* buffer, size_t count)
{
@ -489,7 +489,7 @@ extern "C" int __ax_port_write(int fd, uint8_t* buffer, size_t count)
}
return cb;
}
extern "C" void ax_port_write() __attribute__ ((weak, alias("__ax_port_write")));
extern "C" int ax_port_write(int fd, uint8_t* buffer, size_t count) __attribute__ ((weak, alias("__ax_port_write")));
extern "C" int __ax_get_file(const char *filename, uint8_t **buf)
{
@ -497,7 +497,7 @@ extern "C" int __ax_get_file(const char *filename, uint8_t **buf)
*buf = 0;
return 0;
}
extern "C" void ax_get_file() __attribute__ ((weak, alias("__ax_get_file")));
extern "C" int ax_get_file(const char *filename, uint8_t **buf) __attribute__ ((weak, alias("__ax_get_file")));
extern "C" void __ax_wdt_feed()
{

View File

@ -654,6 +654,13 @@ extern "C" {
if (!xc->done_cert) {
br_sha1_update(&xc->sha1_cert, buf, len);
br_x509_decoder_push(&xc->ctx, (const void*)buf, len);
#ifdef DEBUG_ESP_SSL
DEBUG_BSSL("CERT: ");
for (size_t i=0; i<len; i++) {
DEBUG_ESP_PORT.printf_P(PSTR("%02x "), buf[i] & 0xff);
}
DEBUG_ESP_PORT.printf_P(PSTR("\n"));
#endif
}
}
@ -676,7 +683,24 @@ extern "C" {
char res[20];
br_sha1_out(&xc->sha1_cert, res);
if (xc->match_fingerprint && memcmp(res, xc->match_fingerprint, sizeof(res))) {
#ifdef DEBUG_ESP_SSL
DEBUG_BSSL("insecure_end_chain: Received cert FP doesn't match\n");
char buff[3 * sizeof(res) + 1]; // 3 chars per byte XX_, and null
buff[0] = 0;
for (size_t i=0; i<sizeof(res); i++) {
char hex[4]; // XX_\0
snprintf(hex, sizeof(hex), "%02x ", xc->match_fingerprint[i] & 0xff);
strlcat(buff, hex, sizeof(buff));
}
DEBUG_BSSL("insecure_end_chain: expected %s\n", buff);
buff[0] =0;
for (size_t i=0; i<sizeof(res); i++) {
char hex[4]; // XX_\0
snprintf(hex, sizeof(hex), "%02x ", res[i] & 0xff);
strlcat(buff, hex, sizeof(buff));
}
DEBUG_BSSL("insecure_end_chain: received %s\n", buff);
#endif
return BR_ERR_X509_NOT_TRUSTED;
}

View File

@ -37,6 +37,8 @@ class WiFiClientSecure : public WiFiClient {
WiFiClientSecure(const WiFiClientSecure &rhs);
~WiFiClientSecure() override;
WiFiClientSecure& operator=(const WiFiClientSecure&) = default; // The shared-ptrs handle themselves automatically
int connect(IPAddress ip, uint16_t port) override;
int connect(const String& host, uint16_t port) override;
int connect(const char* name, uint16_t port) override;

View File

@ -62,6 +62,8 @@ class WiFiServerSecure : public WiFiServer {
void setServerKeyAndCert(const uint8_t *key, int keyLen, const uint8_t *cert, int certLen);
void setServerKeyAndCert_P(const uint8_t *key, int keyLen, const uint8_t *cert, int certLen);
WiFiServerSecure& operator=(const WiFiServerSecure&) = default;
using ClientType = WiFiClientSecure;
private:

View File

@ -1051,7 +1051,7 @@ bool MDNSResponder::setHostProbeResultCallback(MDNSResponder::MDNSHostProbeFn p_
bool MDNSResponder::setHostProbeResultCallback(MDNSHostProbeFn1 pfn) {
using namespace std::placeholders;
return setHostProbeResultCallback([resp=std::ref(*this), pfn](const char* p_pcDomainName, bool p_bProbeResult) { pfn(resp, p_pcDomainName, p_bProbeResult); });
return setHostProbeResultCallback([this, pfn](const char* p_pcDomainName, bool p_bProbeResult) { pfn(*this, p_pcDomainName, p_bProbeResult); });
}
/*
@ -1080,8 +1080,8 @@ bool MDNSResponder::setServiceProbeResultCallback(const MDNSResponder::hMDNSServ
bool MDNSResponder::setServiceProbeResultCallback(const MDNSResponder::hMDNSService p_hService,
MDNSResponder::MDNSServiceProbeFn1 p_fnCallback) {
using namespace std::placeholders;
return setServiceProbeResultCallback(p_hService, [resp=std::ref(*this), p_fnCallback](const char* p_pcServiceName, const hMDNSService p_hMDNSService, bool p_bProbeResult) {
p_fnCallback(resp, p_pcServiceName, p_hMDNSService, p_bProbeResult);
return setServiceProbeResultCallback(p_hService, [this, p_fnCallback](const char* p_pcServiceName, const hMDNSService p_hMDNSService, bool p_bProbeResult) {
p_fnCallback(*this, p_pcServiceName, p_hMDNSService, p_bProbeResult);
});
}

View File

@ -900,7 +900,7 @@ void ATTR_GDBINIT gdbstub_set_uart_isr_callback(void (*func)(void*, uint8_t), vo
//gdbstub initialization routine.
void ATTR_GDBINIT gdbstub_init() {
void gdbstub_init() {
#if GDBSTUB_REDIRECT_CONSOLE_OUTPUT
os_install_putc1(gdbstub_semihost_putchar1);
#endif
@ -923,4 +923,4 @@ bool ATTR_GDBEXTERNFN gdb_present() {
}
void ATTR_GDBFN gdb_do_break() { gdbstub_do_break(); }
void ATTR_GDBINIT gdb_init() __attribute__((alias("gdbstub_init")));
void gdb_init() __attribute__((alias("gdbstub_init")));

@ -1 +1 @@
Subproject commit f35fb8c14866a4a4677756f6dbeca78f8a9b4001
Subproject commit abd90cb84c818a663b584575b019258d01d0065e

@ -1 +1 @@
Subproject commit f86906b0ade42bb211bbab61c9c948af995cb5d7
Subproject commit 4abc14f4295f3d2dd296f535c48740339edc6d4d

View File

@ -64,14 +64,14 @@ public:
// C-cast serves two purposes:
// static_cast for smaller integer types,
// reinterpret_cast + const_cast for pointer types
_attach_s(seconds, true, reinterpret_cast<callback_with_arg_t>(callback), (void*)arg);
_attach_s(seconds, true, reinterpret_cast<callback_with_arg_t>(callback), reinterpret_cast<void *>(arg));
}
template<typename TArg>
void attach_ms(uint32_t milliseconds, void (*callback)(TArg), TArg arg)
{
static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)");
_attach_ms(milliseconds, true, reinterpret_cast<callback_with_arg_t>(callback), (void*)arg);
_attach_ms(milliseconds, true, reinterpret_cast<callback_with_arg_t>(callback), reinterpret_cast<void *>(arg));
}
void once_scheduled(float seconds, callback_function_t callback)
@ -100,14 +100,14 @@ public:
void once(float seconds, void (*callback)(TArg), TArg arg)
{
static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)");
_attach_s(seconds, false, reinterpret_cast<callback_with_arg_t>(callback), (void*)arg);
_attach_s(seconds, false, reinterpret_cast<callback_with_arg_t>(callback), reinterpret_cast<void *>(arg));
}
template<typename TArg>
void once_ms(uint32_t milliseconds, void (*callback)(TArg), TArg arg)
{
static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)");
_attach_ms(milliseconds, false, reinterpret_cast<callback_with_arg_t>(callback), (void*)arg);
_attach_ms(milliseconds, false, reinterpret_cast<callback_with_arg_t>(callback), reinterpret_cast<void *>(arg));
}
void detach();
@ -122,7 +122,6 @@ protected:
private:
void _attach_s(float seconds, bool repeat, callback_with_arg_t callback, void* arg);
//char _etsTimerMem[sizeof(ETSTimer)];
ETSTimer _etsTimer;
};

View File

@ -14,12 +14,17 @@
#include <Ticker.h>
Ticker tickerSetHigh;
Ticker tickerSetAnalog;
Ticker tickerSetLow;
void setPin(int state) {
digitalWrite(LED_BUILTIN, state);
}
void setPinChar(char state) {
digitalWrite(LED_BUILTIN, state);
}
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(1, LOW);
@ -27,8 +32,9 @@ void setup() {
// every 25 ms, call setPin(0)
tickerSetLow.attach_ms(25, setPin, 0);
// every 26 ms, call setPin(1)
tickerSetHigh.attach_ms(26, setPin, 1);
// every 26 ms, call setPinChar(1)
tickerSetHigh.attach_ms(26, setPinChar, (char)1);
}
void loop() {

View File

@ -82,7 +82,7 @@ $SED 's/^tools.esptool.network_cmd=.*//g' | \
$SED 's/^#tools.esptool.cmd=/tools.esptool.cmd=/g' | \
$SED 's/^#tools.esptool.network_cmd=/tools.esptool.network_cmd=/g' | \
$SED 's/tools.mkspiffs.path={runtime.platform.path}\/tools\/mkspiffs/tools.mkspiffs.path=\{runtime.tools.mkspiffs.path\}/g' |\
$SED 's/recipe.hooks.core.prebuild.2.pattern.*//g' |\
$SED 's/recipe.hooks.core.prebuild.pattern.*//g' |\
$SED "s/version=.*/version=$ver/g" |\
$SED -E "s/name=([a-zA-Z0-9\ -]+).*/name=\1($ver)/g"\
> $outdir/platform.txt
@ -156,7 +156,7 @@ new_json=package_esp8266com_index.json
set +e
# Merge the old and new, then drop any obsolete package versions
python ../../merge_packages.py $new_json $old_json | python ../../drop_versions.py - platforms 1.6.5-947-g39819f0 2.5.0-beta1 2.5.0-beta2 2.5.0-beta3 2.4.0-rc1 2.4.0-rc2 >tmp && mv tmp $new_json && rm $old_json
python ../../merge_packages.py $new_json $old_json | python ../../drop_versions.py - tools 1.20.0-26-gb404fb9 >tmp && mv tmp $new_json && rm $old_json
# Verify the JSON file can be read, fail if it's not OK
set -e

View File

@ -4,12 +4,13 @@
from __future__ import print_function
import json
import sys
from collections import OrderedDict
def load_package(filename):
if filename == "-":
pkg = json.load(sys.stdin)['packages'][0]
pkg = json.load(sys.stdin, object_pairs_hook=OrderedDict)['packages'][0]
else:
pkg = json.load(open(filename))['packages'][0]
pkg = json.load(open(filename), object_pairs_hook=OrderedDict)['packages'][0]
print("Loaded package {0} from {1}".format(pkg['name'], filename), file=sys.stderr)
print("{0} platform(s), {1} tools".format(len(pkg['platforms']), len(pkg['tools'])), file=sys.stderr)
return pkg

View File

@ -111,17 +111,17 @@
"toolsDependencies": [
{
"packager": "esp8266",
"version": "2.5.0-3-20ed2b9",
"version": "2.5.0-4-b40a506",
"name": "xtensa-lx106-elf-gcc"
},
{
"packager": "esp8266",
"version": "2.5.0-3-20ed2b9",
"version": "2.5.0-4-b40a506",
"name": "mkspiffs"
},
{
"packager": "esp8266",
"version": "2.5.1-2",
"version": "2.5.0-4-b40a506",
"name": "mklittlefs"
},
{
@ -192,159 +192,166 @@
]
},
{
"version": "2.5.0-3-20ed2b9",
"version": "2.5.0-4-b40a506",
"name": "xtensa-lx106-elf-gcc",
"systems": [
{
"host": "aarch64-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/aarch64-linux-gnu.xtensa-lx106-elf-20ed2b9c.tar.gz",
"archiveFileName": "aarch64-linux-gnu.xtensa-lx106-elf-20ed2b9c.tar.gz",
"checksum": "SHA-256:2192512ff6e33d4126722b2bfea02c1d8293b0a90094f84a9ac494d5fcaa0f45",
"size": "40974297"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
"archiveFileName": "aarch64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
"checksum": "SHA-256:88c5e9a813bd01c97fe2a07a7280e0685cf18a937ad3ea756d33f8bfbbcbfec3",
"size": "40983153"
},
{
"host": "arm-linux-gnueabihf",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/arm-linux-gnueabihf.xtensa-lx106-elf-20ed2b9c.tar.gz",
"archiveFileName": "arm-linux-gnueabihf.xtensa-lx106-elf-20ed2b9c.tar.gz",
"checksum": "SHA-256:861c4ab7f6f04344f7ee656d90288e6904d7efac83ffe4835b66df3eba35b0a0",
"size": "37013753"
},
{
"host": "i686-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/i686-w64-mingw32.xtensa-lx106-elf-20ed2b9c.zip",
"archiveFileName": "i686-w64-mingw32.xtensa-lx106-elf-20ed2b9c.zip",
"checksum": "SHA-256:38b9ccc3b286546b026fb8a29fb2bd8fdab32c4711816a1a3cb0f11250b5c541",
"size": "44935132"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/arm-linux-gnueabihf.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
"archiveFileName": "arm-linux-gnueabihf.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
"checksum": "SHA-256:244d958e2532e5e1195aa6c8bb38e6fcf1601d88b67631a371d93c818a5a5b65",
"size": "37027468"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/i686-linux-gnu.xtensa-lx106-elf-1f24aeae.tar.gz",
"archiveFileName": "i686-linux-gnu.xtensa-lx106-elf-1f24aeae.tar.gz",
"checksum": "SHA-256:96b106fbc814155e92d1805d3227d36096b88d3d54cfcd885804a0e9cf5631d7",
"size": "42500158"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
"archiveFileName": "i686-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
"checksum": "SHA-256:7c84fa929231d2467060b82ba51599cfb227dea1ac58964c74d46800ac33ba47",
"size": "42926131"
},
{
"host": "i686-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-w64-mingw32.xtensa-lx106-elf-b40a506.1563313032.zip",
"archiveFileName": "i686-w64-mingw32.xtensa-lx106-elf-b40a506.1563313032.zip",
"checksum": "SHA-256:694680c2215a65364748ca876c701479580c017757cd8ed6c3df0d48c2f7bd79",
"size": "44955630"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-apple-darwin14.xtensa-lx106-elf-20ed2b9c.tar.gz",
"archiveFileName": "x86_64-apple-darwin14.xtensa-lx106-elf-20ed2b9c.tar.gz",
"checksum": "SHA-256:fd29ae844915fb2dd800d99ad7967be0e890601c18b80555efbc4eca2dd808c2",
"size": "44378513"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-apple-darwin14.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
"archiveFileName": "x86_64-apple-darwin14.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
"checksum": "SHA-256:ddf7a7ea4d53469918671ea662cf529dae5b255f06054db17621b34c71710641",
"size": "44393288"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-linux-gnu.xtensa-lx106-elf-20ed2b9c.tar.gz",
"archiveFileName": "x86_64-linux-gnu.xtensa-lx106-elf-20ed2b9c.tar.gz",
"checksum": "SHA-256:039f87e2d881b6488a0be8c7fda86cacb1d38502a236cc6768a2dbc2a20ca9cd",
"size": "43778575"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
"archiveFileName": "x86_64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
"checksum": "SHA-256:90e04da49be288f36097d231e2f46ac46204a7640507011358f8f72c04700080",
"size": "43790957"
},
{
"host": "x86_64-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-w64-mingw32.xtensa-lx106-elf-20ed2b9c.zip",
"archiveFileName": "x86_64-w64-mingw32.xtensa-lx106-elf-20ed2b9c.zip",
"checksum": "SHA-256:cc8c19a458129e49ec195d9438a53c6ce2c1287a04ea1ea22b81dcc65db511a8",
"size": "48635537"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-w64-mingw32.xtensa-lx106-elf-b40a506.1563313032.zip",
"archiveFileName": "x86_64-w64-mingw32.xtensa-lx106-elf-b40a506.1563313032.zip",
"checksum": "SHA-256:01c31cd521b058e0805b9d1f3728798a42b1a217a7a34debcda3fcba23414b0e",
"size": "48656678"
}
]
},
{
"version": "2.5.0-3-20ed2b9",
"version": "2.5.0-4-b40a506",
"name": "mkspiffs",
"systems": [
{
"host": "aarch64-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/aarch64-linux-gnu.mkspiffs-7fefeac.tar.gz",
"archiveFileName": "aarch64-linux-gnu.mkspiffs-7fefeac.tar.gz",
"checksum": "SHA-256:5f1e6a1f0eff4522bed90c539f88efe48ecc9c9ee72b0e3cad35f8b09c334168",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
"archiveFileName": "aarch64-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
"checksum": "SHA-256:49cc1938d5df2bec3eec0b3bf2c84ab887c379b04973a67705c80cf1dec523b3",
"size": "51017"
},
{
"host": "arm-linux-gnueabihf",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/arm-linux-gnueabihf.mkspiffs-7fefeac.tar.gz",
"archiveFileName": "arm-linux-gnueabihf.mkspiffs-7fefeac.tar.gz",
"checksum": "SHA-256:edc5ea2080f90f33aed84e5a9b6986bf905431e09155cdca96b648eae9656d94",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/arm-linux-gnueabihf.mkspiffs-7fefeac.1563313032.tar.gz",
"archiveFileName": "arm-linux-gnueabihf.mkspiffs-7fefeac.1563313032.tar.gz",
"checksum": "SHA-256:084518fe5452bc2a33c346e3f0825a7c42e36bdb41ee3320f767a248452813be",
"size": "44050"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
"archiveFileName": "i686-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
"checksum": "SHA-256:d121a44416db8c9772372978f5accd13fe5a926fd17faf55a8dce23744dfc88c",
"size": "54278"
},
{
"host": "i686-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/i686-w64-mingw32.mkspiffs-7fefeac.zip",
"archiveFileName": "i686-w64-mingw32.mkspiffs-7fefeac.zip",
"checksum": "SHA-256:ec661fb02c2635ac722eaaedf0a0c35474c43c72008f0ceefffb19af2f739d15",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-w64-mingw32.mkspiffs-7fefeac.1563313032.zip",
"archiveFileName": "i686-w64-mingw32.mkspiffs-7fefeac.1563313032.zip",
"checksum": "SHA-256:3e0fd9212027cba06e362ae6921f48d252834996d81e1ade41d5b5c54735837a",
"size": "337874"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/i686-linux-gnu.mkspiffs-7fefeac.tar.gz",
"archiveFileName": "i686-linux-gnu.mkspiffs-7fefeac.tar.gz",
"checksum": "SHA-256:d080b3b50ee00ac56b7204f8d08b95cd53872a2e09da590775ee631bcb279cad",
"size": "54276"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-apple-darwin14.mkspiffs-7fefeac.tar.gz",
"archiveFileName": "x86_64-apple-darwin14.mkspiffs-7fefeac.tar.gz",
"checksum": "SHA-256:927cb67d045c598a9159ae16bc5fb63a20b3e23ad95eeb44702c938e6272f92f",
"size": "368554"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-apple-darwin14.mkspiffs-7fefeac.1563313032.tar.gz",
"archiveFileName": "x86_64-apple-darwin14.mkspiffs-7fefeac.1563313032.tar.gz",
"checksum": "SHA-256:efa480b351be563d35bd6a9bee809cd860f49efd26df711500df02b61460e19c",
"size": "368555"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-linux-gnu.mkspiffs-7fefeac.tar.gz",
"archiveFileName": "x86_64-linux-gnu.mkspiffs-7fefeac.tar.gz",
"checksum": "SHA-256:4547bfe668090944d50af8dbf09abb5b51eb4a892b4784818f06a2274a630878",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
"archiveFileName": "x86_64-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
"checksum": "SHA-256:238f9936f5b39f747602becfe90fae0ed6b31e63ea1fa6f5da062fcb33e0aae9",
"size": "52429"
},
{
"host": "x86_64-mingw32",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-3/x86_64-w64-mingw32.mkspiffs-7fefeac.zip",
"archiveFileName": "x86_64-w64-mingw32.mkspiffs-7fefeac.zip",
"checksum": "SHA-256:0dedc3ee977af99ffd160bb304e8bfb68a8545f2d1f2e4a3b534f2ae1a49d2c9",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-w64-mingw32.mkspiffs-7fefeac.1563313032.zip",
"archiveFileName": "x86_64-w64-mingw32.mkspiffs-7fefeac.1563313032.zip",
"checksum": "SHA-256:1c71a7ce71bd39fb83bfab138388adca8c1f9b798e09efd9932aa99d26c04c9b",
"size": "350035"
}
]
},
{
"version": "2.5.1-2",
"version": "2.5.0-4-b40a506",
"name": "mklittlefs",
"systems": [
{
"host": "aarch64-linux-gnu",
"url": "https://github.com/earlephilhower/mklittlefs/releases/download/2.5.1-2/aarch64-linux-gnu-mklittlefs-1c43629.tar.gz",
"archiveFileName": "aarch64-linux-gnu-mklittlefs-1c43629.tar.gz",
"checksum": "SHA-256:1d51ab0e5abc9dd243829353a411fccb76e0ce70e3d106d51fb0d3a29dc1b1a7",
"size": "44058"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.mklittlefs-7f77f2b.1563313032.tar.gz",
"archiveFileName": "aarch64-linux-gnu.mklittlefs-7f77f2b.1563313032.tar.gz",
"checksum": "SHA-256:25c4dcf818d175e19c3cc22bc0388c61fa3d9bdf82a1fad388323cef34caa169",
"size": "44059"
},
{
"host": "arm-linux-gnueabihf",
"url": "https://github.com/earlephilhower/mklittlefs/releases/download/2.5.1-2/arm-linux-gnueabihf-mklittlefs-1c43629.tar.gz",
"archiveFileName": "arm-linux-gnueabihf-mklittlefs-1c43629.tar.gz",
"checksum": "SHA-256:f316d7638ae41c15d82d7f8ca0815dbdfcd5ab323a84ff0d22420e683841150a",
"size": "36566"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/arm-linux-gnueabihf.mklittlefs-7f77f2b.1563313032.tar.gz",
"archiveFileName": "arm-linux-gnueabihf.mklittlefs-7f77f2b.1563313032.tar.gz",
"checksum": "SHA-256:75a284f4e8c54d302b1880df46dd48e18857f69c21baa0977b1e6efc404caf18",
"size": "36567"
},
{
"host": "i686-pc-linux-gnu",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-linux-gnu.mklittlefs-7f77f2b.1563313032.tar.gz",
"archiveFileName": "i686-linux-gnu.mklittlefs-7f77f2b.1563313032.tar.gz",
"checksum": "SHA-256:022c96df4d110f957d43f6d23e9c5e8b699a66d8ab041056dd5da7411a8ade42",
"size": "47544"
},
{
"host": "i686-mingw32",
"url": "https://github.com/earlephilhower/mklittlefs/releases/download/2.5.1-2/i686-w64-mingw32-mklittlefs-1c43629.zip",
"archiveFileName": "i686-w64-mingw32-mklittlefs-1c43629.zip",
"checksum": "SHA-256:4a926f3c282aefe7895d353797f43ac988a9542f2ba7bfcd6ef98fbe1455569c",
"size": "332058"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-w64-mingw32.mklittlefs-7f77f2b.1563313032.zip",
"archiveFileName": "i686-w64-mingw32.mklittlefs-7f77f2b.1563313032.zip",
"checksum": "SHA-256:7778209e9df8c8c5f5da82660ff9a95b866defee3c9eb5c22371e0fd84b1addc",
"size": "332057"
},
{
"host": "x86_64-apple-darwin",
"url": "https://github.com/earlephilhower/mklittlefs/releases/download/2.5.1-2/x86_64-apple-darwin14-mklittlefs-1c43629.tar.gz",
"archiveFileName": "x86_64-apple-darwin14-mklittlefs-1c43629.tar.gz",
"checksum": "SHA-256:b3e62af202f0c93a3f6ccacaaaa133afc0dd1c65a8ea492690d02345212bf535",
"size": "362016"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-apple-darwin14.mklittlefs-7f77f2b.1563313032.tar.gz",
"archiveFileName": "x86_64-apple-darwin14.mklittlefs-7f77f2b.1563313032.tar.gz",
"checksum": "SHA-256:c465da766026c6c66d731442b741fb5a7f8b741e9473d181e6c5e588c541f588",
"size": "362014"
},
{
"host": "x86_64-pc-linux-gnu",
"url": "https://github.com/earlephilhower/mklittlefs/releases/download/2.5.1-2/x86_64-linux-gnu-mklittlefs-1c43629.tar.gz",
"archiveFileName": "x86_64-linux-gnu-mklittlefs-1c43629.tar.gz",
"checksum": "SHA-256:b5222d220e9396807d736d16ef63983f80dc1d8d1e02fa9736f3b4a3e224cc63",
"size": "46162"
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-linux-gnu.mklittlefs-7f77f2b.1563313032.tar.gz",
"archiveFileName": "x86_64-linux-gnu.mklittlefs-7f77f2b.1563313032.tar.gz",
"checksum": "SHA-256:6a358716d4c780fa459b4c774723302431b3ad5e1ee3f7edae62be331541615c",
"size": "46164"
},
{
"host": "x86_64-mingw32",
"url": "https://github.com/earlephilhower/mklittlefs/releases/download/2.5.1-2/x86_64-w64-mingw32-mklittlefs-1c43629.zip",
"archiveFileName": "x86_64-w64-mingw32-mklittlefs-1c43629.zip",
"checksum": "SHA-256:175cdd13a046d6ed06d1ee9eb535100821d8f59adbe16a117d8f80c252e7e62f",
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-w64-mingw32.mklittlefs-7f77f2b.1563313032.zip",
"archiveFileName": "x86_64-w64-mingw32.mklittlefs-7f77f2b.1563313032.zip",
"checksum": "SHA-256:d5d44b5f21681a831318a23b31957bc9368c50f0766964ead409c3d2fe4747d2",
"size": "344578"
}
]

View File

@ -34,6 +34,7 @@ build.sslflags=
build.exception_flags=-fno-exceptions
build.stdcpp_lib=-lstdc++
build.stdcpp_level=-std=gnu++11
build.float=-u _printf_float -u _scanf_float
build.led=
@ -57,7 +58,7 @@ compiler.c.elf.cmd=xtensa-lx106-elf-gcc
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 {build.stdcpp_lib} -lm -lc -lgcc
compiler.cpp.cmd=xtensa-lx106-elf-g++
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections {build.exception_flags} {build.sslflags}
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 {build.stdcpp_level} -MMD -ffunction-sections -fdata-sections {build.exception_flags} {build.sslflags}
compiler.as.cmd=xtensa-lx106-elf-as
@ -83,8 +84,8 @@ compiler.elf2hex.extra_flags=
## generate file with git version number
## needs bash, git, and echo
recipe.hooks.core.prebuild.1.pattern="{runtime.tools.python.path}/python" "{runtime.tools.signing}" --mode header --publickey "{build.source.path}/public.key" --out "{build.path}/core/Updater_Signing.h"
recipe.hooks.core.prebuild.2.pattern="{runtime.tools.python.path}/python" "{runtime.tools.makecorever}" --build_path "{build.path}" --platform_path "{runtime.platform.path}" --version "unix-{version}"
recipe.hooks.sketch.prebuild.pattern="{runtime.tools.python.path}/python" "{runtime.tools.signing}" --mode header --publickey "{build.source.path}/public.key" --out "{build.path}/core/Updater_Signing.h"
recipe.hooks.core.prebuild.pattern="{runtime.tools.python.path}/python" "{runtime.tools.makecorever}" --build_path "{build.path}" --platform_path "{runtime.platform.path}" --version "unix-{version}"
## Build the app.ld linker file
recipe.hooks.linking.prelink.1.pattern="{compiler.path}{compiler.c.cmd}" -CC -E -P {build.vtable_flags} "{runtime.platform.path}/tools/sdk/ld/eagle.app.v6.common.ld.h" -o "{build.path}/local.eagle.app.v6.common.ld"

View File

@ -147,7 +147,7 @@ DEBUG += -DDEBUG_ESP_PORT=Serial
DEBUG += -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_MDNS
endif
FLAGS += $(DEBUG) -Wall -coverage $(OPTZ) -fno-common -g $(M32)
FLAGS += $(DEBUG) -Wall $(OPTZ) -fno-common -g $(M32)
FLAGS += -DHTTPCLIENT_1_1_COMPATIBLE=0
FLAGS += -DLWIP_IPV6=0
FLAGS += -DHOST_MOCK=1
@ -178,7 +178,7 @@ COVERAGE_FILES = $(OBJECTS:.o=.gc*)
all: help
CI: # run CI
$(MAKE) -f $(MAKEFILE) MKFLAGS=-Werror FORCE32=0 OPTZ=-O0 doCI
$(MAKE) -f $(MAKEFILE) MKFLAGS="-Werror -coverage" FORCE32=0 OPTZ=-O0 doCI
doCI: build-info $(OUTPUT_BINARY) valgrind test gcov
@ -287,6 +287,7 @@ MOCK_ARDUINO_LIBS := $(addprefix common/,\
MockEsp.cpp \
MockEEPROM.cpp \
MockSPI.cpp \
strl.cpp \
)
CPP_SOURCES_CORE_EMU = \

View File

@ -152,7 +152,7 @@ static struct option options[] =
void cleanup ()
{
mock_stop_spiffs();
// mock_stop_littlefs();
mock_stop_littlefs();
mock_stop_uart();
}
@ -182,7 +182,7 @@ int main (int argc, char* const argv [])
for (;;)
{
int n = getopt_long(argc, argv, "hlcfbvi:S:s:", options, NULL);
int n = getopt_long(argc, argv, "hlcfbvi:S:s:L:", options, NULL);
if (n < 0)
break;
switch (n)
@ -239,7 +239,7 @@ int main (int argc, char* const argv [])
name += "-littlefs";
name += String(littlefs_kb > 0? littlefs_kb: -littlefs_kb, DEC);
name += "KB";
// mock_start_littlefs(name, littlefs_kb);
mock_start_littlefs(name, littlefs_kb);
}
// setup global global_ipv4_netfmt

View File

@ -37,6 +37,7 @@
#ifdef __cplusplus
#include <vector>
#endif
#include <stddef.h>
#ifdef __cplusplus
@ -49,6 +50,8 @@ char* ltoa (long val, char *s, int radix);
}
#endif
size_t strlcat(char *dst, const char *src, size_t size);
size_t strlcpy(char *dst, const char *src, size_t size);
// exotic typedefs used in the sdk

View File

@ -0,0 +1,86 @@
// https://gist.github.com/Fonger/98cc95ac39fbe1a7e4d9
#ifndef HAVE_STRLCAT
/*
'_cups_strlcat()' - Safely concatenate two strings.
*/
size_t /* O - Length of string */
strlcat(char *dst, /* O - Destination string */
const char *src, /* I - Source string */
size_t size) /* I - Size of destination string buffer */
{
size_t srclen; /* Length of source string */
size_t dstlen; /* Length of destination string */
/*
Figure out how much room is left...
*/
dstlen = strlen(dst);
size -= dstlen + 1;
if (!size)
{
return (dstlen); /* No room, return immediately... */
}
/*
Figure out how much room is needed...
*/
srclen = strlen(src);
/*
Copy the appropriate amount...
*/
if (srclen > size)
{
srclen = size;
}
memcpy(dst + dstlen, src, srclen);
dst[dstlen + srclen] = '\0';
return (dstlen + srclen);
}
#endif /* !HAVE_STRLCAT */
#ifndef HAVE_STRLCPY
/*
'_cups_strlcpy()' - Safely copy two strings.
*/
size_t /* O - Length of string */
strlcpy(char *dst, /* O - Destination string */
const char *src, /* I - Source string */
size_t size) /* I - Size of destination string buffer */
{
size_t srclen; /* Length of source string */
/*
Figure out how much room is needed...
*/
size --;
srclen = strlen(src);
/*
Copy the appropriate amount...
*/
if (srclen > size)
{
srclen = size;
}
memcpy(dst, src, srclen);
dst[srclen] = '\0';
return (srclen);
}
#endif /* !HAVE_STRLCPY */

View File

@ -44,14 +44,13 @@ import json
# or by user command line
speeds = collections.OrderedDict([
( '9', [ 's9', 's57', 's115', 's230', 's256', 's460', 's512', 's921' ]),
( '57', [ 's57', 's9', 's115', 's230', 's256', 's460', 's512', 's921' ]),
( '115', [ 's115', 's9', 's57', 's230', 's256', 's460', 's512', 's921' ]),
( '230', [ 's230', 's9', 's57', 's115', 's256', 's460', 's512', 's921' ]),
( '256', [ 's256', 's9', 's57', 's115', 's230', 's460', 's512', 's921' ]),
( '460', [ 's460', 's9', 's57', 's115', 's230', 's256', 's512', 's921' ]),
( '512', [ 's512', 's9', 's57', 's115', 's230', 's256', 's460', 's921' ]),
( '921', [ 's921', 's9', 's57', 's115', 's230', 's256', 's460', 's512' ]),
( '57', [ 's57', 's115', 's230', 's256', 's460', 's512', 's921' ]),
( '115', [ 's115', 's57', 's230', 's256', 's460', 's512', 's921' ]),
( '230', [ 's230', 's57', 's115', 's256', 's460', 's512', 's921' ]),
( '256', [ 's256', 's57', 's115', 's230', 's460', 's512', 's921' ]),
( '460', [ 's460', 's57', 's115', 's230', 's256', 's512', 's921' ]),
( '512', [ 's512', 's57', 's115', 's230', 's256', 's460', 's921' ]),
( '921', [ 's921', 's57', 's115', 's230', 's256', 's460', 's512' ]),
])
# boards list
@ -1328,7 +1327,7 @@ def led (default,max):
('.menu.led.' + str(default), str(default)),
('.menu.led.' + str(default) + '.build.led', '-DLED_BUILTIN=' + str(default)),
]);
for i in range(0,max):
for i in range(0,max+1): # Make range incluside of max (16), since there are really 16 GPIOS not 15
if not i == default:
led.update(
collections.OrderedDict([

View File

@ -81,6 +81,14 @@ def serve(remoteAddr, localAddr, remotePort, localPort, password, filename, comm
logging.error("Listen Failed")
return 1
# Check whether Signed Update is used.
if ( os.path.isfile(filename + '.signed') ):
filename = filename + '.signed'
file_check_msg = 'Detected Signed Update. %s will be uploaded instead.' % (filename)
sys.stderr.write(file_check_msg + '\n')
sys.stderr.flush()
logging.info(file_check_msg)
content_size = os.path.getsize(filename)
f = open(filename,'rb')
file_md5 = hashlib.md5(f.read()).hexdigest()

View File

@ -1,2 +1,2 @@
// Do not edit -- Automatically generated by tools/sdk/ssl/bearssl/Makefile
#define BEARSSL_GIT 6b9587f
#define BEARSSL_GIT 89454af

View File

@ -1251,8 +1251,8 @@ static inline void
br_ssl_engine_set_versions(br_ssl_engine_context *cc,
unsigned version_min, unsigned version_max)
{
cc->version_min = version_min;
cc->version_max = version_max;
cc->version_min = (uint16_t)version_min;
cc->version_max = (uint16_t)version_max;
}
/**
@ -1325,7 +1325,7 @@ br_ssl_engine_set_protocol_names(br_ssl_engine_context *ctx,
const char **names, size_t num)
{
ctx->protocol_names = names;
ctx->protocol_names_num = num;
ctx->protocol_names_num = (uint16_t)num;
}
/**

View File

@ -129,6 +129,8 @@ SECTIONS
*(.text.app_entry*) /* The main startup code */
*(.text.gdbstub*, .text.gdb_init) /* Any GDB hooks */
/* all functional callers are placed in IRAM (including SPI/IRQ callbacks/etc) here */
*(.text._ZNKSt8functionIF*EE*) /* std::function<any(...)>::operator()() const */
} >iram1_0_seg :iram1_0_phdr

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -402,7 +402,7 @@ struct _reent
char *_asctime_buf;
/* signal info */
void (**(_sig_func))(int);
void (**_sig_func)(int);
# ifndef _REENT_GLOBAL_ATEXIT
/* atexit stuff */

View File

@ -1,5 +1,5 @@
// generated by makefiles/make-lwip2-hash
#ifndef LWIP_HASH_H
#define LWIP_HASH_H
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.1-7-g82abda3"
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.1-8-g2314329"
#endif // LWIP_HASH_H

@ -1 +1 @@
Subproject commit 6b9587f4ac63f0ec62a7c5884b1b70496713acb3
Subproject commit 89454af34e3e61ddfc9837f3da5a0bc8ed44c3aa