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

3738 Commits

Author SHA1 Message Date
Earle F. Philhower, III
7605dc1643
Only set flashmode byte when uploading an executable (#6891)
Fixes #6880

The updater was patching in the proper flashmode configuration byte for
all uploads, apps and filesystems.  This ended up corrupting one byte on
every FS upload.

Change updated to only patch theflashmode if it is doing an app.
2019-12-08 19:34:04 -07:00
Earle F. Philhower, III
1189417d9f
Rebuild eboot.elf to include #6823 changes (#6890)
Just ran a "make" in the bootloaders/eboot dir to regenerate the
eboot.elf file we use to link binaries with.

Fixes #6863
2019-12-08 13:07:51 -07:00
Dirk O. Kaar
8a6a7f7480 Non-parity modes save 56 bytes of heap memory. (#6882)
Hardened code in non-parity mode against setting parity case by case.
Waveform generator is back after one release without.
2019-12-05 08:25:44 -03:00
Matthias Hertel
a738884387 Handle HEAD requests for static files correctly (#6837)
* Handle HEAD requests for static files correctly

* Handle HEAD requests for static files correctly
2019-12-04 18:23:25 +01:00
LeisureLadi
5aefed2f4b Update PROGMEM.rst (#6872)
* Update PROGMEM.rst

Include array of strings in the description, since the examples in Arduino do not consider the right pointer size

* Update PROGMEM.rst
2019-12-04 13:14:14 +01:00
david gauchard
e08b22c5b5
sdk:22x-191122 (#6879)
* sdk:22x191122
another firmware to test
not default: v2.2.1-119-ga0b1311 (shows as SDK:2.2.2-dev(a58da79) in debug mode)
default unchanged

* and the obj files
2019-12-04 11:41:51 +01:00
david gauchard
326083044a
webserver: fix sending char* (#6878)
* webserver: fix sending char*

* add missing char*  overload
2019-12-04 00:51:51 +01:00
david gauchard
ee24cffc5a
fix device tests (#6861)
* help in makefile

* fix some device tests, http_server is pending

* fix webserver test, one test is disabled due to general python2->3 failure

* remove debug strings

* minimize diff

* set reset method back to the default one on generic board

* fix vcc range check from datasheet
vcc is read as 2.9V here, datasheet says 2.5-3.6, old low limit was 3v

* tell python to decode string
2019-12-03 23:26:54 +01:00
StanJ
2309a1c9cb removed TWI_CLOCK_STRETCH_MULTIPLIER (#6867) 2019-12-03 14:45:58 -03:00
Earle F. Philhower, III
074a8016bf
Remove user_interface.h from gdbstub includes (#6862)
* Remove user_interface.h from gdbstub includes

Avoid a warning by not including the unneeded "user_interface.h" from
gdbstub.c.  Leftover from original stub code from the SDK, this include
is unnecessary in the Arduino core.

* Add example to ensure gdbstub compiles in CI

Ensure the same user_interface warning doesn't occur in the future by
adding the example shown in the GDB docs to the CI build process.
2019-12-01 15:39:08 -07:00
StanJ
cc6d346aa5 added clock stretch yield, [issue 2162] fixed twi::status (#6860) 2019-12-01 01:21:54 -03:00
Dirk O. Kaar
22b2687a25 Conflict with pre-included Arduino.h (the indirect includes thereof) (#6853)
* Conflict with pre-included Arduino.h (the indirect includes thereof) resolved.

* Include both time.h and sys/time.h
2019-11-28 15:31:57 -03:00
david gauchard
40f5a99d03 back to 2.7.0-dev (#6850) 2019-11-27 23:54:24 -03:00
david gauchard
bc204a9bfa
release 2.6.2 (#6849) 2.6.2 2019-11-28 01:38:43 +01:00
Dirk O. Kaar
c37903c33b Uninitialized stack object can have unintended bad values (#6846) 2019-11-27 20:27:52 -03:00
Dirk O. Kaar
ec7ae4ed44 Using clockCyclesPerMicrosecond() in host build fails (#6844)
* At least the F_CPU define in host mock.h is needed by host Arduino.h - need to include Arduino.h further down in mock.h for this to work.

* Geting the include order right
2019-11-27 13:29:15 -03:00
Dirk O. Kaar
7ab1f615ac F_CPU is available and is 80000000 (#6841) 2019-11-26 10:32:13 -07:00
Earle F. Philhower, III
56fe2bfe73
[BREAKING] Update FS plugin info for python3 compat (#6807)
The FS uploader plugins need to be updated to use python3 and not
python, or they will fail on Windows (or Linux boxes without an
installed python2 interpreter).

Update the documents to point to the new versions.
2019-11-26 08:43:18 -07:00
Develo
32792483cc Fix pointer arithmetic (#6830)
Actually advance position while looping
2019-11-24 11:42:17 +01:00
Earle F. Philhower, III
8f6e0dd339 Allow for POSTs larger than a few 100 bytes (#6800)
This is all @dirkx , whose PR unfortunately got borked when we were
trying to update it to the new format.  As @dirkx said:

When sending POST responses of well over a K - _write() may not sent it
all. Make sure we do -- but cap the individual writes - as somehow large
2-3k blobs seem to cause instability (on my 12F units).

Supercedes #2528
2019-11-24 01:53:29 -03:00
david gauchard
05d28bc045 reset artificial timezone when using newlib (#6828) 2019-11-24 00:19:16 -03:00
david gauchard
8b3b60056a
switch to firmware 2.2.x-190703 by default (#6826) 2019-11-24 01:00:18 +01:00
david gauchard
8ec93dcd26 use wificlient.available() where relevant (#6827) 2019-11-23 20:12:37 -03:00
Dirk O. Kaar
a35edca07a EspSoftwareSerial: ctor/begin() compatibility to AVR/ESP8266/ESP32 (#6814)
* EspSoftwareSerial: ctor/begin() compatibility to AVR/ESP8266/ESP32 HW release 6.2.0

* Release 6.2.1: In loopback example, explicit pin settings and for ESP32, realistic max. bps for single stop bit config.

* Loopback example can exploit new invert API in HardwareSerial

* EspSoftwareSerial 6.3.0
2019-11-22 14:26:00 -03:00
Mike Nix
5b500e4e34 Move eboot_command_clear to after firmware copy. (#6823)
The eboot command was cleared from the rtc mem before the firmware copy
making it possible for a power failure during an OTA update to brick the
esp until the firmware was loaded via USB because of a partial firmware
copy that would never be restarted.

Moving the eboot_command_clear to after the copy ensures that any partial
copy is restarted at next power on.
2019-11-21 22:37:12 -03:00
Earle F. Philhower, III
ebae47c13a
Expand BSSL stack (#6819)
Fixes #6811 which found an issue where connecting to scripts.google.com
would *occasionally* cause a crash.  On inspection, it was found that up
to 5828 bytes of stack were used once in a while, so expand the stack to
5900 bytes to cover this case plus a little extra.
2019-11-20 18:05:38 -07:00
Dirk O. Kaar
007e495e0d Implement invert for HardwareSerial (#6816)
* Simple i/f to turn on inverted logic on UART0.

* Refactor invert from HardwareSerial to uart

* Final refactoring of invert bits into config bitmap.

* Overload instead of default arg for subclassing.

* Prevent unwanted effects if setting invert on other than UART0 - only that has these flags defined and documented.
2019-11-20 09:17:42 -07:00
Earle F. Philhower, III
b478429fe4
Change Sphinx version to latest (#6817)
Was locked at an older one which no longer works due to an issue a while
ago, but that may no longer be needed.
2019-11-20 08:36:04 -07:00
Dirk O. Kaar
916eb89b07 Mark esp_schedule IRAM_ATTR to make it ISR safe - this complements the suspend CONT via esp_yield pattern in esp_delay for early returning from delay due to external events. In libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp this is done from CBs, that are called from tools/sdk/lwip/include/lwip/dns.h (#6809) 2019-11-20 00:50:40 -03:00
Adrian Scillato
6533be353f Version bump for package.json (#6784) 2019-11-20 00:08:36 -03:00
Earle F. Philhower, III
800794de37 Add callbacks for ESP8266HTTPUpdate (#6796)
Replaces abandoned #1817 and #2694

Add optional std::function callback (so it supports lambdas and normal
functions) via ::onStart, ::onEnd, ::onProgress, and ::onError methods.

Update example with their use.

From @baruch's original pull request:
The callback is called when the upgrade actually starts rather than just
the initial query so that the user can know that it will not take longer
and can also prepare for the upgrade by shutting down other works.

From @karlp's original pull request:
Incomplete: I've not updated any documentation yet. If this style looks
good, I'll happily go and update the documentation (likewise for the
examples)
2019-11-19 16:15:57 -03:00
Earle F. Philhower, III
36f903443b Add const char* content to ESP8266WebServer::send() (#6797)
* Add const char* content to ESP8266WebSerer::send()

Supercedes #3492

Allow sending raw binary data or strings directly without conversion to
a String to reduce memory overhead when possible.

From original @timw1971 PR #3492
Added public functions to allow content to be uploaded using const
char*. For some cases, this can remove the need for content to be copied
into a String, and thus can be considerably more space-efficient.

* Fix example formatting

* Make GIF example use static const array

* Make the example really need to use const char*

Make the generated GIF dynamic in the example and move the original to
PROGMEM (since that's where const arrays like this belong).
2019-11-19 14:46:30 -03:00
Earle F. Philhower, III
919c753563 Terminate the chunked printDirectory (#6808)
Fixes #2481

Send a 0-len chunk when the directory is completed (in a chunked HTTP
transfer) to terminate the HTTP transfer properly.
2019-11-19 10:32:39 +01:00
Dirk O. Kaar
cb6b30a47d Weak binding lessens version dependency between ESP8266 and MT library CoopTask. (#6790) 2019-11-19 04:43:28 -03:00
Earle F. Philhower, III
6768116b8c Only add "l" to XX.htm URLs if XX.html exists (#6794)
Fixes #6792

Only append the "l" to ".htm" when there actually is a ".html" file
present.  If not, fall-thru like before and try .gz through the normal
paths.
2019-11-19 02:43:47 -03:00
Earle F. Philhower, III
344c4492af [SSDP] add schema(Print &) const (#6798)
* [SSDP] add `schema(Print &) const`

Supercedes #2806

Make SSDP::schema(WiFiClient&) use a by-ref (reduce stack use)

Add a SSDP::schema(Print&)

From @Palatis' original PR:
useful when using AsyncWebServer.

* Use ip.toString, only export Print& schema interface

Because WiFiClient inherits a Print interface, replace the
::schema(WiFiClient&) with ::schema(Print&) which is source compatible
with existing code and allows the functionality requested in the initial
PR.

Use ip.toString() in the templates instead of breaking up the octets of
the address.

* Fix compile errors and backwards compatibility
2019-11-19 02:02:54 -03:00
Develo
9b96f53778
Fix typo in mode timeout loop (#6801)
Fix typo to make timeout 1s instead if 1ms, as originally intended.
2019-11-19 01:27:10 -03:00
liebman
bbfe2c2035 remove clear() before beginInternal() so _location is not cleared before its passed to beginInternal() (#6786) 2019-11-18 16:41:24 -03:00
Earle F. Philhower, III
b71872ccca
Add stdint, move headers up in core_features.h (#6793)
Fixes #6791 which I think only happened when the file was included from
a .C file (due to the headers being included only ifdef __cplusplus).
2019-11-17 20:26:03 -07:00
Earle F. Philhower, III
dabf4c53d4 Make upload.py compatible with existing FS upload (#6788)
* Make upload.py compatible with existing FS upload

PR #6765 introduced an incompatibility with the existing Java uploaders
for SPIFFS and LittleFS,  breaking them because of the upload.py
parameter format change to support single stage erase/upload.

Add in patch to silently eat the single --end and to parse the write
address and filename properly as generated by calls from the plugins,
while retaining compatibility with the current IDE changes.

* Clean upload.py, make platform use write_flash

Make upload.py more concise and pythonic.

Use the "write_flash" argument in platform.txt for uploads instead of
assuming anything that is a file is the bin to upload.
2019-11-17 19:05:43 -03:00
Earle F. Philhower, III
01e9d948c7
Update SdFat to not undefine F() macro (#6787)
Fixes #6767 .  Remove the `undef F` from SysCall.h as it is not needed
nor used in the SD or SDFS libraries.  This puts F() strings back in
flash when using the SD/SDFS libs.
2019-11-16 15:50:02 -07:00
david gauchard
25f74bb52e release process: updates about Travis CI (#6785) 2019-11-15 13:55:04 -08:00
Dirk O. Kaar
240ae5ef26 Add/unify comments for target and source sites of async scheduling via delay()/esp_yield()/esp_schedule() (#6780) 2019-11-15 14:53:43 +01:00
André Futter
05454df164 Root page should be of type text/html (#6776)
In order to be displayed properly by a browser the HTML should be returned as text/html.
2019-11-15 00:29:31 +01:00
Mehdi Beyk Mohamadi
95c740705e Add missing "LittleFS.begin()" in LittleFS_Timestamp example. (#6762)
* Add missing "LittleFS.begin()"

Add missing first LittleFS.begin() call.

* Update LittleFS_Timestamp.ino
2019-11-14 18:25:56 -03:00
david gauchard
48ea3a3e9e
Update platform to 2.7.0-dev, bump Readme to 2.6.1 (#6774) 2019-11-14 17:36:32 +01:00
Dirk O. Kaar
482516e393 Minimize header use, move Ticker function definitions into cpp file (#6496)
* Backport from ESP32

* Use new library layout (.../src)

* Cleanup test case.

* C++ style cast required.

* Whitespace

* Inlining via header has better baseline ROM footprint.

* Reordered functions for better code-compare to master

* Reduces ROM footprint some more.

* Avoid unnecessary parameter passing - refactoring, same generated footprint.

* Reformat example sources
2.6.1
2019-11-14 10:02:32 -03:00
david gauchard
af85bd2efc
release process for 2.6.1 (#6773) 2019-11-14 10:24:22 +01:00
david gauchard
b52c52791a a single esptool command for erasing and flashing (#6765)
* esptool: a single command for erasing and flashing
(and update to esptool-2.8)

* fixes per review
2019-11-14 02:46:20 -03:00
Dirk O. Kaar
6f3c57b7fa Fix issue with functions scheduled from scheduled functions (#6770)
Calling schedule_function() from a scheduled function would result in an infinite loop, because the list traversal would never end.
2019-11-14 00:56:18 -03:00