1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

3695 Commits

Author SHA1 Message Date
Earle F. Philhower, III
1127a090ad
Add 2MB obtion to 8285 generic board (#7163)
The ESP8285H16 is reported to have 2MB of flash, so add an option the
the Generic 8285 board for 2MB.

Fixes #7161
2020-03-22 22:38:38 +01:00
Clemens Kirchgatterer
e64cb619f7
Pull GPIO initialization into its own 'weak' function. (#7044)
* Pull GPIO initialization into its own 'weak' function.

By pulling GPIO init into its own weak function, it can be overridden by the user. This is important in cases when GPIOs should not toggle during reboot, exceptions or other crashes. Fixes #7041.

* Add prototype for resetPins()
2020-03-22 13:16:39 +01:00
Earle F. Philhower, III
db75d2c448
Abort if BearSSL stack allocation fails (#7152)
As found by @d-a-v, if the malloc() used to get the BearSSL stack does
not succeed, abort() immediately.
2020-03-15 11:56:23 -07:00
Earle F. Philhower, III
e252873263
Use 2nd stack for update signature verification (#7149)
* Use 2nd stack for update signature verification

Fixes #7145

When doing a signed update, the signature calculation can use a lot of
stack, so move it silently to the BearSSL second stack.

Also fix a memory leak of signature-bytes found by @JiriBilek

* Reset state on any error condition in Updater::end
2020-03-14 16:10:40 -07:00
david gauchard
afb9921d38
avoid printing nullptr string (#7144) 2020-03-14 11:34:04 -03:00
Ivan Kravets
845241b72c
Fix RST links for PlatformIO (#7143)
* Fix RST links

* Update links to PlatformIO
2020-03-09 17:08:07 +02:00
Ivan Kravets
01a4d292e1
Installation guide for PlatformIO (#7142) 2020-03-09 15:51:32 +02:00
Dirk O. Kaar
252240326f
EspSoftwareSerial 6.8.0 adds ESP8285 support (#7139)
* EspSoftwareSerial: Use compile-time flash pin deduction, enables ESP8285.

* EspSoftwareSerial release 6.8.0 for ESP8285 support.
2020-03-08 10:20:53 -07:00
david gauchard
372a3ec297
EspSoftwareSerial release 6.7.2 fixes warnings with gcc 9.2 (#7133)
* MultiDelegate breaking change and improvements.

The event-multiplexer specialization no longer removes items based on invoke return value.
This is mitigated by new iterators and erase(iterator). Check the documentation comments for
details.

* MultiDelegate: constness on return type warning fix.

* EspSoftwareSerial: Conform to C++ 17 and later.

* EspSoftwareSerial: Resolve g++ 9's c++17 deprecation warnings.

* EspSoftwareSerial, Delegate.h: gcc 9.2 is very strict about template inheritance of ctor and assignment operators, needing a lot

of code duplication, this commit provides that.

* Delegate.h, fix both ambiguous operator= and infinite ctor recursion.

* EspSoftwareSerial release 6.7.2
2020-03-05 12:24:27 +01:00
david gauchard
b8e4ca48a4
udp: fix again pbuf management (#7132)
* udp: fix again pbuf management
* Process rx buffer size, cache it, because _rx_buf->tot_len is *not* the total size
2020-03-04 21:40:50 +01:00
Martijn Scheepers
b64e8da2e2
Set a value for SSDP notify interval (#7110)
* Set a value for SSDP notify interval, default to 1200 seconds.

* Changed uint8_t to uint32_t

Co-authored-by: david gauchard <gauchard@laas.fr>
2020-03-03 19:00:38 -03:00
david gauchard
e39cbe6328
rebuild lwip2 1.2-30 (#7131) 2020-03-03 21:58:57 +01:00
david gauchard
c61b70de86
unblobbing commit 2c435b1f42 (commitcomment-37529995) (#7121) 2020-02-28 00:30:36 -03:00
david gauchard
2c435b1f42
lwip2 update: stop dhcp when interface goes down (#7114) 2020-02-27 08:21:33 +01:00
schirmilabs
0554d39c6c
Add support for my new board eduino wifi (#6554)
* ^#

* Fix merge conflict

* Fix merge conflict

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-02-26 08:15:57 -08:00
david gauchard
abdd2bdbb6
simple TZ api: bypass sprintf/sscanf: + 7KB (#7109)
* simple TZ api: bypass sprintf/sscanf: + 7KB
2020-02-25 11:16:10 +01:00
LaborEtArs
4b2bf45933
Additions to UdpContext needed for LEAmDNS2 (#7048)
* Addition to UdpContext needed for LEAmDNS2
2020-02-24 14:56:00 +01:00
david gauchard
2d58be744b
TCP: fixes backlog limit handling, and allows ephemeral TCP connections (#7096)
* fix backlog limit handling, and allow ephemeral TCP connections
* do not retain empty connections
2020-02-24 07:16:55 +01:00
Develo
2b640c0189
Add flash helper constructor to Uri (#7105)
* Update Uri.h

* Add a simple test for the new constructor

Convert a c-str to a FPSTR in the example to have a section
of code in our CI that will catch any future breaks of this specific
kind.

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-02-23 11:29:47 -08:00
JasperHorn
d990ff9547
Improve LittleFS support (#7071)
Previously, when the path was a directory, but didn't have a slash at
the end, a 0 byte response would be sent when using LittleFS. Now, it
will return a 404, like was always the case when using SPIFFS.
2020-02-23 09:38:40 +01:00
Tim Stableford
16319da63d
Resolved issue #3359 (#6969)
* Resolved issue #3359

Made severing connections optional as per the patch
in the issue.
Also fixed a minor spacing issue.

* Renamed sever to close and added information to readme

Also my editor automatically removed some odd whitespace at the
end of a few lines.
2020-02-22 16:30:17 -08:00
Earle F. Philhower, III
bea64dfa69
Add fileCreation/getCreation create-time accessors (#7000)
* Add fileCreation/getCreation create-time accessors

For SDFS and LittleFS, enable a creation time accessor for files and Dir
iterators, similar to the existing fileTime/getLastWrite calls.

Remove spurious Dir::getLastWrite method (the proper and only documented
way is really Dir::fileTime).

Update json to point to new mklittlefs which copies the creation date of
files to the image.

Fixes #6992

* Remove malloc(), use stack vars for temp names

LFS filenames are limited in size and generally very small.  Use a stack
variable instead of a dynamic allocation when performing full-path
computations.

* Replace "Creation" w/"CreationTime" in FS accessor

Per review, `getCreation` -> `getCreationTime`, `fileCreation` ->
`fileCreationTime`.

The names `fileTime()` and `getLastWrite()` are inherited from ESP32
implementation and unchanged.

* Add creation time to listfiles SD example

* Enable SdFat's sateTime callback for timestamping

SdFat requries the dateTimeCallback call (global for everything) to
update dates and times on created files.

Because the callback signature doesn't have space for us to provide
any parameters, we cannot get the the File, Dir, or FS object's
dateTimeCB member.  Instead, just go with `time(null)` as the callback
function which is right in all but the most esoteric cases.

* Correct DOS year/month offset in dateTime callback

* Fix docs to match new xxxCreationTime() API names

Co-authored-by: Develo <deveyes@gmail.com>
2020-02-22 12:49:08 -08:00
Bob
4eca62cb53
Add Uri with support for regexUri and globUri (#6696)
* Add path args

* Add example

* Update code format

* Add missing include

* Fix codestyle and unsigned int

* fix unsigned int

* Remove tabs

* use vector<>.resize

* rename j to requestUriIndex

* using assert checking the path argument index

* Add missing include "assert.h"

* The order no longer matters.
Path arguments may not contain the value '/'
Updated the example

* make pathArg return a const

* Update PathArgServer.ino

fix trailing space

* const String&

* Add regex support

* Fix to match templating

* Add Uri with support for staticUri, regexUri and globUri

* Update example

* Add deconstructor to remove _uri pointer

* Add newline to end of files

* Suppress gcc warnings (unused params)

* Replace regex with regex.h

* Use the standard STASSID/PSK settings for example

Make the example match the existing examples which allow setting
the SSID/PSK in the local platform.txt file.

* Use 115.2Kbaud for example, match others

Co-authored-by: david gauchard <gauchard@laas.fr>
Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-02-22 16:51:47 -03:00
Earle F. Philhower, III
a40663b65f
Update to latest BearSSL (#7098)
Minor changes which should not affect us, but keeping in sync with
upstream nevertheless.
2020-02-22 12:42:46 +01:00
david gauchard
f69e404c87
SNTP: backport espressif sntp api for lwip2 (#7097) 2020-02-22 11:55:01 +01:00
Szabolcs Székelyi
e6decacd0a
Fix/enable UDP packet reassembly (#7036)
* Fix/enable UDP packet reassembly

UdpContext didn't care about pbuf chaining when receiving datagrams, leading
to fragments delivered to the application as individual packets.

* Provide pbuf_get_contiguous for backwards compatibility with LwIP 1.4

Implementation copied verbatim from LwIP 2.1.2

* Cosmetic changes to meet coding style

Co-authored-by: david gauchard <gauchard@laas.fr>
Co-authored-by: Develo <deveyes@gmail.com>
2020-02-22 07:38:14 +01:00
david gauchard
cd56dc0901
restore dtostrf when floats are disabled in printf/scanf + round fix (#7093)
* restore dtostrf+fix when float printing is disabled at link time

* fix include file

* fix with proposal per review

* always use dtostrf
2020-02-21 22:34:09 -03:00
Earle F. Philhower, III
0a58172c6a
Merge pull request #6804 from dok-net/optimistic_yield_recurrency
Fix optimistic_yield to not yield on each call after x µs
2020-02-20 14:11:45 -08:00
Earle F. Philhower, III
5100beec2c
Merge branch 'master' into optimistic_yield_recurrency 2020-02-20 12:30:05 -08:00
Dirk O. Kaar
afe40211ef Corrections after review remarks; thanks @earlephilhower 2020-02-20 19:41:08 +01:00
david gauchard
f066ed2495
configTime(tzsec,dstsec,): fix UTC/local management (#6993)
* configTime(tzsec,dstsec,): fix UTC/local management
This PR also remove dead code since probably newlib updates
The NTP-TZ-DST example is also updated
* restore sntp_set_timezone_in_seconds()
fixes #6678
* +configTzTime()
2020-02-18 16:39:38 +01:00
david gauchard
e752e96e9f
lwip2 updates: no more git sub-sub-module deps, faster checksum, backlog limitation and other fixes (#6887)
* upstream lwIP is now downloaded by a makefile, not subsubmoduled

* lwip2: upstream lwIP not sub-sub-modules anymore
lwip2: Allow IPv4 and IPv6 DNS and SNTP server configured via DHCP to co-exist (patch against upstream)

* lwip2: enable tcp-listen-with-backlog feature

* lwip2 submodule update:
- enable more efficient chksum algorithm thanks to Richard Allen
- enable tcp listener with backlog

* more comments, fix backlog management, fix API
* move default value definition in .cpp
because one must not believe it can be redefined before including WiFiServer.h

* improved backlog handling, it is no more a breaking change
2020-02-18 06:54:50 +01:00
david gauchard
bc4f000c48
package builder: updates for alpha releases (#7088)
allow versions 0.0.* to be special
2020-02-17 17:40:50 +01:00
Earle F. Philhower, III
321d256c8b
Merge pull request #7085 from mhightower83/pr-bear-stack-dump
Corrected stack start and end in stack_thunk_dump_stack().
2020-02-16 09:17:39 -08:00
M Hightower
c07a1fd1b7 Corrected stack start and end in stack_thunk_dump_stack(). 2020-02-14 11:05:04 -08:00
Valerii Koval
5efdc7762a
Allow using custom linker scripts (#7078) 2020-02-13 00:30:26 +02:00
Earle F. Philhower, III
11ae243ecf Merge pull request #7068 from earlephilhower/dtostrf_to_printf
Use sprintf to output floats in Print/dtostrf
2020-02-09 16:24:58 -08:00
Develo
0c1b6f9f96
Merge branch 'master' into dtostrf_to_printf 2020-02-09 15:59:28 -03:00
Earle F. Philhower, III
dbd7b8218d
Fix serach order for index.htm(l)(.gz) files (#7069)
Fixes #6984

When a directory index is requested with an explicit index.html, follow
the original webserver order and check for: index.htm, index.htm.gz,
index.html, index.html.gz, in order.

Fixes the regressions introduced in 9f2cfb8 and 6768116
2020-02-09 15:58:06 -03:00
Earle F. Philhower, III
f762721603 Use sprintf to output floats in Print/dtostrf
Fixes #7043

Two slightly different custom routines were implemented by hand in
dtostrf (an AVR-lib non-ISO function) and Print.  This resulted in
inconsistent output of float/double vars when rounding was needed.

Replace them all with a call to sprintf(), removing the duplicated, not
quite correct code.

Print(String(float)) and Print(float) now generate the same output.
2020-02-09 09:11:41 -08:00
Earle F. Philhower, III
56b90a2abb
Merge pull request #7027 from dok-net/wmath_map
Fix WMath's map() implementation for inverse/round-trip mapping
2020-02-08 20:00:42 -08:00
Earle F. Philhower, III
cd5cbae1f6
Merge branch 'master' into wmath_map 2020-02-08 13:51:48 -08:00
Earle F. Philhower, III
50a491b7fd Merge pull request #7066 from mhightower83/pr-postmortem-offset-update
Updated stack offsets for postmortem stack dump.
2020-02-08 13:12:01 -08:00
M Hightower
f45da1cf25 Updated stack offsets for postmortem stack dump.
Changed ets_putc to ets_uart_putc1 to better newline handling.
2020-02-07 10:02:14 -08:00
Dirk O. Kaar
50fab5162f No need for preprocessor undefinition of optimistic_yield, after all. 2020-02-05 14:31:42 +01:00
Dirk O. Kaar
8d2eca5684 Remove long-since disused define. 2020-02-05 14:31:42 +01:00
Dirk O. Kaar
554435780b Due to 3rd party use of symbol optimistic_yield without #include <Arduino>, have to resort to preprocessor definition for inlining. 2020-02-05 14:31:42 +01:00
Dirk O. Kaar
3767791fbc Allow constexpr evalution to occur. optimistic_yield is always called with a literal parameter value. 2020-02-05 14:31:42 +01:00
Dirk O. Kaar
3d7423bdde Move yield start time set to esp_yield_within_cont 2020-02-05 14:31:42 +01:00
Dirk O. Kaar
598361f3aa Substitute micros() by CPU cycles - faster, but large values for interval_us can overflow - 26s at 160MHz CPU clock. 2020-02-05 14:31:42 +01:00