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

3349 Commits

Author SHA1 Message Date
Earle F. Philhower, III
c08ef514f6
Silently eat \rs in PEM decoder in BearSSL (#5598)
There is a bug in the BearSSL PEM decoder when Windows EOLs (\r\n) are
passed in.  Avoid the issue by silenly discarding \rs as they are read
from the PEM source in the C code, to keep my sanity by avoiding reworking
the pseudo-Forth parser code.

Fixes #5591
2019-01-07 09:24:38 -08:00
Earle F. Philhower, III
7c2e071351
Add Linux i686 (32bit) architecture toolchain (#5586)
Fixes #5585
2019-01-05 12:20:57 -08:00
Earle F. Philhower, III
1f13c73ced
Speed up CI builds with caching hacks (#5539) 2019-01-05 10:53:39 -08:00
SimonWilkinson
eaac1e8b24 Rework DNSServer to be more robust (#5573)
* DNSServer: Handle examplewww.com correctly

Just replacing 'www.' with the empty string when we assign the
domainname will remove all occurrences of 'www.', not just those
at the start of the string.

Change this to a startsWith check so that only "www." at the
beginning of the string is removed.

* DNSServer: Rework request handling

Rewrite the request handling in the DNSServer code to address the
following issues:

Compatibility with EDNS #1:

   RFC6891 says that
     "Responders that choose not to implement the protocol
      extensions defined in this document MUST respond with a
      return code (RCODE) of FORMERR to messages containing an
      OPT record in the additional section and MUST NOT include an
      OPT record in the response"

   If we have any additional records in the request, then we need
   to return a FORMERR, and not whatever custom error code the user
   may have set.

Compatibility with EDNS #2:

   If we're returning an error, we need to explicitly zero all of
   the record counters. In the existing code, if there is an
   additional record present in the request, we return an ARCOUNT
   of 1 in the response, despite including no additional records
   in the payload.

Don't answer non-A requests

   If we receive an AAAA request (or any other non-A record)
   requests, we shouldn't respond to it with an A record.

Don't answer non-IN requests

   If we receive a request for a non-IN type, don't answer it
   (it's unlikely that we'd see this in the real world)

Don't read off the end of malformed packets

   If a packet claims to have a query, but then doesn't include
   one, or includes a query with malformed labels, don't read off
   the end of the allocated data structure.

* DNSServer: Clarify and tidy writing the answer record

Modify the code used to write the answer record back to the server
so that it is clearer that we are writing network byte order
16-bit quantities, and to clarify what's happening with the pointer
used at the start of the answer.
2019-01-05 12:47:00 -03:00
Develo
2f0f49dbe8
Update README.md (#5581)
Add specific instructions for breaking changes.
Fix some formatting.
2019-01-03 22:44:54 -03:00
david gauchard
b26c19e82e lwip2 fixes: turn off random delay before sntp request (#5567)
+update dhcp6 patch: update ip_addr_set_zero_ip6 to use IP_SET_TYPE_VAL, avoiding compilation warning
2018-12-29 18:40:39 -03:00
hreintke
62b8ac6be7 Fix LeamDNS examples (#5563)
* Fix LeamDNS examples

* Fix Style check error

* Another style fix
2018-12-29 00:00:16 -03:00
david gauchard
eb5d636f0d
use newlib api in new mDNS, fix host using mDNS (#5545) 2018-12-27 22:06:10 +01:00
david gauchard
cac22e3576
fix dhcp6 in upstream lwIP (#5560) 2018-12-27 19:29:04 +01:00
david gauchard
e3bc3c226b
Fixes for IPv6, added in CI (#5557) 2018-12-27 16:13:48 +01:00
Earle F. Philhower, III
9def8b0669
Move exceptions back out of IRAM (#5556)
PR #5538 made exceptions disabled by default and changed some file names
which didn't get updated in the linker file, resulting in exceptions ending up
back in IRAM.
2018-12-26 12:59:13 -08:00
david gauchard
da7ffdaa28
add 1 more IPAddress constructor for IPv6 (#5551) 2018-12-26 15:01:48 +01:00
Takayuki 'January June' Suwa
8049543e98 mDNS: Add support for String arg to begin() (#5542)
Analogous to commit dd6333ee8b26dd9cc82dea252ba150e85c0ebb11
2018-12-23 12:57:34 -03:00
dav1901
dd6333ee8b Add support for String args to softAP and begin (#5295) 2018-12-22 22:48:31 -03:00
david gauchard
228ad7ed75 tests/host: fixes and updates (#5537)
(LEAmDNS, broken pipe, non blocking accepted sockets, digitalRead)
2018-12-22 03:03:11 -03:00
Earle F. Philhower, III
2388102a97 Make exceptions off by default (#5538)
Scripts, makefiles, and users who do no changes will not have exceptions
enabled during builds.  This should avoid the sketch inflation issue for
users who are space constrained, while allowing users who care about
exceptions to enable them through the IDE.
2018-12-21 23:38:41 -03:00
david gauchard
95a5c5e60a let lwIP route packets, do not let SDK teaching how to do so (#5526) 2018-12-21 19:38:22 -03:00
Gijs Noorlander
4c04c63c2a Rewrite PUYA patch to be more universal and mem friendly. (#5504)
* [PUYA] Applied ESPeasy puya_v3.patch

Applied the patch to get the starting point as described in https://github.com/esp8266/Arduino/issues/5493

* [PUYA] Only allocate memory when PUYA detected

core 2.5.0 PUYA patch, no puya:

Description	Function	#calls	call/sec	min (ms)	Avg (ms)	max (ms)
Save File		4	0.25	34.755	45.264	67.620
Free Mem:	16168

core 2.5.0 PUYA patch, Faked Puya detect:

Description	Function	#calls	call/sec	min (ms)	Avg (ms)	max (ms)
Save File		2	0.04	41.332	57.544	73.756
Free Mem:	11560

* [PUYA] Check for PUYA chip as soon as possible at boot

Check for PUYA chip in call for `getFlashChipId()`
This will only be done once and the result of the get function is also cached.

* [PUYA] Use limited buffer (512 byte) allocated at first write

No need to allocate a buffer when not writing to flash.
The default buffer size is 512 bytes, which is 2 pages in the flash chip.

* [PUYA] Lower PUYA flash buffer to 1 page (256 B)

As discussed here: https://github.com/esp8266/Arduino/issues/5493#issuecomment-447543279

* [PUYA] Fix indents naming and return conditions

* [PUYA] Move Puya write code to spi_flash_write_puya

* [PUYA] Make spi_flash_write_puya static and define PUYA_SUPPORT

* [PUYA] Add some SPI flash vendor IDs

As requested by @igrr https://github.com/esp8266/Arduino/pull/5504#discussion_r242016184

* [PUYA] All suggested changes.

See: https://github.com/esp8266/Arduino/pull/5504#pullrequestreview-186145820
2018-12-19 00:59:25 -03:00
Max Prokhorov
d6c743027d Fix negative SPIFFS size (#5522) 2018-12-18 23:33:41 -03:00
lukasostendorf
3a36501d6d Fix: some clients were not able to authenticate using DIGEST_AUTH (#5506) 2018-12-18 14:52:14 -03:00
acevest
34e90f3c56 fix bug. in sta mode, empty passphrase should not use secure auth mode (#5516)
* in sta mode, empty passphrase should not use secure auth mode

* use nullptr, camelCase and parenthesis
2018-12-18 10:47:25 -03:00
Develo
3348ddf650
Update README.md (#5519)
clarify some points, add links, add doc/conf.py
2018-12-17 19:44:49 -03:00
Develo
574a121fa6
Update README.md (#5517)
Version bumps to beta2
2018-12-17 15:00:55 -03:00
Develo
c88953b742
platform.txt version back to 2.5.0-dev (#5510) 2018-12-17 00:44:24 -03:00
Develo
0fd86a07f0
Release 2.5.0-beta2 (#5505) 2.5.0-beta2 2018-12-16 10:57:44 -03:00
Earle F. Philhower, III
8e46a3371d
Increase free IRAM (#5499)
* Move functions out of IRAM when possible

umm_init() is called in OS startup after flash is enabled, and never
again.

cont_get_free_stack() shouldn't be called from IRQ.

Don't inline _iram_read_byte() function.

* Move system fault handler to flash, use new printf

The __wrap_system_restart call has been in flash for quite a while and
seems to be working fine.  There were some support routines that were
placed in IRAM (mistakenly thinking the wrap_restart caller was also in
IRAM) which are now moved to flash.

Clean up the printf code to use the new stdlib which handles PGM_P
strings as format and arguments without any difficulty.

* Make STR macro more unique

Add double-underscores to some string assistance macros to avoid
conflicts with user applications.

* Use function, not macro, to save code space

Save ~2KB final bin size by using a ets_printf_P function and not
an inline macro.  IRAM and HEAP unaffected.

* Don't actually touch the SP in the dump

Store a copy of the incoming stack pointer in the postmortem in order
to avoid actually changing the SP when a crash happend in BearSSL.

* Make C++ uncaught exceptions explicit

Use the term "Unhandled C++ exception" instead of just "Unhandled
exception" to make it clear such crashes are caused by a C++ throw
and now a system exception.
2018-12-15 10:14:30 -08:00
Earle F. Philhower, III
6324241e36
Update to toolchain 2.5.0-3 JSON (#5502) 2018-12-15 07:06:21 -08:00
david gauchard
e563cdb998
reduce git load in travis (#5490) 2018-12-15 10:44:54 +01:00
Ivan Grokhotkov
79553e539a ci: fix checking CI_GITHUB_API_KEY, refactoring (#5496)
* ci: fix checking for presence of CI_GITHUB_API_KEY

CI_GITHUB_API_KEY is always set when evaluating job include/exclude conditions, and it only gets removed when the job starts. Move the check into the script.

* ci: split build jobs into separate shell scripts
2018-12-15 02:58:30 +01:00
Peter
64f7147da3 Undo move of keywords.txt and readme.rst for ESP8266mDNS library (#5495)
The keywords.txt and readme.rst for the ESP8266mDNS library got caught up in the reorganisation of the library files.
2018-12-14 06:26:18 -08:00
Develo
e9d052c621
WIP - Update ArduinoOTA and examples with MDNS.update() calls (#5494)
* ArduinoOTA: allow use without MDNS, add MDNS.update() in handle()

* Update examples with MDNS.update() in loop

* Update CaptivePortalAdvanced.ino

Fix typo

* Update CaptivePortalAdvanced.ino

astyle

* Update Arduino_Wifi_AVRISP.ino

astyle
2018-12-14 03:29:32 -03:00
Earle F. Philhower, III
8ede8f1459
Move libstdc++-nox out of IRAM (#5492)
The new non-exception libstdc++ was not referenced in the linker script,
allowing it to end up in IRAM when not needed.  Add the line to match
and move it into IROM where it belongs.
2018-12-13 12:26:03 -08:00
Develo
a6df83be26
Update release instructions README.md (#5482)
* Update README.md

Fix json url typo
Clarify some points
Add readthedocs instructions
Rephrase
Incorporate feedback
Added Release model section
2018-12-13 13:18:24 -03:00
Earle F. Philhower, III
68f5a3d0d3 Keep signing commands in platform.txt on release (#5491)
* Keep signing commands in platform.txt on release

The boards packager was deleting what was at the time it was written
unused lines in fht platform.txt file before deploying to Arduino.
One of these lines is now needed for signing to work, so don't delete
it.

Also, explicitly call "python signing.py" because it looks like Arduino
is sanitizing/removing executable bits on files when extracting from
boards manager installations.

Fixes #5483

* Create the build subdir, if needed, for autosign

If the temporary build/core directory isn't available, make it in order
that Updater.cpp will see the generated signing header and not the one
in the main core.
2018-12-13 11:23:22 -03:00
Develo
20f07ecc31
Version bumps (#5479)
* bump platform.txt back to 2.5.0-dev

* bump README.md to 2.5.0-beta1
2018-12-12 00:42:46 -03:00
Ivan Grokhotkov
9c1e03a1f9 ci: use travis jobs to structure the CI flow
This mostly re-phrases the existing flow using the new language.

Ref. https://blog.travis-ci.com/2017-05-11-introducing-build-stages
2.5.0-beta1
2018-12-12 04:38:26 +08:00
Develo
47d6f83f5f Release 2.5.0-beta1 (#5470)
* Update platform.txt version to 2.5.0-beta1
2018-12-10 22:59:13 +01:00
Earle F. Philhower, III
8c7dc4a2ab
Update to latest BearSSL w/es22519 fix (#5468) 2018-12-10 07:36:58 -08:00
david gauchard
4c8d8f1e8a uart: BW improvements (#4620)
* uart fixes and BW improvements

* uart: read_char straightly use hw buffer

* +attributes for functions called by ISR

* uart: BW improvements
read_char straightly use hw buffer (+ ~10%bw)
read by block (+ ~190%bw) (instead of generic Stream::readBytes)
attributes for functions called by ISR
remove overrun message
remove some ISR flags which were not honoured

* fix merge

* fix buffer overflow

* serial stress test sketch

* astyle

* serial stress example: interactive keyboard, stop reading, overrun

* serial device test: bandwidth & overrun

* update + HardwareSerial::hasError()

* interactive overrun in example

* astyle

* Test using @plerup's SoftwareSerial as submodule (tag 3.4.1)

* update upstream ref (fix warning)

* host mock uart/read(buf,size)

* reset style changes in submodules before style diff

* update build_boards_manager_package.sh for submodules

* trigger CI (removing space)

* cannot reproduce locally the CI issue, setting bash -x option to get live trace

* remove previously added (in this PR) 'set -e' in package builder (passes local tests, not real CI)
script-comment new recipe.hooks.core.prebuild.3 (along with already commented .1 and .2)
moved CI package test to be first on the test list
remove 'set -x', wish me luck
2018-12-10 10:35:11 -03:00
Earle F. Philhower, III
8a8848829c Update to Newlib c0f3596 with regexp/fnmatch (#5457) 2018-12-09 15:36:22 -03:00
Develo
0f59c9478e
disable hard reset after flashing (reverts #5433) (#5460) 2018-12-09 02:57:48 -03:00
liebman
4373013bdd fix formatting (#5459) 2018-12-09 01:29:43 -03:00
Earle F. Philhower, III
7898ca7b46 Convert to standard PSTR/PROGMEM macros (#5458)
The bug referenced in the code that required a custom macro to enable
PSTR/PROGMEM compilation ( https://github.com/esp8266/Arduino/issues/3369 )
was fixed a while back and all PROGMEM references now live in their own
save .sections.

This patch simply is the output of `sed -i s/PSTR_LEA/PSTR/g *` and
`sed -i s/PROGMEM_LEA/PROGMEM/g *` on the codebase and the removal
of those defines.
2018-12-08 23:43:13 -03:00
liebman
0550ccd46b device test updates (#5455)
add test_ping
fix test_millis_mm
2018-12-08 21:22:29 -03:00
Develo
4d15590096
formalization of LEA's mdns rewrite (#5450)
* formalization of LEA's mdns rewrite (code), minor changes to polledTimeout

* fix typo

* Fix mdns examples
2018-12-08 19:36:20 -03:00
david gauchard
e4c6030e48 fix OTA (#5454)
https://github.com/esp8266/Arduino/issues/4283#issuecomment-445447030
2018-12-08 17:45:23 -03:00
dav1901
783f817c16 Add doc for ESP8266WebServer (#5400)
* Add doc for ESP8266WebServer

* Use tabs
2018-12-08 08:38:41 -08:00
liebman
38b6a3c13e use OrderedDict to force order of get params (#5414)
refactor to share request handler code in tests
2018-12-07 23:18:06 -03:00
david gauchard
0db6ec4ba8 lwip2: 3 sntp servers, autoip (169.254), esp-ping, espconn (#5444)
* lwip2: better handling of ipv4_addr/t type + 3 sntp servers

* bump lwip2 version

* Only with FEATURES=1: 3 sntp servers and AutoIP enabled (169.254 when dhcp server fails)

* Only with FEATURES=1: 3 sntp servers and AutoIP enabled (169.254 when dhcp server fails)

* local CI runner: select build type

* new ipv4_addr/t definition makes things easier for IPAddress

* update local CI runner

* lwip2 changes

* lwip2: port esp-ping and espconn
2018-12-07 21:24:38 -03:00
Earle F. Philhower, III
6d42a26cc2
Update BearSSL to latest toolchain (#5449)
Remove the -fno-jump-tables since the new toolchain places these tables
in ROM now.  Rebuild using the toolchain.  Saves 1-3KB of flash and
has 0 RAM impact plus may make certain bits marginally faster by using
a LUT instead of a if-else-else chain.
2018-12-07 10:02:42 -08:00