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.
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.
* 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.
* 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
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.
* 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
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.
The complete toolchain, including mkspiffs, esptool, C, C++, newlib,
and others (BearSSL excluded) is now built and uploaded with a single
command to ensure repeatability and minimize manual mistakes. All
OSes and architectures are built at a time.
Update to 2.5.0-2 throught the chain.
* LEAmDNS Responder (II)
Created a new branch to solve commit conflicts with recent changes to ESP8266mDNSResponder.cpp by d-a-v.
* Removed millis() roll-over issues
* fix LEA-mDNS
* astyle on lea-mdns examples
* add compatibility with lwIP-v1
* ditto
* use strncasecmp instead of lwip's strnicmp from lwIP-v2 (thanks @devyte)
* ditto
* fixes
* Update mDNS_Clock.ino
unindent
* Update mDNS_ServiceMonitor.ino
unindent
* Update LEAmDNS.h
Add setInstanceName() forwarder for compat
* Disable DEBUG_ESP_MDNS_RESPONDER by default
* [Fixed] Debug output line
DEBUG_OUTPUT needs to go inside DEBUG_EX_ function otherwise throw error if DEBUG_ESP_MDNS_RESPONDER is not defined
* Make exceptions a configurable menu
Add a menu, Exceptions, which allows exceptions to be disabled for ROM
sensitive scripts. Default is enabled.
* Update to latest JSON builder
* Fix the template.json with latest core patches
* Add 64-bit %ll printf format support
Adds support for %lld, %llx, etc. 64-bit integer printing, useful
for logging timestamps and other things.
Fixes#5430
* Remove unwanted updated JSON
* weak hook early_setup() #2111#2133#2136
* rename to early_init (more "c" vs early_setup which is more "c++arduino")
* example
* improve earlyWiFi example, slightly change AddrList interface, move WiFi sketches into WiFi examples
* fix CI
* fix local CI runner
* fix local CI runner
* rename early_init() to preinit()
* + static ESP8266WiFiClass::preinit_wifi_off()
* update early disable wifi example
* example update
* IPv6 example update
* Update ESP8266WiFiGeneric.h
camelCase for static method name
* Update ESP8266WiFiGeneric.cpp
camelCase for static method name
* Update EarlyDisableWiFi.ino
Expand comment, fix static method name
* Update core_esp8266_main.cpp
Expanded comment.
* Update core_esp8266_main.cpp
Expanded comment
* Update EarlyDisableWiFi.ino
Expanded comment
The packages JSON file which includes the boards, tools, etc. and needs to
have consistent formatting to be reproducible. The current boards.txt.py
uses a REGEX to string-replace a bit of it, but that bit has a different
indent than the rest of the file.
Use Python's JSON writer to format the whole file repeatably.
* Add %z and %x to printf backend
%z is a C99 format used for size_t and was not included in any printf.
On the 8266 it's a no-op as size_t==int, so ignore it and things just
work.
%x lowercase support added back in (wasn't present in nano-printf).
* Update to toolchain built newlib, fix link error
Previous commit was a hand build and copy, this one used the full
toolchain and should not include atexit().
Looks like the pgm_read_(32bit) defines were not used in the main core, and
they contained syntax errors when invoked due to some bad bracket/parens.
Fix the macros
* Move to PROGMEM aware libc, allow PSTR in printf()
A Newlib (libc) patch is in progress to move the _P functions from inside
Arduino into first-class citizens in libc. This Arduino patch cleans up
code that's been migrated there. Binaries for the new libs are included
because it seems they're part of the Arduino git tree, and should be
replaced with @igrr built ones when/if the Newlib changes are accepted.
Notable changes/additions for Arduino:
Allow for use of PROGMEM based format and parameter strings in all
*printf functions. No need for copying PSTR()s into RAM before printing
them out (transparently saves heap space when using _P functions) and
makes it easier to print out constant strings for applications.
Add "%S" (capital-S) format that I've been told, but cannot verify,
is used in Arduino to specify a PROGMEM string parameter in printfs,
as an alias for "%s" since plain "%s" can now handle PROGMEM.
Optimized the memcpy_P, strnlen_P, and strncpy_P functions to use 32-bit
direct reads whenver possible (source and dest alignment mediated), but
there is still room for improvement in others.
Finally, move several constant arrays from RODATA into PROGMEM and
update their accessors. Among these are the ctype array, ~260 bytes,
mprec* arrays, ~300 bytes, and strings/daycounts in the time
formatting functions, ~200 bytes. All told, sketches will see from
300 to 800 additional RAM heap free on startup (depending on their
use of these routines).
* Fix merge error in #ifdef/#endif
* Fix host test using the newlib generic pgmspace.h
Host tests now use the sys/pgmspace.h for compiles instead of the
ESP8266-specific version.
* Update with rebuilt libraries using latest newlib
* Include binaries built directly from @igrr repo
Rebuild the binaries using a git clone of
https://github.com/igrr/newlib-xtensa
Build commands for posterity:
````
rm -rf ./xtensa-lx106-elf/
./configure --prefix=<DIR>/esp8266/tools/sdk/libc --with-newlib \
--enable-multilib --disable-newlib-io-c99-formats \
--disable-newlib-supplied-syscalls \
--enable-newlib-nano-formatted-io --enable-newlib-reent-small \
--enable-target-optspace \
--program-transform-name="s&^&xtensa-lx106-elf-&" \
--disable-option-checking --with-target-subdir=xtensa-lx106-elf \
--target=xtensa-lx106-elf
rm -f etc/config.cache
CROSS_CFLAGS="-fno-omit-frame-pointer -DSIGNAL_PROVIDED -DABORT_PROVIDED"\
" -DMALLOC_PROVIDED" \
PATH=<DIR>/esp8266/tools/xtensa-lx106-elf/bin/:$PATH \
make all install
````
* Fix merge define conflict in c_types.h
* Fix strlen_P misaligned source error
Include fix from newlib-xtensa/fix-strlen branch cleaning up misaligned
access on a non-aligned source string.
* Fix strlen_P and strcpy_P edge cases
Ran the included test suite on ESP8266 tstring.c with the following defines:
#define MAX_1 50
#define memcmp memcmp_P
#define memcpy memcpy_P
#define memmem memmem_P
#define memchr memchr_P
#define strcat strcat_P
#define strncat strncat_P
#define strcpy strcpy_P
#define strlen strlen_P
#define strnlen strnlen_P
#define strcmp strcmp_P
#define strncmp strncmp_P
Uncovered edge case and return value problems in the optimized versions of
the strnlen_P and strncpy_P functions. Corrected.
* Fix memcpy_P return value
memcpy-1.c test suite showed error in return value of memcpy_P. Correct it.
* Fix strnlen_P/strlen_P off-by-4 error
Random crashes, often on String constructors using a PSTR, would occur due
to the accelerated strnlen_P going past the end of the string. Would make
debug builds fail, too (ESP.getVersionString() failure).
Fix to fall through to normal copy on a word that's got a 0 byte anywhere
in it.
* Add device tests for libc functional verification
Add test suite used to debug libc optimized _P functions to the device
tests.
* Rebuild from igrr's repo (same source as prior)
Rebuild .a from igrr's repo at 347260af117b4177389e69fd4d04169b11d87a97
* WIP - add exceptions
* Fix exception to have 0-terminator
* Move some exception constants to TEXT from RODATA
* Remove throw stubs
* Move more exception stuff to ROM
* Enable exceptions in platform.io
* Remove atexit, is duplicated in rebuilt lib
Need to look at the quick-toolchain options, there seems to be a definition
for atexit defined there (libgcc?) that needs to be excised. For now,
remove our local do-nothing copy.
* Update libgcc to remove soft-fp functions
The esp-quick-toolchain generated libgcc.a needed to have the soft-FP routines
that are in ROM removed from it. Remove them in the new esp-quick-toolchain
and update.
* Fix merge typos in Makefile
* Add unhandled exception handler to postmortem
* Return our atexit() handler
* Latest stdc++, minimize exception emercengy area
* Remove atexit from newlib
atexit was defined in newlib strongly, but we also define a noop atexit in core.
Since we never exit, use the core's noop and delete the atexit from libc.a
Updated in esp-quick-toolchain as well.
* Move __FUNCTION__ static strings to PROGMEM
__FUNCTION__ is unlikely to be a timing sensitive variable, so move it to
PROGMEM and not RODATA (RAM) using linker magic.
asserts() now should take no RAM for any strings.
* Clean up linker file, update to latest stdc++
* Update to latest stdc++ which doesn't call strerror
* Update to GCC5.1 exception emergency allocator
Using GCC 5.1's emergency memory allocator for exceptions, much less
space is required in programs which do not use exceptions and when
space is allocated it is managed more efficiently.
* Initial try with new compiler toolchain
* Include newlib built from esp-quick-toolchain
* Update JSON with all new esp-quick-toolchain builds
* Use 64bit Windows compiler on 64bit Windows
* Dump std::exception.what() when possible
When doing the panic on unhandled exceptions, try and grab the
.what() pointer and dump it as part of the termination info.
Makes it easy to see mem errors (std::bad_alloc) or std::runtime_error
strings.
* Use scripted install from esp-quick-toolchain
Makes sure proper libraries and includes are present by using a
scripted installation from esp-quick-install instead of a manual
one.
* Update eqk to remove atexit, fix packaging diff
Using a pluggable architecture, allow updates delivered via the Update
class to be verified as signed by a certificate. By using plugins, avoid
pulling either axTLS or BearSSL into normal builds.
A signature is appended to a binary image, followed by the size of the
signature as a 32-bit int. The updater takes a verification function
and checks this signature using whatever method it chooses, and if it
fails the update is not applied.
A SHA256 hash class is presently implemented for the signing hash (since
MD5 is a busted algorithm).
A BearSSLPublicKey based verifier is implemented for RSA keys. The
application only needs the Public Key, while to sign you can use
OpenSSL and your private key (which should never leave your control
or be deployed on any endpoints).
An example using automatic signing is included.
Update the docs to show the signing steps and how to use it in the
automatic and manual modes.
Also remove one debugging line from the signing tool.
Saves ~600 bytes when in debug mode by moving strings to PMEM
Windows can't run the signing script, nor does it normally have OpenSSL
installed. When trying to build an automatically signed binary, warn
and don't run the python.
* restore definition of ip_addr (=ipv4_addr) when IPv6 is not enabled
* overload IPAddress:operator == and != to avoid ambiguousness
* brings lwIP's INADDR_NONE (which is IPv4 255.255.255.255, suposed to be invalid address but it is)
* inet_aton is a lwIP define, rename Ethernet DNS implementation of this to prevent name collision
that's because IPAddress now includes lwip/inet.h
I recently starting playing around with a few esp8266-01s and tried to use the SSDP libraries to work with Smarthings discovery:
https://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-lan-connected-device-types/building-the-service-manager.html
on the docs there are example grovy files that do simple service discovery, i was not able to get SSDP to work correctly, though i was able to find some other projects that did (python fauxmo works for alexa, but with modifications i was able to make it work for custom devices in ST).
after digging to figure out why the python code was working and the ESP SSDP lib was not i noticed there is a string comparison in the grovy file and it was failing to match the udn with the original usn device id. The ST groovy code could be changed to remedy this problem but i wonder if it should be fixed here, because so many other examples of SSDP discovery take care in ensuring the usn and udn match exactly.
___________
Summary, I think the USN and UDN values should match exactly. This will fix issues, allowing for much easier integration with smart hubs that need the device ids to match. Allowing me to use these libraries and not need to roll a custom SSDP handler.
PIO is taking 27+ minutes now, very close to the runtime limit.
Split into even and odd, just like standard Arduino. Each PIO job
takes ~14-15 minutes and can go in parallel.