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

3572 Commits

Author SHA1 Message Date
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
Dirk O. Kaar
d6e603f397 Fix optimistic_yield to not yield on every call after a loop runs for x us, but yield only every x us between optimistic_yield calls. 2020-02-05 14:31:42 +01:00
david gauchard
a8515a7d66
use STA as default interface in mDNS (#7042) 2020-02-05 10:14:42 +01:00
Dirk O. Kaar
58829022ed Fix "improved_map" from Servo.cpp and use this is in core implementation.
Greatly reduces error rate (half, or 0 zero errors, depends on in/out ranges) for round-trip mapping at the same performance.
2020-02-05 07:28:04 +01:00
david gauchard
14f627218b
update to new prebuilt win sed version (#7062) 2020-02-05 00:05:05 +01:00
Earle F. Philhower, III
6be561617f
Added dependencies for eboot.ld and Makefile to Makefile. (#7047)
Updated eboot.ld to not fill with zeros through the CS field
on its way to the CRC.
Added size test to elf2bin.py
2020-02-03 09:49:13 -08:00
Earle F. Philhower, III
d0316a13fc
Merge branch 'master' into pr-eboot-cs-fix 2020-02-02 15:18:01 -08:00
StanJ
63b73bf181
add Low-Power demo (#6989)
* add Low-Power demo
2020-02-01 21:57:21 -03:00
ramirocarra
378c1f14c7
Update ESP8266HTTPClient.cpp (#7051)
sendRequest has a major problem when sending a big payload, the comparator in the IF loop has its two operators changed, so the last part of payload is never sent
2020-02-01 20:11:00 -03:00
Dirk Mueller
a2141803f1
Code size optimisation of ESP.getResetReason() (#7029)
* Code size optimisation of ESP.getResetReason()

doing if/else snakes for something that is a switch/case
is wasteful, as it repeatedly evaluates the same if() condition.
Also repeating strcpy_P is adding code bloat.

This simplification reduces size from 111 to 41 bytes.

* add break statement also to default case
2020-01-30 13:07:34 -08:00
M Hightower
fe7faf701e Added dependencies for eboot.ld and Makefile to Makefile.
Updated eboot.ld to not fill with zeros through the CS field
on its way to the CRC.
Added size test to elf2bin.py
2020-01-29 13:26:58 -08:00
liebman
9e9515b49f clear _canReuse in setUrl if its not a local redirect (#7039) 2020-01-28 00:35:16 -03:00
Dirk O. Kaar
bb696dd204 host build: optimistic_yield() wrongly delays() instead of avoiding excessive yields (#6802)
* optimistic_yield is a yield, not a delay, and avoids yielding if last yield has occurred recently enough.

* Suppress an unused argument warning.

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-01-27 16:47:39 -08:00
LeisureLadi
7b0fa3554c Update LEAmDNS.cpp (fix issue #6982) (#7025)
* Update LEAmDNS.cpp (issue #6982)

Check m_pUDPContext before calling functions to reset WiFi event callbacks, stop probing ... to close #6982

* Update LEAmDNS.cpp

Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2020-01-27 16:08:30 -08:00
M Hightower
0c6be9e114 Made changes to include "ESP8266_" with ITEAD board names, {build.board}, (#7024)
as proposed by https://github.com/esp8266/Arduino/pull/6972#issue-358508056.
@ttytyper 's changes have been incorporate into this PR
The build flag ARDUINO_SONOFF_... should now appear as ARDUINO_ESP8266_SONOFF_...
@ttytyper, @mcspr, and @d-a-v thanks!
2020-01-27 14:44:08 -08:00
david gauchard
0989932669
allow ".bin.gz" filter in updater file selector (#7026) 2020-01-26 00:56:46 +01:00
Dirk O. Kaar
baf223c6cb Release 6.7.1 (#7034) 2020-01-25 23:54:32 +01:00
david gauchard
6e37ee36f8
fix CI: switch to python3 for pio (#7035) 2020-01-25 22:55:34 +01:00
Dirk Mueller
158039e414 Reduce mem footprint of ESP.getResetInfo() (#7030)
This function has excessively long datastrings that can
better be stored in flash, reducing runtime memory footprint.

Also detailed formatting only makes sense when there is an
exception or a watchdog. In other cases instead of printing
an unhelpful "flag: 0" we can just return the ResetReason, which
is much more readable.

Saves about 120 bytes of (data) memory.
2020-01-22 06:00:11 -08:00
Earle F. Philhower, III
00440cd84a
Remove memory leak on multiple calls to initCertStore (#7021)
In some cases, `initCertStore` may need to be called multiple times
(i.e. to update certs w/oa reboot).  In that case, the saved file names
leaked when the new ones were `malloc()`'d.

Fix by freeing the old strings, if present.
2020-01-17 10:10:17 -08:00
M Hightower
b930c4c3e6 boards.txt.py: Fix packagegen to use newfilestr instead of filestr when writing file. (#7018)
Three missing boards are now in package/package_esp8266com_index.template.json.
2020-01-17 18:24:47 +01:00
Earle F. Philhower, III
bb6243a17b
Use a python3 script to call python3 (#6960)
* Use a python3 script to call python3

It's odd, but because Windows requires a full Python3 install we must
have an executable called "tools/python3/python3" to use Python3 in the
toolchain.

Before, we simply symlinked to /usr/bin/python3 (for Linux) or
/usr/local/bin/python3 (Mac).  Unfortunately, depending on the method of
installation, on MacOS the Python3 executable can be in /usr/bin/python3
instead.

To avoid the entire issue, unify the Mac and Linux python3 placeholders
to use python3 itself to jump to the real executable.

Fixes #6931

* Explicitly remove old symlink to python3

The tar extraction for the updated python3 tarball will fail on systems
that already have a symlink in /tools/python3/python3 because the tar
extractor attempts to open the *target of the symlink* (i.e. the actual
interpreter in /usr/bin or /usr/local/bin).

Add a commented hack to destroy this symlink before expanding the
tarballs, if the file exists.  This is safe to do since it will be
overwritten by any extractions of the python3 tarball later in the
process.

Co-authored-by: david gauchard <gauchard@laas.fr>
2020-01-14 06:53:17 -08:00
Earle F. Philhower, III
0d38ea7308
Add back mklittlefs for linux32 target (#7011)
Fixes #7006

mklittlefs for 32-bit Linux disappeared from the packages.json.  Looks
like a transient build problem on the older eqt release (later builds
look fine).  Add it back, pointing to the first successful mklittlefs
build for lin32.

Co-authored-by: Develo <deveyes@gmail.com>
2020-01-11 09:16:46 -08:00
Earle F. Philhower, III
677007f481
Define MAX_SERVOS to 12, like original Servo.h (#6999)
Fixes #6997
2020-01-08 20:30:44 -08:00