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

4139 Commits

Author SHA1 Message Date
Hasenradball
193043d19b
Update ESP8266WiFiSTA.cpp (#8229)
change return to `WL_WRONG_PASSWORD` if there is an issue with the password!
2021-09-29 09:35:32 +02:00
Juraj Andrássy
64e87f1149
WiFi library ArduinoWiFiServer update (#8238)
* ArduinoWiFiServer - check for clients in write() too
2021-09-22 19:31:07 +02:00
Benoît Blanchon
612e7ffd7f
Remove temporary buffer in ConfigFile.ino (#8298)
When reading from a `Stream`, like `File`, using a temporary buffer is counterproductive because it complexifies the code and increases memory usage.
It's also a source of confusion because it can create dangling pointers in the `JsonDocument`.
The only benefit of using a buffer is the reading speed, but I don't think speed is the focus in this example; if it were, it would use a buffer in `saveConfig()` too.
2021-09-16 11:23:08 +02:00
TD-er
211606fe9c
[WString] Reduce build size by implementing flash string calls in .cpp (#8106)
A function called with a flash string, which only has an implementation with `const String&` as argument will be compiled as if it is called with a `String` constructor wrapped around it.

For example this implementation in the .h file:
```c++
bool startsWith(const __FlashStringHelper *prefix) const {
            return this->startsWith(String(prefix));
}
```

This is completely useless as the compiler will generate exactly the same code with or without this function implementation in the .h file.
However if we move the implementation to the .cpp file, this conversion to `String` is only added once in the compiled binary.
In my own project I already managed to shrink the largest (ESP32) build by more than 70k in size (!!) by just adding extra function calls with the conversion in the .cpp file.
This PR is just a simple optimisation which already shrinks a very small build of my project by almost 3k in build size.  (custom_beta_ESP8266_4M1M PIO env of ESPEasy)

```
Flash: [========  ]  82.5% (used 862137 bytes from 1044464 bytes)
Flash: [========  ]  82.3% (used 859545 bytes from 1044464 bytes)
```

Larger builds may benefit even more.
2021-09-04 11:43:18 -07:00
Claus Näveke
140d0ffde1
Add writeToPrint to ESP8266HTTPClient (#8056) 2021-09-04 10:46:47 -07:00
Vlasta Hajek
d3f16b3177
Allow manually setting MD5 checksum for HTTP update (#8204) 2021-09-04 10:34:00 -07:00
Paulo Cabral Sanz
058ce7c08e
Allow control over HTTPClient authorization String allocation (#8225) 2021-09-04 10:17:00 -07:00
behrooz bozorg chami
65db3aec72
Add HTTP delete method (#8214) 2021-09-01 09:42:19 -07:00
Oxan van Leeuwen
fb5c4a6420
Place deprecated attribute in front of function (#8258) 2021-09-01 09:03:12 -07:00
Maximilian Gerhardt
f7951e6842
Respect linking order of libraries for PlatformIO (#8263)
* Respect linking order of libraries

Now has the same order as the Arduino IDE does with its platform.txt

* Remove double-referenced libs

* Change implementation style

Instead of injecting at magic indices, which might break when some other extra-scripts inject other libraries, let's create the LIBS array at the bottom in easy to understand and correct order.
2021-09-01 08:43:49 -07:00
Dirk O. Kaar
9f30f2469f
EspSoftwareSerial maintenance update 6.13.2 (#8295)
* EspSoftwareSerial maintenance update 6.13.1

* EspSoftwareSerial 6.13.2
2021-08-30 16:48:28 -07:00
Dirk O. Kaar
5f04fbbf5f
EspSoftwareSerial minor release 6.13.0: Improve support for availability of GPIOS on ESP32 S2 and ESP32C3 (#8260) 2021-08-07 15:05:05 -07:00
david gauchard
929f0fb63c
back to 3.1.0-dev after 3.0.2 (#8246)
That was fun :]
2021-07-27 00:59:47 +02:00
david gauchard
cf6ff4c4f8
reinstall ssh private keys from GH secrets (#8245) 3.0.2 2021-07-27 00:33:39 +02:00
david gauchard
096c008345
restore github keys in the deploy process (#8244) 2021-07-27 00:06:19 +02:00
david gauchard
7af58608d7
add missing git-clone to the deploy step in the release process (#8243)
* add missing git-clone to the deploy step in the release process
2021-07-26 23:47:38 +02:00
david gauchard
14c3798d4f
release 3.0.2 (#8242) 2021-07-26 22:27:44 +02:00
Earle F. Philhower, III
f9084603de
Make multiple FS begin calls noops() SDFS/LittleFS (#8235)
When LittleFS.begin() or SDFS.begin() is called after the filesystem is
already mounted, don't unmount/remount.  When an unmount happens, all old
Files become invalid (but the core doesn't know this), so you would end
up with random crashes in FS code.

Now, check for _mounted, and if so just return immediately from begin().
This mimics the original SPIFFS code.

Fixes https://github.com/earlephilhower/ESP8266Audio/issues/407
2021-07-26 21:58:40 +02:00
Earle F. Philhower, III
cfb6d50844
Fix PRxxx printf format macros (#8222)
* Fix PRxxx printf format macros

Update toolchain (newlib) to supply proper definitions for PRxxx macros.
Fixes #8220

Added a PRxxx macro to an example to ensure CI will catch any problem like
this in the future.
2021-07-26 21:41:08 +02:00
Earle F. Philhower, III
a0d2a7a8a7
Use only installed Python on Windows (#8226)
When Python is installed on Windows separately (i.e. Windows Store,
Python.org MSI, etc.) it set the PYTHONHOME environment variable to
the installed path.

When we call our own portable Python, it tries to use the support
PYC files in PYTHONHOME.  If they're from a different version of
Python, however, they won't work.  Even though we're running our
own distributed Python.exe, we are crashing on the system-wide
Python installation.

Add -I to all python3 calls, ignore PYTHONHOME/etc. environment vars.

Tested under Ubuntu 18.04 Linux w/o any ill effects (we ship pyserial
ourselves and add it manually to the Python search path).

Fixes #8096, or should as I understand it.
2021-07-26 21:29:17 +02:00
Dirk O. Kaar
bc302511f5
Clean up use of "byte" as a type. uint8_t or (C++17) std::byte are better. (#8090) 2021-07-26 21:20:45 +02:00
M Hightower
8a42163a50
Call umm_init just before starting SDK (#8207)
* Recover the BearSSL crash stack before the Heap is initialized and zeros it.
* Added comments for hwdt_pre_sdk_init()
* Keep Basic ASM version of app_entry_redefinable and removed alternate "C"/Extended ASM version. Update comments.
* Improved example HwdtStackDump to use StackThunk
2021-07-19 07:58:37 -07:00
david gauchard
69f8cd6934
Certificate and public keys automatic updater (#8218) 2021-07-17 16:29:46 -07:00
Paulo Cabral Sanz
c9f27410f7
Fix NO_GLOBAL_INSTANCES for Serial ports (#8184) 2021-07-17 16:21:37 -07:00
hreintke
09c4e33106
Netdump printf fix (#8215)
* Fix crash printf long getTime()

* Update several printf to printf_P
2021-07-17 11:50:15 -07:00
per1234
25a21c3e7d
Use valid categories in library.properties of bundled libraries (#8221)
When using previous IDE versions, the use of an invalid category value caused a warning to be displayed on every compilation:

WARNING: Category 'Network' in library lwIP_PPP is not valid. Setting to 'Uncategorized'
WARNING: Category 'Network' in library lwIP_enc28j60 is not valid. Setting to 'Uncategorized'
WARNING: Category 'Network' in library lwIP_w5500 is not valid. Setting to 'Uncategorized'
WARNING: Category 'Network' in library lwIP_w5500 is not valid. Setting to 'Uncategorized'

List of valid category values:
https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format
2021-07-17 11:00:14 -07:00
M Hightower
40876dc6ba
Fixes failing https connections to HelloServerBearSSL when using the (#8206)
MMU option with 48K IRAM shared. This happended after changes that
increased IRAM code size that caused  free IRAM for Heap to fall
below ~16K, then "new" would OOM out in WiFiClientSecureBearSSL.

Added private function to try IRAM first then switch to DRAM on fail
to WiFiClientSecureBearSSL for iobuff allocations.
2021-07-11 22:22:34 +02:00
gneiss15
95c6fbb054
Make mkdir.py work under python3 versions below 3.5 (#8194)
* Make mkdir.py work unter python3 versions below 3.5
Because early versions of python3 did not have the optional arg "exist_ok" for "pathlib.Path(...).mkdir(...)" a build under this versions will abort with an error message.
This PR will modify the python script so that it works even under python 3.4 (and below).
2021-07-09 12:09:33 +02:00
Paulo Cabral Sanz
2946ce055c
Avoid copying past end of buffer in String.concat (#8198) 2021-07-08 16:35:09 -07:00
M Hightower
a105bdd359
add comments and corrections (#8201)
* Added comments for ets_install_uart_printf and corrected it usage.

* Correct case for hotkey 'p'.
Added conditional build around option 'p' to call stack_thunk_dump_stack
which can only print when debug is enabled.
2021-07-08 16:11:58 -07:00
Dirk O. Kaar
29c63506f7
Update to EspSoftwareSerial bug fix release 6.12.7, build fix for ESP-C3 RISC V MCU. (#8195) 2021-07-07 08:47:08 -07:00
gneiss15
7ba596a5fe
Add wifi kit 8 to boards (#8190)
* Create pins_arduino.h

* Update boards.txt.py

* Update boards.txt

* done a "boards.txt.py --allgen"

* Removed the definition of LED_BUILTIN from variants/wifi_kit_8/pins_arduino.h, because this board has no build in lED
2021-07-03 23:33:20 +02:00
Earle F. Philhower, III
d8b70d4a99
Copy released JSON to board URL, not new one (#8182)
* Copy released JSON to board URL, not new one

Fixes #8180

The draft release generates a ZIP and JSON.  Instead of rebuilding the ZIP
on the publish step (which may result in a different SHA256 due to file time
differences in the new ZIP), just copy the one from the published release
directly.

Also clean up and remove unneeded environment variables and CI steps.

* Be more paranoid about JSON format, check after d/l
2021-06-28 22:55:17 +02:00
Earle F. Philhower, III
421d02eec1
Back to 3.1.0-dev (#8181) 2021-06-26 11:58:00 -07:00
Earle F. Philhower, III
cbf44fb343
Release 3.0.1 (#8179)
Apply #8178 to the publish action, too.
3.0.1
2021-06-26 11:26:32 -07:00
Earle F. Philhower, III
f6dcda9c8e
Release 3.0.1 (#8178)
Fix release packager issue.  Seems when variable set in $GITHUB_ENV
quotation marks are not removed, resulting in URLs with
http://ddd.dd/blah/"3.0.1"/release and JSON entries with the same
quotation problem.
2021-06-26 11:14:17 -07:00
Earle F. Philhower, III
af513f666f
Release 3.0.1 (#8177) 2021-06-26 10:44:22 -07:00
Max Prokhorov
019fab4e02
pio: use CCFLAGS for -Werror (#8175)
Also adds some comments referencing SCons documentation
2021-06-25 18:38:46 -07:00
david gauchard
d2a3cbeb6f
Documentation: Note about options on PIO (#8174) 2021-06-25 15:44:02 -07:00
Earle F. Philhower, III
d1c7c046d5
Don't crash when includeing LittleFS.h w/no FS (#8173)
* Don't crash when includeing LittleFS.h w/no FS

The LittleFS constructor could cause a divide-by-zero error and crash the
chip during pre-main startup (i.e. when the constructors were called).

Avoid by only initializing the LittleFS control structure when there is
a filesystem specified in the flash layout.

* Be even more paranoid on begin() and format()
2021-06-26 00:30:42 +02:00
david gauchard
20de82588e
SDFS: fix AvailableForWrite: do not always return 0 when space is available (#8167) 2021-06-25 17:19:17 +02:00
Matthew Smith
d99dd5d3f5
Update debug level list link (#8172) 2021-06-25 11:29:40 +02:00
david gauchard
04c2322721
github action: enforce issue detection with bash (#8168) 2021-06-24 15:25:05 -07:00
Dirk O. Kaar
44ec4bea56
Remove some no longer applicable artifacts from .gitignore (#8170) 2021-06-24 15:10:14 -07:00
Earle F. Philhower, III
90b4c6f299
Add errors on invalid/missing function return type (#8165)
GCC 10.x seems to have a knack for crashing when a function which is declared
to return a value does not.  Add a warning, present on all builds, when this
is the case.  For more info see https://github.com/esp8266/Arduino/discussions/8160

Thanks to @hreintke and @mcspr for the tips.
2021-06-24 12:44:57 -07:00
david gauchard
d3136738ad
fix readthedoc python dependencies (#8166) 2021-06-23 21:08:26 +02:00
david gauchard
32fad07a70
ESP266httpUpdate: remove dead API and fix doc (#8063) 2021-06-22 18:22:42 -07:00
david gauchard
d283541380
documentation: Arduino IDE options: fix hyperlinks and format (#8158)
(this time, sphinx was used locally)
2021-06-22 03:39:53 +02:00
david gauchard
e55dfc3a0e
Documentation: Arduino IDE specific options for esp82xx (#8154) 2021-06-21 17:03:14 -07:00
Silvano Cerza
78e63280ba
Add missing menu.UploadTool name definition (#8153) 2021-06-21 11:12:05 +02:00