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

174 Commits

Author SHA1 Message Date
Earle F. Philhower, III
5137d4da11
Update to BearSSL 0.6+ release, add AES_CCM modes (#5164)
Pull in latest BearSSL head (0.6 + minor additions) release and add AES_CCM
modes to the encryption options. Enable the aes_ccm initialization in client/server

The EC mul20 and square20 code was identical in two different files,
but because these copies were static, we ended up with an extra 6k of
duplicated code. Updated BearSSL to make them shared, saving 6KB.
2018-09-27 20:30:19 -07:00
Earle F. Philhower, III
38779149d0 Move ICACHE_* to unique sections, local LD script (#5150)
* Move ICACHE_* to unique sections, local LD script

Similar to PROGMEM changes, make the name of each ICACHE_* variable/fuction
unique to avoid issues with section conflicts.

Also rename the generated LD linker script to avoid issue with older copies
of the eagle.app.v6.common.ld which were generated by the build process
in a global directory before being moved to the {build.path}.  The linker
would use the older, generated *.ld file instead of the generated one, which
would lead to runtime failures on some systems and cause the VTABLE location
to not correspond to the IDE menu selection.

Fixes #5115, and is an update to #5117 and #5116.

* Update boards.txt.py and platform.io build
2018-09-21 15:33:54 -03:00
Earle F. Philhower, III
aa8c53537a
Undo 5117 changes to ICACHE macros (#5130)
With the changes in PR #5117, blink and other examples compile but the 8266
gets stuck in a reset loop.  Undo the changes from that commit until we can
figure out the root cause and fix it.
2018-09-12 08:56:15 -07:00
Ivan Grokhotkov
8f438b18db Update axTLS to e634adf (#5125) 2018-09-12 07:49:42 -07:00
Takayuki 'January June' Suwa
622569cde2 Make unique sections for ICACHE_* variables (#5117)
Similar to PROGMEM changes, make the name of each ICACHE_* variable/fuction
unique to avoid issues with section conflicts.

Fixes #5115
2018-09-11 14:38:37 -03:00
david gauchard
cee458a68e
restore SPIFFS symbols when null-sized (#5122)
fix comments
fix cc0bfa04d4 (commitcomment-30462616)
2018-09-11 14:25:05 +02:00
david gauchard
cc0bfa04d4
boards generator: updates (#5103)
boards generator updates:
* simplified mapping description: only flash and spiffs sizes are needed
* some ldscripts are renamed due to autogenerated names
* +2M/0, +2M/512K spiffs, +4M0
* reduce length of hidden strings in boards.txt (#5100, https://github.com/arduino/arduino-builder/issues/284)
* give more details in ldscripts (address, size,  +rf-cal, +sdk-wifi-settings)
2018-09-03 22:29:27 +02:00
david gauchard
85e68093e9
Automatic stack location selection (SYS or HEAP), enable per library AR-chive in arduino build system (#5018)
Automatic stack location selection (SYS or HEAP), enable per library AR-chive in arduino build system 

* enable dot_a_linkage on internal libraries
* add device tests
* boards generator: deprecate --noextra4k/--allowWPS and fix documentation
2018-08-20 14:35:52 +02:00
Ivan Grokhotkov
9f67d83907
build: place generated ld script into build directory (#5043)
arduino-builder 1.3.25 (shipped with Arduino 1.8.5) forces full
recompilation when any file in the core directory is modified. Avoid
full recompilation by placing generated ld script into build
directory, not source directory.

Also fix an issue where git version description would not be generated
if there were spaces in build path.
2018-08-20 17:17:49 +08:00
Earle F. Philhower, III
00c35be985
Update to latest BearSSL library version, fixes #4898 (#4900)
* Update to latest BearSSL library version, fixes #4898

* Actually install the updated BearSSL lib/headers
2018-07-09 06:05:40 -07:00
david gauchard
e486887f18
optionally allow WPS (#4889) 2018-07-06 16:45:25 +02:00
david gauchard
672c3f8d79
boards updates: nodemcu doc update (@lrmoreno007 #4715) + 512k32spiffs (@carlymx #4871) (#4880)
* boards updates: nodemcu doc update (@lrmoreno007 #4715) + 512k32spiffs (@carlymx #4871)

* sometimes -> usually
2018-07-03 22:14:06 +02:00
david gauchard
7dd2ca355c
scripts for comparing core closed libs against esp-nonos-sdk ones (#4855) 2018-07-03 11:45:22 +02:00
david gauchard
74819a763b
lwip2: fix disconnection, fix reconnection (#4851) 2018-06-27 10:47:17 +02:00
david gauchard
1a9403df1b
lwip2 fix and update (#4729)
* interactive example: update with option for using DHCP again after using static IP
* lwip2: avoid crash when IP address is set to 0(any) by dhcp not getting its lease renewal in due time
* lwip2: automatically remove oldest PCBs in time-wait state, limit their number
  thanks to @me-no-dev 07f4d4c241 (diff-f8258e71e25fb9985ca3799e3d8b88ecR399)
* faq: update about tcpCleanup()
* lwip2: add a macro HAS_PHY_CAPTURE=1 indicating capture facility is available
2018-05-25 17:24:00 +02:00
Earle F. Philhower, III
5a033835e1
Add a build directory for libbearssl.a (#4736)
Simple git submodule and makefile for building the bearssl library
from source in the Arduino tree.
2018-05-23 19:50:26 -07:00
Earle F. Philhower, III
e3c970210f
Add BearSSL client and server, support true bidir, lower memory, modern SSL (#4273)
BearSSL (https://www.bearssl.org) is a TLS(SSL) library written by
Thomas Pornin that is optimized for lower-memory embedded systems
like the ESP8266. It supports a wide variety of modern ciphers and
is unique in that it doesn't perform any memory allocations during
operation (which is the unfortunate bane of the current axTLS).

BearSSL is also absolutely focused on security and by default performs
all its security checks on x.509 certificates during the connection
phase (but if you want to be insecure and dangerous, that's possible
too).

While it does support unidirectional SSL buffers, like axTLS,
as implemented the ESP8266 wrappers only support bidirectional
buffers. These bidirectional buffers avoid deadlocks in protocols
which don't have well separated receive and transmit periods.

This patch adds several classes which allow connecting to TLS servers
using this library in almost the same way as axTLS:
BearSSL::WiFiClientSecure - WiFiClient that supports TLS
BearSSL::WiFiServerSecure - WiFiServer supporting TLS and client certs

It also introduces objects for PEM/DER encoded keys and certificates:
BearSSLX509List - x.509 Certificate (list) for general use
BearSSLPrivateKey - RSA or EC private key
BearSSLPublicKey - RSA or EC public key (i.e. from a public website)

Finally, it adds a Certificate Authority store object which lets
BearSSL access a set of trusted CA certificates on SPIFFS to allow it
to verify the identity of any remote site on the Internet, without
requiring RAM except for the single matching certificate.
CertStoreSPIFFSBearSSL - Certificate store utility

Client certificates are supported for the BearSSL::WiFiClientSecure, and
what's more the BearSSL::WiFiServerSecure can also *require* remote clients
to have a trusted certificate signed by a specific CA (or yourself with
self-signing CAs).

Maximum Fragment Length Negotiation probing and usage are supported, but
be aware that most sites on the Internet don't support it yet.  When
available, you can reduce the memory footprint of the SSL client or server
dramatically (i.e. down to 2-8KB vs. the ~22KB required for a full 16K
receive fragment and 512b send fragment).  You can also manually set a
smaller fragment size and guarantee at your protocol level all data will
fit within it.

Examples are included to show the usage of these new features.

axTLS has been moved to its own namespace, "axtls".  A default "using"
clause allows existing apps to run using axTLS without any changes.

The BearSSL::WiFi{client,server}Secure implements the axTLS
client/server API which lets many end user applications take advantage
of BearSSL with few or no changes.

The BearSSL static library used presently is stored at
https://github.com/earlephilhower/bearssl-esp8266 and can be built
using the standard ESP8266 toolchain.
2018-05-14 20:46:47 -07:00
david gauchard
76a14b1f63
lwip2: fix static address management (#4677)
+ interactive example (for debugging)
2018-05-02 01:20:55 +02:00
david gauchard
d582cab938 remove autogenerated eagle.app.v6.common.ld and git-ignore it (#4618) 2018-04-22 22:33:01 +03:00
Ivan Grokhotkov
5d5ea92a4d
Move continuation stack from .bss onto sys stack (#4622) 2018-04-18 11:19:49 +08:00
Earle F. Philhower, III
f2c7256539 Add flash for vtable destination, make it default, and add build menu to control options (#4582)
* Add flash for vtable destination, make it default

Add an option for placing vtables in flash to complement the existing
iram and heap options.  "make flash"

Now that there is a way to change it, move to vtables in flash as default
as only users with interrupts which use vtables require the vtable to
be in RAM.  For those users, if the tables are small enough they can put
them in IRAM and save heap space for their app.  If not, then the vtables
can be placed in HEAP which supports much larger tables.

* Add VTable menu, FLASH as default, remove Makefile

Convert from manual "make" operated app.ld creation to runtime creation
whose options are selected from the build menu.

Use a prelink recipe to create the output app.ld file each run, without
need for any special tools.

Update the boards.txt.py script to generate this new config.
2018-04-03 00:32:35 +02:00
david gauchard
f2187f50c7
ldscripts: a Makefile to change c++ vtables location (#4567) 2018-03-26 23:35:57 +02:00
Earle F. Philhower, III
855b03ce4d Fix exception handler, add assert, reduce RAM (#4187)
Move all exception strings to IRAM and out of both PMEM (illegal) and add
output of any assert() failinf conditions.

The exception handler may be called while the SPI interface is in a bad
state.  This means no PROGMEM reads are allowed, and all data and functions
used must be in system RAM or IRAM.

Add a new helper macro, ets_printf_P(), which places a constant string in
IRAM and copies it to the stack before calling the real ets_printf().
This makes the code simpler to read as no unwieldy combinations of
ets_putc/ets_printf/... are required to output anything.

The old handler also mistakenly used PSTR() strings in some places, so
fix those with this patch as well.

Gives back ~180 bytes of heap to every sketch built as the exception handler
is always included an application.
2018-03-18 08:53:08 +08:00
Shawn A
836c7da8cc adds getautoreconnect() (#4359) 2018-03-16 01:15:30 -03:00
fabianoms
3ce888e87b macro attributes should be used with brackets
related to the issue #2617.
2018-03-13 12:39:08 +08:00
david gauchard
c51c7b47ee
4m2m support in ldscripts (#4454)
* 4m2m support in ldscripts (fix boards generator for new ldscripts generation)
2018-03-13 00:35:16 +01:00
David Gauchard
e47a92a836 lwip2: improve netif flags management on git side 2018-03-07 22:47:04 +08:00
david gauchard
3df3246514 lwip2: bump tag before 2.4.1 2018-03-07 22:47:04 +08:00
David Gauchard
2335f18f5a lwip2: fix disconnection/reconnection issue
also:
improve version string
remove useless message
2018-03-07 22:47:04 +08:00
fabianoms
19eb6ea548 Fix small typo in documentation. (#4440) 2018-02-28 15:41:15 -03:00
Ivan Grokhotkov
cd6cd85fca sdk: add a script for library update
Moves instructions from Readme file into a script
2018-02-22 14:11:43 +03:00
Ivan Grokhotkov
c885542f05 sdk: update to v2.2.0-3-gf8f27ce
- Fixes WiFi not being able to reconnect after SDK update (#4398)
- Fixes increased current in light sleep mode
- Fixes return value documentation for wifi_{get,set}_country
2018-02-22 14:11:43 +03: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
73ae0bb824 sdk: add missing version.h file 2018-02-19 16:34:01 +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
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
Ivan Kravets
eb58a31b89 Remove @PlatformIO library.json from GDBStub; fix pattern in LD // Resolve #4355 2018-02-14 00:23:12 +02: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
Earle F. Philhower, III
bb794f9e02 Move C++ vtables into IRAM, out of HEAP (#4179)
GCC places vtables in .rodata, with a mangled name of "_ZTV*."  Because
these are simply address jump tables, there is no need to place them in
RAM.  Instead, have the linker place them in the .text (aka IRAM) section.
This will free up a variable amount of heap space, depending on the number
of classes with virtual functions used in any particular project.
2018-01-17 14:10:40 -03:00
David Gauchard
de2a3821f6 lower lwip2 ram and flash footprint (by disabling old asserts) 2018-01-15 09:51:33 +01:00
David Gauchard
23a7bc2939 restore zalloc() (lost with OOM debug commit, used by lwip/lwip2) 2018-01-15 09:51:33 +01:00
david gauchard
28253c5bd3 boards.txt generator (#3722)
+ generates boards.rst
+ generate and replace boards section in package.json
+ generate ldscripts
+ new debug option: OOM
+ new led menu for generic board
2018-01-08 11:06:01 -03:00
david gauchard
f28d2eb7d7 lwip2: fix wdt, fix wifi reconnection (#4105)
related to #4101 #4078 #4060 #4028 and maybe others
2018-01-06 19:34:11 -03:00
Ivan Kravets
411f8d878f
Add support for @PlatformIO Core 3.5.0 2018-01-03 15:33:55 +02:00
Ivan Grokhotkov
8edeac0cf4 sdk: rename hostname and default_hostname symbols (#1281)
hostname -> wifi_station_hostname
default_hostname -> wifi_station_default_hostname
2017-12-31 22:52:00 +08:00
david gauchard
b2e2d2272f lwip2: fix minor "C" conflict (#4052) 2017-12-30 23:46:42 -03:00
Develo
a2d16f38d4
Extern C blocks (#1352) (#4044)
* Add extern C guard blocks to SDK header files #1352

* fixed some extern C blocks in core and libraries
2017-12-30 02:03:26 -03:00
david gauchard
370e75cb47 multi-mss menus for lwip2, remove lwip xcc variant, lwip2 readme, updates and fixes (#4039)
lwip2 updates:
  > multi-mss makefile
  > forwardported espconn (no multicast yet)
  > restore max 3 ntp servers for configTime() coherency
  > unchain seldom chained pbufs
  > dns cache name length back to (256->48->) 128
  > use sntp_stop/start() when dhcp address got
  > fix netif's hostname glue-handling
  > forwardported ping from lwip1.4
fix #3970
fix maybe #3963
2017-12-29 00:48:31 -03:00
david gauchard
cbfbc1ad63 lwip2 fixes and time/ntp management
core: +settimeofday()
core: +coredecls.h +sntp-lwip2.c
core: fix clock_gettime() with micros64()
core: honor DST in configTime()
core: internal clock is automatically started
examples: +esp8266/NTP-TZ-DST.ino
lwip2: sntp client removed
lwip2: fix crashing with WiFi.softAPConfig(ip,ip,ip)
fix #3852
2017-11-21 10:50:48 +08:00
david gauchard
7315095e46 lwip2: build: include and lib 2017-11-03 10:09:53 +08:00