Fixes#6792
Only append the "l" to ".htm" when there actually is a ".html" file
present. If not, fall-thru like before and try .gz through the normal
paths.
* [SSDP] add `schema(Print &) const`
Supercedes #2806
Make SSDP::schema(WiFiClient&) use a by-ref (reduce stack use)
Add a SSDP::schema(Print&)
From @Palatis' original PR:
useful when using AsyncWebServer.
* Use ip.toString, only export Print& schema interface
Because WiFiClient inherits a Print interface, replace the
::schema(WiFiClient&) with ::schema(Print&) which is source compatible
with existing code and allows the functionality requested in the initial
PR.
Use ip.toString() in the templates instead of breaking up the octets of
the address.
* Fix compile errors and backwards compatibility
* Make upload.py compatible with existing FS upload
PR #6765 introduced an incompatibility with the existing Java uploaders
for SPIFFS and LittleFS, breaking them because of the upload.py
parameter format change to support single stage erase/upload.
Add in patch to silently eat the single --end and to parse the write
address and filename properly as generated by calls from the plugins,
while retaining compatibility with the current IDE changes.
* Clean upload.py, make platform use write_flash
Make upload.py more concise and pythonic.
Use the "write_flash" argument in platform.txt for uploads instead of
assuming anything that is a file is the bin to upload.
Fixes#6767 . Remove the `undef F` from SysCall.h as it is not needed
nor used in the SD or SDFS libraries. This puts F() strings back in
flash when using the SD/SDFS libs.
* Backport from ESP32
* Use new library layout (.../src)
* Cleanup test case.
* C++ style cast required.
* Whitespace
* Inlining via header has better baseline ROM footprint.
* Reordered functions for better code-compare to master
* Reduces ROM footprint some more.
* Avoid unnecessary parameter passing - refactoring, same generated footprint.
* Reformat example sources
* Add comcat(char*, len) to Sting
Fixes#5061
Adds a concat(const char *data, int len) method which allows arbitrary
sequences of data (including ones w/embedded \0s) to be appended to a
String. May be useful for certain MQTT operations.
Adds sanity test for the feature to host suite
* Review comment cleanups
Given that most nodemcu boards are based on the ESP12 boards, the definition of the builtin led is now changed to 2.
In addition, for those nodemcu boards that have an additional LED on the board connected to gpio16, an additional define is added called LED_BUILTIN_AUX.
* Add boards filter support - allows for the creation of an abridged boards.txt.
Add some of the ITEAD Sonoff boards to boards.txt.py.
Minor reorder of presentation of board menu items, mainly grouped
board Model and module selection to the top.
* Corrected, I think, LED_BUILTIN vs BUILTIN_LED??
* Updated boards.txt
* Added support for DOIT ESP-Mx DevKit (ESP8285) board.
Adjusted wording and fixed side bar formating issue on the
Sonoff description. Also, removed resetmethod menu
and assigned resetmethod of none.
* EspSoftwareSerial release 5.3.5 with performance/error rate improvement in TX
* EspSoftwareSerial 5.3.6 with CI fix and, tadaaa, reliable tx and rx at 115200bps and beyond.
* Version 5.4.0 stabilized work of past 24h.
* FW: use NONOS-SDK branch 2.2.x from 2019-10-24 by default
former one is available when using generic board configuration
* tv qvoqve, Platform-ii
* nonos-sdk v2.2.x from 2019-11-05 by default for all boards
(previous ones can be selected with the generic board)
* (w/ fw files)
* 191024 by default, 191105 is an option
* define two weak functions defaulting to no-op
redefine them to do something useful when either spiffs or littlefs are used
* noop
* single entry point for closing FSes
* rename functions, override when instanciated, add link to explanation
* spiffs: call end on destructor
* Reset method changes for esptool.py
* Workaround - to be reverted in case esptool do erase/write_flash in one command
* Keep previous resetmethod names and translate to esptool.py options
* Regenerated boards.txt
* adds initial commit to boards.txt before actual edits
* reminder to remove vim .swp file
* Removes spaces and modifies outdated tags for menu `CpuFrequency -> xtal` for example
* Adds SparkFun Bynk Board to boards.txt.py, moves .build flags all together for SparkFun Blynk
* runs boards.txt.py to generate files for pull request - all files have been included as instructed at top of boards.txt file
* Deletes three .orig files generated by boards.txt.py: rst, txt, and json
* Moves boards.txt.py back to /tools directory and attempts to change its mode.
* restore 'x' flag
* precache() - preload code into the flash cache.
By preloading code into the flash cache we can take control over when
SPI Flash reads will occur when code is executing.
This can be useful where the timing of a section of code is extremely
critical and we don't want random pauses to pull code in from the SPI
flash chip.
It can also be useful for code that accesses/uses SPI0 which is connected
to the flash chip.
Non interrupt handler code that is infrequently called but might otherwise
require being in valuable IRAM - such as bit-banging I/O code or some code
run at bootup can avoid being permanently in IRAM.
Macros are provided to make precaching one or more blocks of code in any
function easy.
* Fix missing include
* Make precache extern "C"
* Attempt 2 at making precache extern "C"
* Fix calculation of number of cache lines to preload
With certain alignments/lengths of code it was possible to not read enough
into the flash cache.
This commit makes the length calculation clearer and adds an extra cache
line to ensure we precache enough code.
* SPI0Command - A utility function for generic SPI commands on SPI0
The rom code does not support some flash functions, or have a generic
way of sending custom commands to the flash chip.
In particular XMC flash chips have a third status register, and the
ROM only supports two.
There are also certain requirements for using SPI0 such as waiting
for the flash to be idle and not allowing your code to trigger a flash
cache miss while using SPI0.
* Clean some trailing spaces
* Upgrade _SPI0Command to _SPICommand
We needed to assess the SPI registers as base+offset to avoid referring to the
registers using constant addresses as these addresses were loaded from flash
and had the potential to trigger a flash cache miss.
For similar reasons functions need to be called via function pointers stored
in RAM. Also avoid constants in FLASH, use a copy stored in RAM.
As a side effect we can now select which controller to access as a parameter.
* Tidy up a comment thats no longer applicable
* Comments, formatting and variable renames
Added a number of comments to better explain the code and improved the
formatting.
Also renamed some variables for consistency.
* put SPI0Command in namespace experimental
* Add a comment noting that the code has only been tested on bus 0
* Replace use of memcpy with for loops in _SPICommand()
memcpy is not guaranteed to be safe (IRAM_ATTR or ROM) like I thought.
As a bonus the for loop is guaranteed to do 32-bit wide transfers, unlike memcpy.
* Typo fix
what happens when you forget to edit after copy/paste
* Move the SpiOpResult enum into experimental namespace
* precache() - preload code into the flash cache.
By preloading code into the flash cache we can take control over when
SPI Flash reads will occur when code is executing.
This can be useful where the timing of a section of code is extremely
critical and we don't want random pauses to pull code in from the SPI
flash chip.
It can also be useful for code that accesses/uses SPI0 which is connected
to the flash chip.
Non interrupt handler code that is infrequently called but might otherwise
require being in valuable IRAM - such as bit-banging I/O code or some code
run at bootup can avoid being permanently in IRAM.
Macros are provided to make precaching one or more blocks of code in any
function easy.
* Fix missing include
* Make precache extern "C"
* Attempt 2 at making precache extern "C"
* Fix calculation of number of cache lines to preload
With certain alignments/lengths of code it was possible to not read enough
into the flash cache.
This commit makes the length calculation clearer and adds an extra cache
line to ensure we precache enough code.
* Add noinline to PRECACHE_ATTR macro
Precached code needs to be noinline to ensure the no-reorder-blocks is applied.
* Cleanup base64::encode functions
The implementation choice here using libb64 is generally good as it
is a relatively fast implementation, however the adaptation to
use PROGMEM for the translation function was a bad choice, as reading
randomly PROGMEM with byte-wide access is very very very slow.
Doing a naive if-snake is between 20% and 55% faster and uses less
flash (about 120 bytes less) and also for reasons I don't understand
8 bytes less data RAM (maybe the removal of static?).
In addition the base64::encode function was allocating for larger
input a huge amount of memory (twice the total size). we can reduce
that by doing a chunk-wise conversation to base64.
* Create authorisation base64 encoded string without newlines
Rather than first creating a string with newlines and then
stripping it away in the fast path of constructing the query,
we can call the right method and trust that the result does
not have newlines anymore.