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

4405 Commits

Author SHA1 Message Date
dickorydock
ea17a06bc8 Grammar edits in documentation (#6401)
* Grammar changes

* Update readme.rst

* Update README.md
2019-08-08 20:26:19 -04:00
david gauchard
021a81fc46
esptool: 3M-baud serial upload speed (#6399) 2019-08-08 12:28:07 +02:00
teo1978
a8873c2364 fix documented parameter (#6392) 2019-08-07 14:16:07 +02:00
david gauchard
88f0410c4b
ensure consistency for gdb hooks signatures (#6391) 2019-08-07 11:18:45 +02:00
Majenko Technologies
2a7a3f5683 Uncouple uart from GDBStub library (#6390) 2019-08-07 09:51:37 +02:00
david gauchard
4e9358445a wstring: fix concatenation from flash (#6368)
fixes #6367
2019-08-05 08:16:49 -07:00
thangktran
f78ab66f89 libraries: fixed no "OK" ACK for Signed Update (#6351) 2019-08-01 14:00:49 +02:00
david gauchard
d6973cd63d enable puya support by default (can be disabled with -DPUYA_SUPPORT=0) (#6362) 2019-07-31 01:04:01 -04:00
Earle F. Philhower, III
235b02edee
Merge branch 'master' into wifi_mesh_update_2.2 2019-07-28 12:17:03 -07:00
Earle F. Philhower, III
19d09eae2b
Preserve prior bitrate for I2S begin (#6349)
Fixes #6066

Preserve any existing sample rate for the I2S unit when performing an
`i2s_begin`.  If nothing has ever been set, default to 44.1KHz as
before.
2019-07-28 12:16:31 -07:00
Earle F. Philhower, III
c6bfec900c
Add a FS::check() optional method (#6340)
* Add a FS::check() optional method

Fixes #2634

Expose any low-level filesystem check operations for users, and add
documentation on this and the gc() methods.

* Update doc w/more gc() info and link
2019-07-26 22:57:27 -07:00
Earle F. Philhower, III
d2fde8dee0
Fix trivial extra "\n" on web update success (#6350)
Fixes #3290
2019-07-26 16:34:22 -07:00
Earle F. Philhower, III
824a83347d
Update LittleFS/SdFat to current project head (#6345)
* Update LittleFS to current project head

Several bugfixes noted in the LittleFS added:

https://github.com/ARMmbed/littlefs/commits/master

* Also update SdFat to latest upstream head

Also adds a delay(0) every 5000 fat clusters examined to avoid WDT
errors on highly fragmented FAT filesystems.
2019-07-25 13:50:58 -07:00
Earle F. Philhower, III
76ed52c1b2 Update WiFiServer docs for ::write(all clients) (#6338)
Fixes #5116
Fixes #2743

The Arduino WiFiClient object allows sending the same packet to all
connected clients of a WiFiServer.  In their implementation it may make
sense, but on the 8266 with things like SSL it doesn't.

Update the docs to note that WiFiServer::write() is a no-op, and that
the app should use the WiFiCliebnt::write() on all connected clients as
appropriate.
2019-07-25 14:31:00 +02:00
Earle F. Philhower, III
aa0bc3372f Add plain char* signatures WebServer::sendContent (#6341)
Fixes #2567

Allow the web server to send plain C strings instead of requring they be
encapsulated inside a String class object.  Saves memory vs. having to
convert C strings to Strings (i.e. duplication of data), overloads on
the efficient sendContent_P(char*) methods.
2019-07-25 13:39:57 +02:00
Earle F. Philhower, III
34077c03f5 Allow use of LED16 for generic boards (#6343)
Generic boards can have their LEDs on pins 0...16 inclusive, so ensure
that the range we generate in boards.txt is inclusive.

Fixes #5817
2019-07-25 11:16:04 +02:00
david gauchard
aecf113850 host emulation: littlefs was not fully enabled (#6342) 2019-07-24 18:05:10 -07:00
Earle F. Philhower, III
17ee38074f Move to -std=g++11 from -std=c++11 (#6339)
Looking at other projects, they're all building using gnu extensions
(-std=gnu++11).  We're already embedding gnu-specific pragmas for
compile options, so I see no reason not to fall in line w/others on
this.

Fixes #4639
2019-07-25 02:18:51 +02:00
Earle F. Philhower, III
4e7f5afc54
Update to latest BearSSL (#6337)
Fix a buffer overflow error in private key decoding.

https://bearssl.org/gitweb/?p=BearSSL;a=commit;h=b715b43e411dc5d5949df6f75ef7bb65952db11c
2019-07-23 22:05:47 -07:00
thangktran
705dd39093 tools: fixed bug to select signed bin (#6334)
From platform.txt, the binary to be uploaded is hardcoded to *.bin file.
This is not the expected behaviour when Signed Update is used.
2019-07-23 17:10:16 -04:00
david gauchard
a64ef544d9
emulation on host: add missing strlcat strlcpy (#6327) 2019-07-23 11:13:50 +02:00
Earle F. Philhower, III
82a1382864 Don't throw exceptions from operator new by default (#6312)
Default mode (no exceptions) will no longer use the stdc++ library new
allocator when there is not enough memory.  Instead, it will return
nullptr.  This is the pre-exceptions-available behavior (2.5.0 and
earlier).

When exceptions are enabled, use the real new and throw exceptions that
can be caught at higher levels, or which will crash the app with an
uncaught exception if they're not handled.

Update to #6309
2019-07-23 10:18:52 +02:00
Earle F. Philhower, III
5d5cd1d426
Clear updater state on any error (#6325)
Fixes #2090

The Updater checks that an update isn't already in progress on ::begin,
but when an error happens in the middle of an upload it's impossible to
actually reset this flag w/o a reboot.

Reset the state members (esp. _size) on any error condition so
that you can restart the transfer with a new ::begin.  Any error
condition is fatal, anyway, so there is no reason not to clear the
current state at that point.
2019-07-21 16:21:35 -07:00
Earle F. Philhower, III
93ef2e29af
Add using fs::SPIFFSConfig to FS.h (#6324)
The SPIFFS config object was defined in FS.h in its own namespace, but
is not made easily available like other SPIFFS and FS objects because of
a missing `using` statement.  Add it in FS.h

Fixes #6322
2019-07-21 13:40:21 -07:00
Earle F. Philhower, III
ac25f3276f
Upgrade to 2.5.0-4 toolchain w/improved pgm_read_x, C++ exceptions (#6273)
* Upgrade to 2.5.0-4 toolchain w/improved pgm_read_x

Rebuild the entire toolchain (including standard libraries) with the
latest pgm_read_xxx headers included (which fix unaligned dword reads
from progmem and run faster/smaller, and a pgm_read_byte change which
removes an instruction on each read saving flash).

Pull in latest bearssl while we're at it, too, which speeds up EC
handshakes and reduced ROM usage, too.

* Fix C++ exceptions

Exception code now only does 32b aligned reads from progmem to access
the eh_table (some via -mforce-l32, some via hand-inserted pgm_read_x
macros).

Fixes #6151
Fixes #6305
Fixes #6198
2019-07-21 10:46:29 -07:00
david gauchard
5cb82c1610
webserver: restore legacy request handler (#6321) 2019-07-20 08:29:02 +02:00
Dirk O. Kaar
d9684351c2 Make delay() as overridable as yield() already is, and add overridable loop_end() (#6306)
* Make delay() overridable "weak"

* Add pluggable loop_end()

* Release tag 5.2.3 for SoftwareSerial
2019-07-18 14:40:58 -07:00
CzBiX
2130f3ee8c Fix typo in doc (#6313) 2019-07-18 10:11:43 -07:00
Earle F. Philhower, III
29bedfa842
Clean tools key of obsolete version on next release (#6258)
Fixes #6068

Drop from the tools key all version:"1.20.0-26-gb404fb9" entries (which
were pre-2.0.0 and whose entry in platform versions was deleted on last
release).
2019-07-15 20:45:29 -07:00
david gauchard
3cc64f7877 Fix raise_exception() (#6288)
* workaround when an exceptin occurs while in an ISR

* tuning for gdb

* remove dead code and rename defines/variables

* per reviews: naming, handle "unhandled return" case

* fix reset message
2019-07-15 15:34:45 -07:00
ruggi99
1c68d02924 Create empty method for String class (#6293)
* Created empty method

* Changed method name from "empty" to "isEmpty". Created a new method to empty a string

* Changed method name from "empty" to "clear".
2019-07-15 10:52:05 -04:00
Earle F. Philhower, III
52f8c62b81
Fix GCC 9.1 warnings (except Ticker.h, gdbstub) (#6298)
Cleans up all warnings seen w/GCC 9.1 to allow it to track the main
branch more easily until 3.x.

Does not include Ticker.h "fix" of pragmas around a function cast we're
doing that GCC9 doesn't like, that will be addressed separately and
maybe only in the 3.0 branch.

Does not include GDB hook fix, either, because the pragmas required
to disable the GCC9.1 warnings don't exist in 4.8 at all.
2019-07-14 21:22:49 -07:00
Earle F. Philhower, III
c18b402c31
Add a dump of received FP and CERT when in debug mode (#6300)
* Add a dump of received FP and CERT when in debug mode

To simplify BearSSL debugging, print the received FP (when it doesn't
match the expected) and the binary certificate (always), when in debug
mode.

* Add documentation section on FP mismatch in rare instances.
2019-07-14 14:09:44 -07:00
M Hightower
38d8b6efde Added memory fence to xt_rsil() (#6301)
Without this the compiler may use memory references loaded to registers before the fence, in computation within the fence. These values could have changed before xt_rsil()
(critical section start) was called.
Note: this is needed to stop the compiler from reordering instructions at the critical section boundary.
2019-07-14 15:36:39 -04:00
Earle F. Philhower, III
147fada3f5
Minor doc update, "How to make a PR" link (#6297) 2019-07-14 04:25:57 -07:00
david gauchard
cd6cf984ec
esptool.py: disable 9600bauds in menu for flash upload serial speed (#6292)
* emulation on host: disable coverage when not in CI
* disable 9600bauds for flash upload serial speed (esptool.py won't work)
2019-07-13 23:10:20 +02:00
Chris van Marle
8b5433977e Prepare signing before sketch is compiled (#6287)
* Prepare signing before sketch is compiled

This makes the right value available in ARDUINO_SIGNING in the sketch.

* Remove unnecessary .1s and fix packager script
2019-07-12 14:52:51 -07:00
Earle F. Philhower, III
8c37601614 Fix Ticker callback casting. (#6282)
Fixes errors seen in #6281 and adds a slight test case to the examples
to ensure no compiler errors.
2019-07-10 23:15:10 -04:00
Earle F. Philhower, III
7c6701512f
Clean up remaining non-LeaMDNS diffs from gcc4.8 to gcc7.2 (#6279)
With this change plus the leamdns change, the core will compile
unmodified on GCC 4.8 and GCC 7.2, making keeping the two in sync for
3.0 much easier.
2019-07-10 13:52:38 -07:00
Dirk O. Kaar
48ace77b48 Refactored to avoid compiler warning (#6278)
Fixes commit 2d9253e46c41ef6949759ec028a356917d289831.
2019-07-10 10:47:01 -07:00
Anders
d20177ae35 - Add new ESP-NOW mesh backend.
- Add HelloEspnow.ino example to demonstrate the ESP-NOW mesh backend features.

- Deprecate the ESP8266WiFiMesh class in favour of the new ESP-NOW and TCP/IP backends.

- Update the TCP/IP mesh backend to use the new lwIP version preprocessor flag and remove obsolete preprocessor flags.
2019-07-10 02:29:01 +02:00
david gauchard
1b3ac4f5e9
Switch default FW to "2.2.2-dev(38a443e)" (menu:2.2.1+100) (#6272)
* enable by default latest 2.2.x firmware, including fixed espnow
* LittleFS: avoid crash when FS size is 0
* flash size defaults: 1M for generic board, not empty FS for all
2019-07-09 20:18:55 +02:00
Earle F. Philhower, III
828857d0e0 Make SPIFFS be an integer number of blocks (#5989)
* Make SPIFFS be an integer number of blocks

boards.txt.py simply calculated the end and start using flash sizes, but
in cases where an 8K page was used (>512KB SPIFFS), this could leave a
4K half-block left at the end of SPIFFS.

mkspiffs and the SPIFFS code uses integer division to calculate the
maximum block number, so it worked fine in practice and the code simply
ignored the extra, fractional block.

Now actually take block size into account when calculating the end of
SPIFFS, ensuring no fractional blocks are passed in.  Does not result in
data loss on pre-existing SPIFFS filesystems.

* Fix the 1m512 case and clean up code

Ensure that no SPIFFS_block in the LD files is modified from the
original to endure correct backwards compatibility

* Factor out common if, clean code

* Make boards.py vars "fs_xx" instead of "spiffs_xx"
2019-07-09 10:24:25 +02:00
nouser2013
adf2b14a6a Add support for newer mobile OS changes. (#5529)
* Add support for newer mobile OS changes.

Took me quite a while to figure this out, but according to this issue (https://github.com/espressif/arduino-esp32/issues/1037), in order to get a captive notification to show or the popup to open, the DNS server must resolve to a public IP. It will not work with a pivate one (e.g. 192.168.4.1).

On Android, a notification ("Register with Network") is displayed in top left notification bar.
On IOS, the login popup is displayed.

* Add support for newer mobile OS changes.

Took me quite a while to figure this out, but according to this issue (espressif/arduino-esp32#1037), in order to get a captive notification to show or the popup to open, the DNS server must resolve to a public IP. It will not work with a pivate one (e.g. 192.168.4.1).

On Android, a notification ("Register with Network") is displayed in top left notification bar.
On IOS, the login popup is displayed.
2019-07-08 16:12:28 +02:00
Earle F. Philhower, III
d2a487dfd9 Clean up code to build under GCC7, fix pgm_read_unaligned (#6270)
Apply most compatible changes needed to get the core compiling under GCC
7.2 to the main gcc 4.8 tree to ease porting for 3.0.0.

Update pgmspace.h with corrected and optimized unaligned pgm_read
macros.  Now pgm_read_dword in the unaligned case gives proper results
even if optimization is enabled and is also written in assembly and only
1 instruction longer than the pgm_read_byte macro (which also has been
optimized to reduce 1 instruction).  These changes should marginally
shrink code and speed up flash reads accordingly.

The toolchain should/will be rebuilt at a later time with this
optimization to ensure it's used in the libc.a/etc. files.
2019-07-08 10:17:48 +02:00
Earle F. Philhower, III
76cda9bdbc
Update axtls libs with fix for #6260 (#6262)
Fixes #6260.  AXTLS' x509 decode had a uncaught byte access to PROGMEM.
2019-07-06 07:59:25 -07:00
david gauchard
3f0f2143f8
fix bug in storing UDP remote address (#6263) 2019-07-06 12:30:40 +02:00
Earle F. Philhower, III
6bd4b1c4f7
Clean up trivial gcc -wextra warnings (#6254)
After verifying that they really were spurious, clean up the warnings
that gcc -wextra reports, except for LeaMDNS.

Upgrade GCC to gcc-7 for host builds
2019-07-05 22:31:50 -07:00
mayankgour13
8b1af68e3f Infinite loop while passing File(FS.h) resolved (#5038)
Stream.available() never reaches to -1 which makes it an infinite loop. When File (FS.h) goes empty it reaches to 0 not -1.
2019-07-05 09:02:01 -04:00
M Hightower
ad2b51e36f Do not call yield() from timedRead() or timedPeek() when _timeout is set to 0. (#6242) 2019-07-05 13:36:46 +02:00