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

3224 Commits

Author SHA1 Message Date
Ivan Kravets
e5746c0f5a
Merge pull request #4399 from ivankravets/master
Drop PlatformIO lines from LD script; append object suffix to the end of target name // Resolve #4355
2018-02-20 15:01:57 +02:00
Ivan Kravets
f2fc590d51 Drop PlatformIO lines from LD script; append object suffix to the end of target name // Resolve #4355 2018-02-20 13:40:54 +02:00
Ivan Grokhotkov
ee5a1e2804 WiFiClient: don’t destroy ClientContext on ::stop
Reported in https://github.com/esp8266/Arduino/issues/4078.

WiFiClient::stopAll, called from a WiFi disconnected event handler,
could be called while WiFiClient::connect was in progress. This issue
was initially fixed in #4194, by testing `this` pointer for being
non-null in ClientContext::connect.

This change delegates deletion of ClientContext to WiFiClient
destructor. WiFiClient::stop only calls ClientContext::stop, which
closes/aborts the connection.
2018-02-20 03:33:55 +03:00
Ivan Grokhotkov
28d8a41219 ESP8266WiFi: zero-initialise scan_config structure
Fixes #4394
2018-02-20 03:33:03 +03:00
Ivan Kravets
0a000fef95
Merge pull request #4393 from esp8266/ivankravets-patch-2
Revert "Remove @PlatformIO library.json from GDBStub; fix pattern in LD"
2018-02-20 01:00:40 +02:00
Ivan Kravets
dcb67599b5
Revert "Remove @PlatformIO library.json from GDBStub; fix pattern in LD"
Reverts esp8266/Arduino#4363
2018-02-19 23:28:14 +02:00
Ivan Grokhotkov
f3f00ed64e gitignore: ignore generated files 2018-02-19 17:11:48 +03:00
Ivan Grokhotkov
73ae0bb824 sdk: add missing version.h file 2018-02-19 16:34:01 +03:00
Ivan Grokhotkov
a020e8941a boards.txt.py: normalize script name in generated output 2018-02-19 12:43:30 +03:00
Ivan Grokhotkov
a358bce0d9 boards.txt.py: fix extra newline at the end of JSON output 2018-02-19 12:43:30 +03:00
Ivan Grokhotkov
f0787e7106 boards.txt.py: fix trailing comma in generated JSON 2018-02-19 12:43:30 +03:00
Ivan Grokhotkov
aa37364e04 boards, package: update from boards.txt.py 2018-02-19 12:43:30 +03:00
Ivan Grokhotkov
0d17639bee ci: check that files generated by boards.txt.py are up to date
Files are re-generated in CI build, and git diff is used to check if
there have been any changes.
2018-02-19 12:43:30 +03:00
Ivan Grokhotkov
ce90037fca tools/boards.txt.py: make ldscript output same as the existing files 2018-02-19 12:43:30 +03:00
Ivan Grokhotkov
bc46db79c6 tools/boards.txt.py: remove tabs 2018-02-19 12:43:30 +03:00
Ivan Grokhotkov
429f40d321 sdk: update to 2.2.0
- update libraries and header files
- remove libmesh
- update PHY init data
2018-02-19 12:43:01 +03:00
Earle F. Philhower, III
f9ac524b13
Add -Werror to acceptance builds for C and CPP (#4369)
Use platform.local.txt to add -Werror to GCC for the build of all
code.  Any warnings on a submitted patch will cause an error.

Several examples and libraries had warnings/errors (missing returns
on functions, types, etc.).  Clean those up with this commit as well.
2018-02-17 18:47:10 -08:00
diogosalazar
ad42ab69c1 Fix typos (#4346)
Found a couple of typos in the Servo section
2018-02-17 00:28:36 -03:00
david gauchard
d0f220fb54 fix board common variant inclusion for deprecated BUILTIN_LED (#4366) 2018-02-16 22:40:25 -03:00
Develo
5328a8b91e
additional mimetable fixes, additional string moves to progmem (#4371) 2018-02-16 16:56:33 -03:00
Earle F. Philhower, III
bb90e12ea0
Fix double-free in ESP8266WebServer (#4365)
In issue #4350, @mongozmaki found that the web server was accessing a
deleted variable in the destructor.  Implement his suggested change
and move the close() before any freeing.  Could also have simply
NULL'd out the _currentHeaders member after freeing as well.

Fixes issue #4350
2018-02-14 07:50:26 -08:00
Ivan Kravets
11c83e1687
Merge pull request #4363 from ivankravets/master
Remove @PlatformIO library.json from GDBStub; fix pattern in LD
2018-02-14 13:30:48 +02:00
Ivan Kravets
eb58a31b89 Remove @PlatformIO library.json from GDBStub; fix pattern in LD // Resolve #4355 2018-02-14 00:23:12 +02:00
Earle F. Philhower, III
291bc6bca5
Wrap mimetype strings in FSPTR()s (#4338)
Mimetype is now in progmem, so any accesses to it need to be using FPSTR()
wrapped Strings.

Fixes #4329
2018-02-10 08:12:38 -08:00
Earle F. Philhower, III
bf5a0f24dc Fix mem leak in SSL server, allow for concurrent client and server connections w/o interference (#4305)
* Fix leak on multiple SSL server connections

Fixes #4302

The refcnt setup for the WiFiClientSecure's SSLContext and ClientContext
had issues in certain conditions, causing a massive memory leak on each
SSL server connection.  Depending on the state of the machine, after two or
three connections it would OOM and crash.

This patch replaces most of the refcnt operations with C++11 shared_ptr
operations, cleaning up the code substantially and removing the leakage.

Also fixes a race condition where ClientContext was free'd before the SSLContext
was stopped/shutdown.  When the SSLContext tried to do ssl_free, axtls would
attempt to send out the real SSL disconnect bits over the wire, however by
this time the ClientContext is invalid and it would fault.

* Separate client and server SSL_CTX, support both

Refactor to use a separate client SSL_CTX and server SSL_CTX.  This
allows for separate certificates to be installed on each, and means
that you can now have both a *single* client and a *single* server
running in parallel at the same time, as they'll have separate memory
areas.

Tested using mqtt_esp8266 SSL client with a client certificate and a
WebServerSecure with its own custom certificate and key in parallel.

* Add brackets around a couple if-else clauses
2018-02-08 15:25:24 -03:00
Develo
cda72a07e0
Changed TIM_DIV265 for deprecation (#4326) 2018-02-08 14:07:47 -03:00
Doanh Văn Lương
f6f977fb03 fix links for read the docs (#4293)
* fix links for read the docs

* fix typo

fix typo in link
2018-02-08 01:17:36 -03:00
Develo
bb5787a1cd
Fix mdns buffer overrun by 1 (#4317)
* fix mdns buffer overflow, minor indent/prettify
2018-02-07 14:39:27 -03:00
david gauchard
85fb3d9b44
boards: Wemos D1 R1 needs a separate defined identifier (#4304) 2018-02-07 15:36:26 +01:00
david gauchard
4caf4878c7 LED_BUILTIN should be a #define (#4276)
* LED_BUILTIN should be a #define
deduplicate and hide BUILTIN_LED as a deprecated constant

* test for LED_BUILTIN existence

* board:espino:variant: rename button macro (naming coherence)
2018-02-07 10:42:57 -03:00
david gauchard
b15102ad28 doc/faq: tcpCleanup (#4314) 2018-02-07 09:09:25 -03:00
Develo
bcbd5961c0
add begin(port) to esp8266webserver, move some strings to flash, some refactoring (#4148)
* add begin(port) to esp8266webserver, move some strings to flash, some refactoring

* Moved more strings to flash, unified some strings

* move mimetable strings into a standalone file

* more string moves to flash, remove duplicates, refactor of template method, minor styling

* Reverted moving small string to flash (no heap advantage, reduces bin size)
2018-02-07 00:30:07 -03:00
david gauchard
0339bbb11c lwip2: use only wifi_station_get_hostname() to set netif hostname (#4299)
* lwip2: use only wifi_station_get_hostname() to set netif hostname
fix #3970

* lwip2 comments on hostname
2018-02-06 23:23:27 -03:00
david gauchard
64885fd5cf
minor cosmetics (dead code, -Wallextra) (#4274) 2018-02-07 01:34:46 +01:00
Develo
83f6d83db0
Fix RTCmem example buffer access past end (#4288) 2018-02-06 20:54:03 -03:00
Develo
9694b3e688
Fix spiffs lseek typo for seek_end (#4287) 2018-02-06 19:59:16 -03:00
Earle F. Philhower, III
4c23e66bba
SSL server DEBUG, code cleanup fixes (#4280)
The server needs to load an X509 and RSA key, but instead of using
the existing loadObject() calls implemented its own.  Remove them and
use the standard ones instead.

The DEBUG_OUTPUT macro was undefined in the SSL Web server.  Add it
in do that when you compile with DEBUG=HTTP_SERVER it actually compiles.
2018-02-06 07:33:26 -08:00
Earle F. Philhower, III
c8dbfb160b Refrech api.github.com x509 certificate (#4306)
The certificate fingerprint included with the HTTPSRequest example seems
to be for an expired api.github.com certificate.  Replace with the current
one to avoid reporting "certificate mismatch" errors when running.
2018-02-06 11:06:05 -03:00
Ivan Kravets
c3bd91af28
Merge pull request #4294 from esp8266/ivankravets-patch-1
Update integration with @PlatformIO
2018-02-05 16:38:14 +02:00
Ivan Kravets
e3074e9575
Update integration with @PlatformIO 2018-02-05 12:53:02 +02:00
Earle F. Philhower, III
e38f19e008
Remove warnings when NDEBUG build option used (#4196)
When building using the new NDEBUG option recently added, the assert()
macro is defined to nothing. This leaves a few variables unused in the
WiFi stack causing compiler warnings. Add in empty casts to remove
these warnings. Does not affect actual assert use when NDEBUG is not
defined.
2018-02-04 20:59:31 -08:00
Doanh Văn Lương
4e115917ae fix dead link docs (#4221) 2018-02-05 00:57:58 -03:00
david gauchard
29c9ebea32
update lwip menu (#4286) 2018-02-03 22:02:29 +01:00
david gauchard
199fe0f16d
ClientContext:_write_some: release buffer once data really accepted for sending (#4265)
may fix #1872
2018-02-01 11:49:04 +01:00
Develo
9ba8f77678
Check that pins needed by Wire are defined at compile-time (#4261) 2018-01-30 14:59:47 -03:00
NameOfTheRose
4bafbe5514 WiFiTelnetToSerial Example - Minor Issues #2435 (#4255)
* WiFiTelnetToSerial Example - Minor Issues #2435

* WiFiTelnetToSerial Example - Minor Issues #2435

Patch to rectify issue #2435
2018-01-29 14:12:22 -03:00
NameOfTheRose
84228b1c73 Nameoftherose patch for Issue #2435 (#4256)
* WiFiTelnetToSerial Example - Minor Issues #2435

* WiFiTelnetToSerial Example - Minor Issues #2435

Patch to rectify issue #2435
2018-01-29 13:28:28 -03:00
devyte
8da1d78cb4 Change argument to Esp.deepSleep from uint32 to uint64 to match SDK, add deepSleepMax based on the cali_proc function per SDK 2018-01-28 19:12:12 +08:00
david gauchard
8b87491700
new board generator option: --nofloat (#4232) 2018-01-27 11:10:59 +01:00
Maurice Ribble
4e539b2618 Add a new resetmethod_menu_all macro (#4241)
* Add a new resetmethod_menu_extra macro to give the choice of all the reset options.  Then only offer all these options for the generic modules.
2018-01-27 02:04:22 +01:00