mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Upgrade to GCC 10.1 toolchain (#6294)
* Upgrade to GCC 9.1 toolchain * Rebuilt using pure GNU binutils and GCC Remove dependencies on earlier forked GNU utilities (gcc-xtensa, binutils-gdb-xtensa) and just use GCC sources, unmodified (except for patches in the esp-quick-toolchain directories). * Rebuild bearssl using new toolchain * Fix GDBstub linkage options GDB works with pure GNU GCC and pure GNU binutils now. Still warnings galore, but tested with the example sketch in the docs. * Fix digitalRead alias warning * Remove gdb stub warnings w/a pragma * Fix deprecated implicit copy ctors in IP code Fix some warnings present in GCC8/9 in the IPAddress code In AddressListIterator there was a copy constructor which simply copied the structure bit-for-bit. That's the default operation, so remove it to avoid the warning there. IPAddress, add a default copy constructor since the other copy constructors are simply parsing from one format into a native ip_addr_t. @d-a-v, can you give these a look over and see if they're good (since IP stuff is really your domain). * Fix AxTLS alias function defs to match real code * Fix WiFiClientSecure implicit default copy ctor These both use shared-ptrs to handle refcnts to allocated data, so using the default copy constructor is fine (and has been in use for a long time). * Dummy size for heap to avoid GCC 8/9 warnings Make GCC think _heap_start is large enough to avoid the basic (and incorrect) bounds-checking warnings it produces. The size chosen is arbitrary and does not affect the actual size of the heap in any way. * Make heap an undefined extend array Instead of a bogus size, use an indefinite size for the heap to avoid GCC warnings * Trivial tab to space fix * Update SDFat to remove FatFile warnings * Fix ticker function cast warnings in GCC 9 The callback function is defined to take a (void*) as parameter, but our templates let users use anything that fits inside sizeof(void*) to be passed in. Add pragmas to stop GCC warnings about this, since we already check the size of the type will fit in the allocated space. * Remove GCC support fcn that's in ROM Manually delete the divdi3.so from the libgcc.a library by running the updated EQT's 9.1-post script. * Make exceptions work again, get std::regex up Exceptions are broken on all builds (GCC4.8-9.1) due to the removal of the PROGMEM non-32b read exception handler (added in the unstable pre3.0.0). Build the exception code with -mforce-l32 and patch accordingly to avoid LoadStore errors. Apply patches to select portions of the regex lib which use _stype_ (which is now in flash). * Rebuild Bearssl using latest GCC push * Automate building of BearSSL and LWIP w/new toolchain * Workaround g++ template section problem for exception strings G++ seems to throw out the section attributes for templates. This means that the __EXCSTR(a synonym for "PSTR()") is ignored and exception.what strings are stored in RODATA, eating up RAM. Workaround by using the linker to place the strings keying off their name ("*__exception_what__*"). * Rebuild moving exception.what to unique names Exception.whats are now all in __exception_what__ and can be moved by the linker to flash. Works aroung G++ issue with segments being lost in templates. * Rebuild with new LWIP locking * Update to latest libs, save iram Move two GCC FP support routines out of iram since they are in ROM already, saving some add'l IRAM. Same list as gcc 4.8. * Update BearSSL to latest release * Fix umm_perf reference to ROM function * Fix "reinterpret_case is not a constexpr" error In GCC 9 (and 8 from what I read on SO), a cast of a const int to a function pointer (via explicit or implicit reinterpret_cast) is not a constexpr. ```` /home/earle/Arduino/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_performance.cpp:45:36: error: a reinterpret_cast is not a constant expression 45 | int constexpr (*_rom_putc1)(int) = (int (*)(int))(void*)0x40001dcc; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ```` Remove the constexpr, potentially increasing heap usage by 4 bytes in debug mode. * Update libc.a to latest rev * Full rebuild of toolchain and libs * Upgrade to GCC 9.2, released in August 2019 Add builds for all 5 cross-compiles to pass CI * Move to --std=gnu++14 (C++14 + GNU extensions) * Fix Ticker merge conflict * Fix json merge conflict * One more merge diff fix * Reapply Ticker.h casting warning fixes for gcc9 * Update with fixes from Sming repo for PSTR and ASM * Upgrade to -gnu4 toolchain * Move to gnu5 build with add'l softFP from ROM * Move add'l softFP from IRAM to flash Per @mikee47, we miss sone add'l soft-FP routined in the linker which makes them end up in IRAM. Move them explicitly into flash, like a couple others we have already done this for. * Move to std=c++17/c17 in platform, remove abs/round Move to C++17 and C17 standards on the compiler options. Remove "register" from core since it is deprecated. Remove the #define abs() and #define round() which a) overwrote the C stdlib definitions, poorly, and b) broke the GCC core code which used "abs" as an internal function name. Now abs() returns an integer, and not whatever was being absoluted. fabs() etc. can be used if users need fload/double suport. round() returns a double now, which is basically what it was returning in the original case since adding/subtracting by a FP. * Use std::abs/round to replace the macro definitions Per discussion w/@devyte, preserve the abs() and round() functionality via the using statement. * Remove using std::abs which conflicted with C lib headers * Add 2nd arg (exception handler) to ets_isr_t Disassembly of the ROM shows there are 2 params to the ets_isr_t callback. The first is the arg passed in, the second is a pointer to an exception frame where you can get info about when the IRQ happened. * Move the gdbstub example to a subdir The Arduino IDE and the build CI don't build it without a subdir, so make one for gdbstub's example so it's visible and tested. * Fix ets_irq_arratch redefinition and core IRQ handlers Remove a duplicated, different declaration for ets_irq_attach from ets_sys.h. It never really even matched the other declaration in the same header. Update the core to IRQ handlers to fix the prototype and include the 2nd, unused frame parameter. * Actually rebuild the libc.a using GCC 9.2 * Fix SPISlave interrupt attach's 2nd parameter * Rebuild eboot.elf with GCC 9 * Update to latest SoftwareSerial for Delegate fix * Upgrade to GCC 9.3 * Rebuild all arch toolchains * Move to GCC 10.1 * Merge master and fix eboot build GCC10 now uses `-fno-common` so the eboot global variables were being placed in IRAM. Adjust the makefile and rebuild to fix. * Built complete toolchain for all archs * Pull in latest PSTR changes and fix GCC10.1 build Somehow the prior GCC build's -mforce32 patch wasn't applying correctly, but I was still able to get a binary. Fixed. Also pulled in latest PSTR changes in progmem.h * Update platform.io to platform C/C++ standards * Use PR's toolchain in platformio build * Fix several asm warnings in PIO build * Optional stack smash protection -fstack-protector Add a menu to enable GCC's built-in stack smash protection. When a subroutine goes past its end of stack, generate a crashdump on function exit like: ```` GCC detected stack overrun Stack corrupted, stack smash detected. >>>stack>>> ctx: cont sp: 3fffff20 end: 3fffffc0 offset: 0000 3fffff20: 40202955 00000001 0000001c 4020287e 3fffff30: feefeffe 000000fd 00000000 00000000 ... <<<stack<<< ```` Disabled by default because there is a small per-function code overhead (and CPU time if the function is called very frequently and is very small). BearSSL and LWIP are not built using stack smash detection, yet. * Fix duplicated stc=gnu99/c17 in build * Dump faulting function PC in stack overflow Report a fake exception to have the exception decoder print the actual faulting function. This won't tell you where in the function the issue happened, but it will tell you the function name first and foremost. * Rebuild with Platform.io JSON tag in release tgzs
This commit is contained in:
parent
7b48b9de5f
commit
d979b57d76
137
boards.txt
137
boards.txt
@ -19,6 +19,7 @@ menu.lvl=Debug Level
|
||||
menu.ip=lwIP Variant
|
||||
menu.vt=VTables
|
||||
menu.exception=Exceptions
|
||||
menu.stacksmash=Stack Protection
|
||||
menu.wipe=Erase Flash
|
||||
menu.sdk=Espressif FW
|
||||
menu.ssl=SSL Support
|
||||
@ -57,6 +58,10 @@ generic.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
generic.menu.exception.enabled=Enabled
|
||||
generic.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
generic.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
generic.menu.stacksmash.disabled=Disabled
|
||||
generic.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
generic.menu.stacksmash.enabled=Enabled
|
||||
generic.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
generic.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
generic.menu.ssl.all.build.sslflags=
|
||||
generic.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -532,6 +537,10 @@ esp8285.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
esp8285.menu.exception.enabled=Enabled
|
||||
esp8285.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
esp8285.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
esp8285.menu.stacksmash.disabled=Disabled
|
||||
esp8285.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
esp8285.menu.stacksmash.enabled=Enabled
|
||||
esp8285.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
esp8285.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
esp8285.menu.ssl.all.build.sslflags=
|
||||
esp8285.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -873,6 +882,10 @@ espduino.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
espduino.menu.exception.enabled=Enabled
|
||||
espduino.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
espduino.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
espduino.menu.stacksmash.disabled=Disabled
|
||||
espduino.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
espduino.menu.stacksmash.enabled=Enabled
|
||||
espduino.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
espduino.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
espduino.menu.ssl.all.build.sslflags=
|
||||
espduino.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -1065,6 +1078,10 @@ huzzah.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
huzzah.menu.exception.enabled=Enabled
|
||||
huzzah.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
huzzah.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
huzzah.menu.stacksmash.disabled=Disabled
|
||||
huzzah.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
huzzah.menu.stacksmash.enabled=Enabled
|
||||
huzzah.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
huzzah.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
huzzah.menu.ssl.all.build.sslflags=
|
||||
huzzah.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -1258,6 +1275,10 @@ inventone.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
inventone.menu.exception.enabled=Enabled
|
||||
inventone.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
inventone.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
inventone.menu.stacksmash.disabled=Disabled
|
||||
inventone.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
inventone.menu.stacksmash.enabled=Enabled
|
||||
inventone.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
inventone.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
inventone.menu.ssl.all.build.sslflags=
|
||||
inventone.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -1451,6 +1472,10 @@ cw01.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
cw01.menu.exception.enabled=Enabled
|
||||
cw01.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
cw01.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
cw01.menu.stacksmash.disabled=Disabled
|
||||
cw01.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
cw01.menu.stacksmash.enabled=Enabled
|
||||
cw01.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
cw01.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
cw01.menu.ssl.all.build.sslflags=
|
||||
cw01.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -1647,6 +1672,10 @@ espresso_lite_v1.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
espresso_lite_v1.menu.exception.enabled=Enabled
|
||||
espresso_lite_v1.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
espresso_lite_v1.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
espresso_lite_v1.menu.stacksmash.disabled=Disabled
|
||||
espresso_lite_v1.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
espresso_lite_v1.menu.stacksmash.enabled=Enabled
|
||||
espresso_lite_v1.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
espresso_lite_v1.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
espresso_lite_v1.menu.ssl.all.build.sslflags=
|
||||
espresso_lite_v1.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -1843,6 +1872,10 @@ espresso_lite_v2.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
espresso_lite_v2.menu.exception.enabled=Enabled
|
||||
espresso_lite_v2.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
espresso_lite_v2.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
espresso_lite_v2.menu.stacksmash.disabled=Disabled
|
||||
espresso_lite_v2.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
espresso_lite_v2.menu.stacksmash.enabled=Enabled
|
||||
espresso_lite_v2.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
espresso_lite_v2.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
espresso_lite_v2.menu.ssl.all.build.sslflags=
|
||||
espresso_lite_v2.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -2039,6 +2072,10 @@ phoenix_v1.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
phoenix_v1.menu.exception.enabled=Enabled
|
||||
phoenix_v1.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
phoenix_v1.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
phoenix_v1.menu.stacksmash.disabled=Disabled
|
||||
phoenix_v1.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
phoenix_v1.menu.stacksmash.enabled=Enabled
|
||||
phoenix_v1.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
phoenix_v1.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
phoenix_v1.menu.ssl.all.build.sslflags=
|
||||
phoenix_v1.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -2235,6 +2272,10 @@ phoenix_v2.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
phoenix_v2.menu.exception.enabled=Enabled
|
||||
phoenix_v2.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
phoenix_v2.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
phoenix_v2.menu.stacksmash.disabled=Disabled
|
||||
phoenix_v2.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
phoenix_v2.menu.stacksmash.enabled=Enabled
|
||||
phoenix_v2.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
phoenix_v2.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
phoenix_v2.menu.ssl.all.build.sslflags=
|
||||
phoenix_v2.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -2431,6 +2472,10 @@ nodemcu.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
nodemcu.menu.exception.enabled=Enabled
|
||||
nodemcu.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
nodemcu.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
nodemcu.menu.stacksmash.disabled=Disabled
|
||||
nodemcu.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
nodemcu.menu.stacksmash.enabled=Enabled
|
||||
nodemcu.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
nodemcu.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
nodemcu.menu.ssl.all.build.sslflags=
|
||||
nodemcu.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -2624,6 +2669,10 @@ nodemcuv2.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
nodemcuv2.menu.exception.enabled=Enabled
|
||||
nodemcuv2.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
nodemcuv2.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
nodemcuv2.menu.stacksmash.disabled=Disabled
|
||||
nodemcuv2.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
nodemcuv2.menu.stacksmash.enabled=Enabled
|
||||
nodemcuv2.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
nodemcuv2.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
nodemcuv2.menu.ssl.all.build.sslflags=
|
||||
nodemcuv2.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -2821,6 +2870,10 @@ modwifi.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
modwifi.menu.exception.enabled=Enabled
|
||||
modwifi.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
modwifi.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
modwifi.menu.stacksmash.disabled=Disabled
|
||||
modwifi.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
modwifi.menu.stacksmash.enabled=Enabled
|
||||
modwifi.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
modwifi.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
modwifi.menu.ssl.all.build.sslflags=
|
||||
modwifi.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -3034,6 +3087,10 @@ thing.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
thing.menu.exception.enabled=Enabled
|
||||
thing.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
thing.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
thing.menu.stacksmash.disabled=Disabled
|
||||
thing.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
thing.menu.stacksmash.enabled=Enabled
|
||||
thing.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
thing.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
thing.menu.ssl.all.build.sslflags=
|
||||
thing.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -3227,6 +3284,10 @@ thingdev.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
thingdev.menu.exception.enabled=Enabled
|
||||
thingdev.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
thingdev.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
thingdev.menu.stacksmash.disabled=Disabled
|
||||
thingdev.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
thingdev.menu.stacksmash.enabled=Enabled
|
||||
thingdev.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
thingdev.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
thingdev.menu.ssl.all.build.sslflags=
|
||||
thingdev.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -3420,6 +3481,10 @@ blynk.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
blynk.menu.exception.enabled=Enabled
|
||||
blynk.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
blynk.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
blynk.menu.stacksmash.disabled=Disabled
|
||||
blynk.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
blynk.menu.stacksmash.enabled=Enabled
|
||||
blynk.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
blynk.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
blynk.menu.ssl.all.build.sslflags=
|
||||
blynk.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -3613,6 +3678,10 @@ esp210.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
esp210.menu.exception.enabled=Enabled
|
||||
esp210.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
esp210.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
esp210.menu.stacksmash.disabled=Disabled
|
||||
esp210.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
esp210.menu.stacksmash.enabled=Enabled
|
||||
esp210.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
esp210.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
esp210.menu.ssl.all.build.sslflags=
|
||||
esp210.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -3806,6 +3875,10 @@ d1_mini.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
d1_mini.menu.exception.enabled=Enabled
|
||||
d1_mini.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
d1_mini.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
d1_mini.menu.stacksmash.disabled=Disabled
|
||||
d1_mini.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
d1_mini.menu.stacksmash.enabled=Enabled
|
||||
d1_mini.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
d1_mini.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
d1_mini.menu.ssl.all.build.sslflags=
|
||||
d1_mini.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -3999,6 +4072,10 @@ d1_mini_pro.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
d1_mini_pro.menu.exception.enabled=Enabled
|
||||
d1_mini_pro.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
d1_mini_pro.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
d1_mini_pro.menu.stacksmash.disabled=Disabled
|
||||
d1_mini_pro.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
d1_mini_pro.menu.stacksmash.enabled=Enabled
|
||||
d1_mini_pro.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
d1_mini_pro.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
d1_mini_pro.menu.ssl.all.build.sslflags=
|
||||
d1_mini_pro.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -4175,6 +4252,10 @@ d1_mini_lite.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
d1_mini_lite.menu.exception.enabled=Enabled
|
||||
d1_mini_lite.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
d1_mini_lite.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
d1_mini_lite.menu.stacksmash.disabled=Disabled
|
||||
d1_mini_lite.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
d1_mini_lite.menu.stacksmash.enabled=Enabled
|
||||
d1_mini_lite.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
d1_mini_lite.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
d1_mini_lite.menu.ssl.all.build.sslflags=
|
||||
d1_mini_lite.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -4408,6 +4489,10 @@ d1.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
d1.menu.exception.enabled=Enabled
|
||||
d1.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
d1.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
d1.menu.stacksmash.disabled=Disabled
|
||||
d1.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
d1.menu.stacksmash.enabled=Enabled
|
||||
d1.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
d1.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
d1.menu.ssl.all.build.sslflags=
|
||||
d1.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -4601,6 +4686,10 @@ espino.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
espino.menu.exception.enabled=Enabled
|
||||
espino.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
espino.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
espino.menu.stacksmash.disabled=Disabled
|
||||
espino.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
espino.menu.stacksmash.enabled=Enabled
|
||||
espino.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
espino.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
espino.menu.ssl.all.build.sslflags=
|
||||
espino.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -4797,6 +4886,10 @@ espinotee.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
espinotee.menu.exception.enabled=Enabled
|
||||
espinotee.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
espinotee.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
espinotee.menu.stacksmash.disabled=Disabled
|
||||
espinotee.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
espinotee.menu.stacksmash.enabled=Enabled
|
||||
espinotee.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
espinotee.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
espinotee.menu.ssl.all.build.sslflags=
|
||||
espinotee.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -5007,6 +5100,10 @@ wifinfo.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
wifinfo.menu.exception.enabled=Enabled
|
||||
wifinfo.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
wifinfo.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
wifinfo.menu.stacksmash.disabled=Disabled
|
||||
wifinfo.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
wifinfo.menu.stacksmash.enabled=Enabled
|
||||
wifinfo.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
wifinfo.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
wifinfo.menu.ssl.all.build.sslflags=
|
||||
wifinfo.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -5259,6 +5356,10 @@ arduino-esp8266.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
arduino-esp8266.menu.exception.enabled=Enabled
|
||||
arduino-esp8266.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
arduino-esp8266.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
arduino-esp8266.menu.stacksmash.disabled=Disabled
|
||||
arduino-esp8266.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
arduino-esp8266.menu.stacksmash.enabled=Enabled
|
||||
arduino-esp8266.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
arduino-esp8266.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
arduino-esp8266.menu.ssl.all.build.sslflags=
|
||||
arduino-esp8266.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -5453,6 +5554,10 @@ gen4iod.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
gen4iod.menu.exception.enabled=Enabled
|
||||
gen4iod.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
gen4iod.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
gen4iod.menu.stacksmash.disabled=Disabled
|
||||
gen4iod.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
gen4iod.menu.stacksmash.enabled=Enabled
|
||||
gen4iod.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
gen4iod.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
gen4iod.menu.ssl.all.build.sslflags=
|
||||
gen4iod.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -5714,6 +5819,10 @@ oak.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
oak.menu.exception.enabled=Enabled
|
||||
oak.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
oak.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
oak.menu.stacksmash.disabled=Disabled
|
||||
oak.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
oak.menu.stacksmash.enabled=Enabled
|
||||
oak.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
oak.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
oak.menu.ssl.all.build.sslflags=
|
||||
oak.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -5907,6 +6016,10 @@ wifiduino.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
wifiduino.menu.exception.enabled=Enabled
|
||||
wifiduino.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
wifiduino.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
wifiduino.menu.stacksmash.disabled=Disabled
|
||||
wifiduino.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
wifiduino.menu.stacksmash.enabled=Enabled
|
||||
wifiduino.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
wifiduino.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
wifiduino.menu.ssl.all.build.sslflags=
|
||||
wifiduino.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -6100,6 +6213,10 @@ wifi_slot.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
wifi_slot.menu.exception.enabled=Enabled
|
||||
wifi_slot.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
wifi_slot.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
wifi_slot.menu.stacksmash.disabled=Disabled
|
||||
wifi_slot.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
wifi_slot.menu.stacksmash.enabled=Enabled
|
||||
wifi_slot.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
wifi_slot.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
wifi_slot.menu.ssl.all.build.sslflags=
|
||||
wifi_slot.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -6407,6 +6524,10 @@ wiolink.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
wiolink.menu.exception.enabled=Enabled
|
||||
wiolink.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
wiolink.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
wiolink.menu.stacksmash.disabled=Disabled
|
||||
wiolink.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
wiolink.menu.stacksmash.enabled=Enabled
|
||||
wiolink.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
wiolink.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
wiolink.menu.ssl.all.build.sslflags=
|
||||
wiolink.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -6600,6 +6721,10 @@ espectro.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
espectro.menu.exception.enabled=Enabled
|
||||
espectro.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
espectro.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
espectro.menu.stacksmash.disabled=Disabled
|
||||
espectro.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
espectro.menu.stacksmash.enabled=Enabled
|
||||
espectro.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
espectro.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
espectro.menu.ssl.all.build.sslflags=
|
||||
espectro.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -6793,6 +6918,10 @@ eduinowifi.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
eduinowifi.menu.exception.enabled=Enabled
|
||||
eduinowifi.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
eduinowifi.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
eduinowifi.menu.stacksmash.disabled=Disabled
|
||||
eduinowifi.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
eduinowifi.menu.stacksmash.enabled=Enabled
|
||||
eduinowifi.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
eduinowifi.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
eduinowifi.menu.ssl.all.build.sslflags=
|
||||
eduinowifi.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -6996,6 +7125,10 @@ sonoff.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
sonoff.menu.exception.enabled=Enabled
|
||||
sonoff.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
sonoff.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
sonoff.menu.stacksmash.disabled=Disabled
|
||||
sonoff.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
sonoff.menu.stacksmash.enabled=Enabled
|
||||
sonoff.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
sonoff.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
sonoff.menu.ssl.all.build.sslflags=
|
||||
sonoff.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
@ -7230,6 +7363,10 @@ espmxdevkit.menu.exception.disabled.build.stdcpp_lib=-lstdc++
|
||||
espmxdevkit.menu.exception.enabled=Enabled
|
||||
espmxdevkit.menu.exception.enabled.build.exception_flags=-fexceptions
|
||||
espmxdevkit.menu.exception.enabled.build.stdcpp_lib=-lstdc++-exc
|
||||
espmxdevkit.menu.stacksmash.disabled=Disabled
|
||||
espmxdevkit.menu.stacksmash.disabled.build.stacksmash_flags=
|
||||
espmxdevkit.menu.stacksmash.enabled=Enabled
|
||||
espmxdevkit.menu.stacksmash.enabled.build.stacksmash_flags=-fstack-protector
|
||||
espmxdevkit.menu.ssl.all=All SSL ciphers (most compatible)
|
||||
espmxdevkit.menu.ssl.all.build.sslflags=
|
||||
espmxdevkit.menu.ssl.basic=Basic SSL ciphers (lower ROM use)
|
||||
|
@ -23,7 +23,7 @@ INC += -I../../tools/sdk/include -I../../tools/sdk/uzlib/src
|
||||
|
||||
CFLAGS += -std=gnu99
|
||||
|
||||
CFLAGS += -Os -g -Wall -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -ffunction-sections -fdata-sections
|
||||
CFLAGS += -Os -fcommon -g -Wall -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -ffunction-sections -fdata-sections
|
||||
|
||||
CFLAGS += $(INC)
|
||||
|
||||
|
Binary file not shown.
@ -127,14 +127,8 @@ void timer0_isr_init(void);
|
||||
void timer0_attachInterrupt(timercallback userFunc);
|
||||
void timer0_detachInterrupt(void);
|
||||
|
||||
// undefine stdlib's abs if encountered
|
||||
#ifdef abs
|
||||
#undef abs
|
||||
#endif
|
||||
|
||||
#define abs(x) ((x)>0?(x):-(x))
|
||||
// Use stdlib abs() and round() to avoid issues with the C++ libraries
|
||||
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
|
||||
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
|
||||
#define radians(deg) ((deg)*DEG_TO_RAD)
|
||||
#define degrees(rad) ((rad)*RAD_TO_DEG)
|
||||
#define sq(x) ((x)*(x))
|
||||
@ -249,6 +243,7 @@ const int TIM_DIV265 __attribute__((deprecated, weak)) = TIM_DIV256;
|
||||
|
||||
using std::min;
|
||||
using std::max;
|
||||
using std::round;
|
||||
using std::isinf;
|
||||
using std::isnan;
|
||||
|
||||
|
@ -51,7 +51,7 @@ extern uint32_t stack_thunk_refcnt;
|
||||
|
||||
// Thunking macro
|
||||
#define make_stack_thunk(fcnToThunk) \
|
||||
__asm("\n\
|
||||
__asm__ ("\n\
|
||||
.text\n\
|
||||
.literal_position\n\
|
||||
.literal .LC_STACK_VALUE"#fcnToThunk", 0xdeadbeef\n\
|
||||
|
@ -37,8 +37,9 @@ void precache(void *f, uint32_t bytes) {
|
||||
// page (ie 1 word in 8) for this to work.
|
||||
#define CACHE_PAGE_SIZE 32
|
||||
|
||||
register uint32_t a0 asm("a0");
|
||||
register uint32_t lines = (bytes/CACHE_PAGE_SIZE)+2;
|
||||
uint32_t a0;
|
||||
__asm__("mov.n %0, a0" : "=r"(a0));
|
||||
uint32_t lines = (bytes/CACHE_PAGE_SIZE)+2;
|
||||
volatile uint32_t *p = (uint32_t*)((f ? (uint32_t)f : a0) & ~0x03);
|
||||
uint32_t x;
|
||||
for (uint32_t i=0; i<lines; i++, p+=CACHE_PAGE_SIZE/sizeof(uint32_t)) x=*p;
|
||||
|
@ -172,7 +172,7 @@ extern "C" bool ets_post_rom(uint8 prio, ETSSignal sig, ETSParam par);
|
||||
|
||||
extern "C" bool IRAM_ATTR ets_post(uint8 prio, ETSSignal sig, ETSParam par) {
|
||||
uint32_t saved;
|
||||
asm volatile ("rsr %0,ps":"=a" (saved));
|
||||
__asm__ __volatile__ ("rsr %0,ps":"=a" (saved));
|
||||
bool rc=ets_post_rom(prio, sig, par);
|
||||
xt_wsr_ps(saved);
|
||||
return rc;
|
||||
|
@ -45,6 +45,8 @@ static const char* s_panic_what = 0;
|
||||
static bool s_abort_called = false;
|
||||
static const char* s_unhandled_exception = NULL;
|
||||
|
||||
static uint32_t s_stacksmash_addr = 0;
|
||||
|
||||
void abort() __attribute__((noreturn));
|
||||
static void uart_write_char_d(char c);
|
||||
static void uart0_write_char_d(char c);
|
||||
@ -54,6 +56,7 @@ static void print_stack(uint32_t start, uint32_t end);
|
||||
// using numbers different from "REASON_" in user_interface.h (=0..6)
|
||||
enum rst_reason_sw
|
||||
{
|
||||
REASON_USER_STACK_SMASH = 253,
|
||||
REASON_USER_SWEXCEPTION_RST = 254
|
||||
};
|
||||
static int s_user_reset_reason = REASON_DEFAULT_RST;
|
||||
@ -146,6 +149,11 @@ void __wrap_system_restart_local() {
|
||||
}
|
||||
else if (rst_info.reason == REASON_SOFT_WDT_RST) {
|
||||
ets_printf_P(PSTR("\nSoft WDT reset\n"));
|
||||
}
|
||||
else if (rst_info.reason == REASON_USER_STACK_SMASH) {
|
||||
ets_printf_P(PSTR("\nStack overflow detected.\n"));
|
||||
ets_printf_P(PSTR("\nException (%d):\nepc1=0x%08x epc2=0x%08x epc3=0x%08x excvaddr=0x%08x depc=0x%08x\n"),
|
||||
5 /* Alloca exception, closest thing to stack fault*/, s_stacksmash_addr, 0, 0, 0, 0);
|
||||
}
|
||||
else {
|
||||
ets_printf_P(PSTR("\nGeneric Reset\n"));
|
||||
@ -290,4 +298,20 @@ void __panic_func(const char* file, int line, const char* func) {
|
||||
raise_exception();
|
||||
}
|
||||
|
||||
uintptr_t __stack_chk_guard = 0x08675309 ^ RANDOM_REG32;
|
||||
void __stack_chk_fail(void) {
|
||||
s_user_reset_reason = REASON_USER_STACK_SMASH;
|
||||
ets_printf_P(PSTR("\nPANIC: Stack overrun"));
|
||||
|
||||
s_stacksmash_addr = (uint32_t)__builtin_return_address(0);
|
||||
|
||||
if (gdb_present())
|
||||
__asm__ __volatile__ ("syscall"); // triggers GDB when enabled
|
||||
|
||||
__wrap_system_restart_local();
|
||||
|
||||
while (1); // never reached, needed to satisfy "noreturn" attribute
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
@ -234,7 +234,7 @@ void ICACHE_RAM_ATTR Twi::busywait(unsigned int v)
|
||||
unsigned int i;
|
||||
for (i = 0; i < v; i++) // loop time is 5 machine cycles: 31.25ns @ 160MHz, 62.5ns @ 80MHz
|
||||
{
|
||||
asm("nop"); // minimum element to keep GCC from optimizing this function out.
|
||||
__asm__ __volatile__("nop"); // minimum element to keep GCC from optimizing this function out.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,8 +31,9 @@ extern "C" {
|
||||
|
||||
static volatile timercallback timer1_user_cb = NULL;
|
||||
|
||||
void ICACHE_RAM_ATTR timer1_isr_handler(void *para){
|
||||
void ICACHE_RAM_ATTR timer1_isr_handler(void *para, void *frame) {
|
||||
(void) para;
|
||||
(void) frame;
|
||||
if ((T1C & ((1 << TCAR) | (1 << TCIT))) == 0) TEIE &= ~TEIE1;//edge int disable
|
||||
T1I = 0;
|
||||
if (timer1_user_cb) {
|
||||
@ -79,8 +80,9 @@ void ICACHE_RAM_ATTR timer1_disable(){
|
||||
|
||||
static volatile timercallback timer0_user_cb = NULL;
|
||||
|
||||
void ICACHE_RAM_ATTR timer0_isr_handler(void* para){
|
||||
void ICACHE_RAM_ATTR timer0_isr_handler(void *para, void *frame) {
|
||||
(void) para;
|
||||
(void) frame;
|
||||
if (timer0_user_cb) {
|
||||
// to make ISR compatible to Arduino AVR model where interrupts are disabled
|
||||
// we disable them before we call the client ISR
|
||||
|
@ -130,8 +130,10 @@ typedef struct {
|
||||
static interrupt_handler_t interrupt_handlers[16] = { {0, 0, 0, 0}, };
|
||||
static uint32_t interrupt_reg = 0;
|
||||
|
||||
void ICACHE_RAM_ATTR interrupt_handler(void*)
|
||||
void ICACHE_RAM_ATTR interrupt_handler(void *arg, void *frame)
|
||||
{
|
||||
(void) arg;
|
||||
(void) frame;
|
||||
uint32_t status = GPIE;
|
||||
GPIEC = status;//clear them interrupts
|
||||
uint32_t levels = GPI;
|
||||
|
@ -31,6 +31,11 @@ static bool ICACHE_RAM_ATTR __gdb_no_op()
|
||||
return false;
|
||||
}
|
||||
|
||||
// To save space, don't create a dummy no-op for each GCC, just point to the no-op
|
||||
// Need to turn off GCC's checking of parameter types or we'll get many warnings
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wattribute-alias"
|
||||
#pragma GCC diagnostic ignored "-Wmissing-attributes"
|
||||
void gdb_init(void) __attribute__ ((weak, alias("__gdb_no_op")));
|
||||
void gdb_do_break(void) __attribute__ ((weak, alias("__gdb_no_op")));
|
||||
bool gdb_present(void) __attribute__ ((weak, alias("__gdb_no_op")));
|
||||
@ -40,5 +45,6 @@ bool gdbstub_has_uart_isr_control(void) __attribute__ ((weak, alias("__gdb_no_op
|
||||
void gdbstub_set_uart_isr_callback(void (*func)(void*, uint8_t), void* arg) __attribute__ ((weak, alias("__gdb_no_op")));
|
||||
void gdbstub_write_char(char c) __attribute__ ((weak, alias("__gdb_no_op")));
|
||||
void gdbstub_write(const char* buf, size_t size) __attribute__ ((weak, alias("__gdb_no_op")));
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
};
|
||||
|
@ -371,8 +371,9 @@ uart_get_rx_buffer_size(uart_t* uart)
|
||||
|
||||
// The default ISR handler called when GDB is not enabled
|
||||
void ICACHE_RAM_ATTR
|
||||
uart_isr(void * arg)
|
||||
uart_isr(void * arg, void * frame)
|
||||
{
|
||||
(void) frame;
|
||||
uart_t* uart = (uart_t*)arg;
|
||||
uint32_t usis = USIS(uart->uart_nr);
|
||||
|
||||
|
@ -445,7 +445,7 @@ static inline int gdbHandleCommand() {
|
||||
writeByte(i, gdbGetHexVal(&data, 8));
|
||||
}
|
||||
//Make sure caches are up-to-date. Procedure according to Xtensa ISA document, ISYNC inst desc.
|
||||
asm volatile("ISYNC\nISYNC\n");
|
||||
__asm__ __volatile__ ("ISYNC\nISYNC\n");
|
||||
gdbSendPacketOK();
|
||||
} else {
|
||||
//Trying to do a software breakpoint on a flash proc, perhaps?
|
||||
|
@ -28,8 +28,9 @@ static void (*_hspi_slave_rx_status_cb)(void * arg, uint32_t data) = NULL;
|
||||
static void (*_hspi_slave_tx_status_cb)(void * arg) = NULL;
|
||||
static uint8_t _hspi_slave_buffer[33];
|
||||
|
||||
void ICACHE_RAM_ATTR _hspi_slave_isr_handler(void *arg)
|
||||
void ICACHE_RAM_ATTR _hspi_slave_isr_handler(void *arg, void *frame)
|
||||
{
|
||||
(void) frame;
|
||||
uint32_t status;
|
||||
uint32_t istatus;
|
||||
|
||||
|
@ -74,16 +74,22 @@ public:
|
||||
template<typename TArg>
|
||||
void attach(float seconds, void (*callback)(TArg), TArg arg)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)");
|
||||
_attach_ms(1000UL * seconds, true, reinterpret_cast<callback_with_arg_t>(callback), reinterpret_cast<void*>(arg));
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
// callback will be called in SYS ctx when ticker fires
|
||||
template<typename TArg>
|
||||
void attach_ms(uint32_t milliseconds, void (*callback)(TArg), TArg arg)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
static_assert(sizeof(TArg) <= sizeof(void*), "attach() callback argument size must be <= sizeof(void*)");
|
||||
_attach_ms(milliseconds, true, reinterpret_cast<callback_with_arg_t>(callback), reinterpret_cast<void*>(arg));
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
// callback will be called at following loop() after ticker fires
|
||||
|
@ -123,19 +123,14 @@
|
||||
"toolsDependencies": [
|
||||
{
|
||||
"packager": "esp8266",
|
||||
"version": "2.5.0-4-b40a506",
|
||||
"version": "3.0.0-gnu12-dc7f933",
|
||||
"name": "xtensa-lx106-elf-gcc"
|
||||
},
|
||||
{
|
||||
"packager": "esp8266",
|
||||
"version": "2.5.0-4-b40a506",
|
||||
"version": "3.0.0-gnu12-dc7f933",
|
||||
"name": "mkspiffs"
|
||||
},
|
||||
{
|
||||
"packager": "esp8266",
|
||||
"version": "2.5.0-4-fe5bb56",
|
||||
"name": "mklittlefs"
|
||||
},
|
||||
{
|
||||
"packager": "esp8266",
|
||||
"version": "3.7.2-post1",
|
||||
@ -204,174 +199,167 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.5.0-4-b40a506",
|
||||
"version": "3.0.0-gnu12-dc7f933",
|
||||
"name": "xtensa-lx106-elf-gcc",
|
||||
"systems": [
|
||||
{
|
||||
"host": "aarch64-linux-gnu",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
|
||||
"archiveFileName": "aarch64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:88c5e9a813bd01c97fe2a07a7280e0685cf18a937ad3ea756d33f8bfbbcbfec3",
|
||||
"size": "40983153"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/aarch64-linux-gnu.xtensa-lx106-elf-0474ae9.200706.tar.gz",
|
||||
"archiveFileName": "aarch64-linux-gnu.xtensa-lx106-elf-0474ae9.200706.tar.gz",
|
||||
"checksum": "SHA-256:942bb00a70a82f3a91a278da8d9e9064e82d2cb5e4663c61887ee26c3aba5890",
|
||||
"size": "70854850"
|
||||
},
|
||||
{
|
||||
"host": "arm-linux-gnueabihf",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/arm-linux-gnueabihf.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
|
||||
"archiveFileName": "arm-linux-gnueabihf.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:244d958e2532e5e1195aa6c8bb38e6fcf1601d88b67631a371d93c818a5a5b65",
|
||||
"size": "37027468"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/arm-linux-gnueabihf.xtensa-lx106-elf-0474ae9.200706.tar.gz",
|
||||
"archiveFileName": "arm-linux-gnueabihf.xtensa-lx106-elf-0474ae9.200706.tar.gz",
|
||||
"checksum": "SHA-256:440c17e590ae3b2ec756c746a925e7d5f375f371e424513f05c2925695e9b3d9",
|
||||
"size": "66929315"
|
||||
},
|
||||
{
|
||||
"host": "i686-pc-linux-gnu",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
|
||||
"archiveFileName": "i686-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:7c84fa929231d2467060b82ba51599cfb227dea1ac58964c74d46800ac33ba47",
|
||||
"size": "42926131"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/i686-linux-gnu.xtensa-lx106-elf-0474ae9.200706.tar.gz",
|
||||
"archiveFileName": "i686-linux-gnu.xtensa-lx106-elf-0474ae9.200706.tar.gz",
|
||||
"checksum": "SHA-256:fa8fad65bc0d986ced6143efd31d00a50f1ef2a0bbb41c5ee8ea2e01055da627",
|
||||
"size": "74021024"
|
||||
},
|
||||
{
|
||||
"host": "i686-mingw32",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-w64-mingw32.xtensa-lx106-elf-b40a506.1563313032.zip",
|
||||
"archiveFileName": "i686-w64-mingw32.xtensa-lx106-elf-b40a506.1563313032.zip",
|
||||
"checksum": "SHA-256:694680c2215a65364748ca876c701479580c017757cd8ed6c3df0d48c2f7bd79",
|
||||
"size": "44955630"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/i686-w64-mingw32.xtensa-lx106-elf-0474ae9.200706.zip",
|
||||
"archiveFileName": "i686-w64-mingw32.xtensa-lx106-elf-0474ae9.200706.zip",
|
||||
"checksum": "SHA-256:e2473efcf864bbce641094e9adb2ea58f2076f815dfc092b882733201a3dabdf",
|
||||
"size": "71049719"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-apple-darwin",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-apple-darwin14.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
|
||||
"archiveFileName": "x86_64-apple-darwin14.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:ddf7a7ea4d53469918671ea662cf529dae5b255f06054db17621b34c71710641",
|
||||
"size": "44393288"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-apple-darwin14.xtensa-lx106-elf-0474ae9.200706.tar.gz",
|
||||
"archiveFileName": "x86_64-apple-darwin14.xtensa-lx106-elf-0474ae9.200706.tar.gz",
|
||||
"checksum": "SHA-256:2a10610dbcfd27ffe865a6283d363cbb95be2f0980b6518231aebb42bc662235",
|
||||
"size": "75441014"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-pc-linux-gnu",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
|
||||
"archiveFileName": "x86_64-linux-gnu.xtensa-lx106-elf-b40a506.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:90e04da49be288f36097d231e2f46ac46204a7640507011358f8f72c04700080",
|
||||
"size": "43790957"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-linux-gnu.xtensa-lx106-elf-0474ae9.200706.tar.gz",
|
||||
"archiveFileName": "x86_64-linux-gnu.xtensa-lx106-elf-0474ae9.200706.tar.gz",
|
||||
"checksum": "SHA-256:3feba2c3e9b5a604c397d6631cb75e914eecc2e1de278d2be7ea1ebca19358e8",
|
||||
"size": "74546227"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-mingw32",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-w64-mingw32.xtensa-lx106-elf-b40a506.1563313032.zip",
|
||||
"archiveFileName": "x86_64-w64-mingw32.xtensa-lx106-elf-b40a506.1563313032.zip",
|
||||
"checksum": "SHA-256:01c31cd521b058e0805b9d1f3728798a42b1a217a7a34debcda3fcba23414b0e",
|
||||
"size": "48656678"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-w64-mingw32.xtensa-lx106-elf-0474ae9.200706.zip",
|
||||
"archiveFileName": "x86_64-w64-mingw32.xtensa-lx106-elf-0474ae9.200706.zip",
|
||||
"checksum": "SHA-256:cc1cbaa836969362ad5c6fa799306407d62caa3c1e0e9a493c3be87265201348",
|
||||
"size": "75023572"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.5.0-4-b40a506",
|
||||
"version": "3.0.0-gnu12-dc7f933",
|
||||
"name": "mkspiffs",
|
||||
"systems": [
|
||||
{
|
||||
"host": "aarch64-linux-gnu",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
|
||||
"archiveFileName": "aarch64-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:49cc1938d5df2bec3eec0b3bf2c84ab887c379b04973a67705c80cf1dec523b3",
|
||||
"size": "51017"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/aarch64-linux-gnu.mkspiffs-7fefeac.200706.tar.gz",
|
||||
"archiveFileName": "aarch64-linux-gnu.mkspiffs-7fefeac.200706.tar.gz",
|
||||
"checksum": "SHA-256:a214959ea28f25cf1c1421d06cc1cc62b595f9814eb8fbd243ac75e51a902c51",
|
||||
"size": "51253"
|
||||
},
|
||||
{
|
||||
"host": "arm-linux-gnueabihf",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/arm-linux-gnueabihf.mkspiffs-7fefeac.1563313032.tar.gz",
|
||||
"archiveFileName": "arm-linux-gnueabihf.mkspiffs-7fefeac.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:084518fe5452bc2a33c346e3f0825a7c42e36bdb41ee3320f767a248452813be",
|
||||
"size": "44050"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/arm-linux-gnueabihf.mkspiffs-7fefeac.200706.tar.gz",
|
||||
"archiveFileName": "arm-linux-gnueabihf.mkspiffs-7fefeac.200706.tar.gz",
|
||||
"checksum": "SHA-256:937b5165ee390068d9d37b448104fa4c86ebfb733daca9a04319d43a782476f3",
|
||||
"size": "44265"
|
||||
},
|
||||
{
|
||||
"host": "i686-pc-linux-gnu",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
|
||||
"archiveFileName": "i686-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:d121a44416db8c9772372978f5accd13fe5a926fd17faf55a8dce23744dfc88c",
|
||||
"size": "54278"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/i686-linux-gnu.mkspiffs-7fefeac.200706.tar.gz",
|
||||
"archiveFileName": "i686-linux-gnu.mkspiffs-7fefeac.200706.tar.gz",
|
||||
"checksum": "SHA-256:79b89d134da9f786e7dba3b984280d679a47d4605c46bfa72c5d65addbf889c1",
|
||||
"size": "54512"
|
||||
},
|
||||
{
|
||||
"host": "i686-mingw32",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-w64-mingw32.mkspiffs-7fefeac.1563313032.zip",
|
||||
"archiveFileName": "i686-w64-mingw32.mkspiffs-7fefeac.1563313032.zip",
|
||||
"checksum": "SHA-256:3e0fd9212027cba06e362ae6921f48d252834996d81e1ade41d5b5c54735837a",
|
||||
"size": "337874"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/i686-w64-mingw32.mkspiffs-7fefeac.200706.zip",
|
||||
"archiveFileName": "i686-w64-mingw32.mkspiffs-7fefeac.200706.zip",
|
||||
"checksum": "SHA-256:2969a7e9b4c83f75938494c75945c767ab2e31206c0196d0a0eb9bb165697a94",
|
||||
"size": "338191"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-apple-darwin",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-apple-darwin14.mkspiffs-7fefeac.1563313032.tar.gz",
|
||||
"archiveFileName": "x86_64-apple-darwin14.mkspiffs-7fefeac.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:efa480b351be563d35bd6a9bee809cd860f49efd26df711500df02b61460e19c",
|
||||
"size": "368555"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-apple-darwin14.mkspiffs-7fefeac.200706.tar.gz",
|
||||
"archiveFileName": "x86_64-apple-darwin14.mkspiffs-7fefeac.200706.tar.gz",
|
||||
"checksum": "SHA-256:02de9f7783c7425973a940e25752de908e20c49bfcf40ea1ae85d486f0f8061a",
|
||||
"size": "368766"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-pc-linux-gnu",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
|
||||
"archiveFileName": "x86_64-linux-gnu.mkspiffs-7fefeac.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:238f9936f5b39f747602becfe90fae0ed6b31e63ea1fa6f5da062fcb33e0aae9",
|
||||
"size": "52429"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-linux-gnu.mkspiffs-7fefeac.200706.tar.gz",
|
||||
"archiveFileName": "x86_64-linux-gnu.mkspiffs-7fefeac.200706.tar.gz",
|
||||
"checksum": "SHA-256:761da6e3b5c5bbd9a7ed04a64ca13da7e87148e9646a1a1a9153c31c93b11ab9",
|
||||
"size": "52645"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-mingw32",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-w64-mingw32.mkspiffs-7fefeac.1563313032.zip",
|
||||
"archiveFileName": "x86_64-w64-mingw32.mkspiffs-7fefeac.1563313032.zip",
|
||||
"checksum": "SHA-256:1c71a7ce71bd39fb83bfab138388adca8c1f9b798e09efd9932aa99d26c04c9b",
|
||||
"size": "350035"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-w64-mingw32.mkspiffs-7fefeac.200706.zip",
|
||||
"archiveFileName": "x86_64-w64-mingw32.mkspiffs-7fefeac.200706.zip",
|
||||
"checksum": "SHA-256:9017ebfdd74b0784d95ccc7b9647135fecf99008a99784c0dfd656fe22ddcd38",
|
||||
"size": "350353"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "2.5.0-4-fe5bb56",
|
||||
"version": "3.0.0-gnu12-dc7f933",
|
||||
"name": "mklittlefs",
|
||||
"systems": [
|
||||
{
|
||||
"host": "aarch64-linux-gnu",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/aarch64-linux-gnu.mklittlefs-fe5bb56.1578453304.tar.gz",
|
||||
"archiveFileName": "aarch64-linux-gnu.mklittlefs-fe5bb56.1578453304.tar.gz",
|
||||
"checksum": "SHA-256:ac50bae3b580053ba98a181ae3700fafd2b2f8a37ed9c16bc22a5d7c1659388e",
|
||||
"size": "44433"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/aarch64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz",
|
||||
"archiveFileName": "aarch64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz",
|
||||
"checksum": "SHA-256:fc56e389383749e4cf4fab0fcf75cc0ebc41e59383caf6c2eff1c3d9794af200",
|
||||
"size": "44651"
|
||||
},
|
||||
{
|
||||
"host": "arm-linux-gnueabihf",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/arm-linux-gnueabihf.mklittlefs-fe5bb56.1578453304.tar.gz",
|
||||
"archiveFileName": "arm-linux-gnueabihf.mklittlefs-fe5bb56.1578453304.tar.gz",
|
||||
"checksum": "SHA-256:092555612e7e229fbe622df75db70560896c3aea8d0ac2e5fa16d92dc16857cf",
|
||||
"size": "36917"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/arm-linux-gnueabihf.mklittlefs-c41e51a.200706.tar.gz",
|
||||
"archiveFileName": "arm-linux-gnueabihf.mklittlefs-c41e51a.200706.tar.gz",
|
||||
"checksum": "SHA-256:52b642dd0545eb3bd8dfb75dde6601df21700e4867763fd2696274be279294c5",
|
||||
"size": "37211"
|
||||
},
|
||||
{
|
||||
"host": "i686-pc-linux-gnu",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-linux-gnu.mklittlefs-fe5bb56.1578453304.tar.gz",
|
||||
"archiveFileName": "i686-linux-gnu.mklittlefs-fe5bb56.1578453304.tar.gz",
|
||||
"checksum": "SHA-256:060e2525223269d2a5d01055542ff36837f0b19598d78cb02d58563aeda441cd",
|
||||
"size": "47833"
|
||||
},
|
||||
{
|
||||
"host": "i686-pc-linux-gnu",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-linux-gnu.mklittlefs-7f77f2b.1563313032.tar.gz",
|
||||
"archiveFileName": "i686-linux-gnu.mklittlefs-7f77f2b.1563313032.tar.gz",
|
||||
"checksum": "SHA-256:022c96df4d110f957d43f6d23e9c5e8b699a66d8ab041056dd5da7411a8ade42",
|
||||
"size": "47544"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/i686-linux-gnu.mklittlefs-c41e51a.200706.tar.gz",
|
||||
"archiveFileName": "i686-linux-gnu.mklittlefs-c41e51a.200706.tar.gz",
|
||||
"checksum": "SHA-256:7886051d8ccc54aed0af2e7cdf6ff992bb51638df86f3b545955697720b6d062",
|
||||
"size": "48033"
|
||||
},
|
||||
{
|
||||
"host": "i686-mingw32",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/i686-w64-mingw32.mklittlefs-fe5bb56.1578453304.zip",
|
||||
"archiveFileName": "i686-w64-mingw32.mklittlefs-fe5bb56.1578453304.zip",
|
||||
"checksum": "SHA-256:2e570bed4ec59a9ecc73290e16c31ed53ee15e3abd8c82cb038b2148596d112e",
|
||||
"size": "332329"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/i686-w64-mingw32.mklittlefs-c41e51a.200706.zip",
|
||||
"archiveFileName": "i686-w64-mingw32.mklittlefs-c41e51a.200706.zip",
|
||||
"checksum": "SHA-256:43740db30ce451454f2337331f10ab4ed41bd83dbf0fa0cb4387107388b59f42",
|
||||
"size": "332655"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-apple-darwin",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-apple-darwin14.mklittlefs-fe5bb56.1578453304.tar.gz",
|
||||
"archiveFileName": "x86_64-apple-darwin14.mklittlefs-fe5bb56.1578453304.tar.gz",
|
||||
"checksum": "SHA-256:fcb57ff58eceac79e988cc26a9e009a11ebda68d4ae97e44fed8e7c6d98a35b5",
|
||||
"size": "362389"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-apple-darwin14.mklittlefs-c41e51a.200706.tar.gz",
|
||||
"archiveFileName": "x86_64-apple-darwin14.mklittlefs-c41e51a.200706.tar.gz",
|
||||
"checksum": "SHA-256:e3edd5e05b70db3c7df6b9d626558348ad04804022fe955c799aeb51808c7dc3",
|
||||
"size": "362608"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-pc-linux-gnu",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-linux-gnu.mklittlefs-fe5bb56.1578453304.tar.gz",
|
||||
"archiveFileName": "x86_64-linux-gnu.mklittlefs-fe5bb56.1578453304.tar.gz",
|
||||
"checksum": "SHA-256:5ef79d76e8e76f8287dc70d10c33f020d4cf5320354571adf666665eeef2e2de",
|
||||
"size": "46580"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz",
|
||||
"archiveFileName": "x86_64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz",
|
||||
"checksum": "SHA-256:66e84dda0aad747517da3785125e05738a540948aab2b7eaa02855167a1eea53",
|
||||
"size": "46778"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-mingw32",
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/2.5.0-4/x86_64-w64-mingw32.mklittlefs-fe5bb56.1578453304.zip",
|
||||
"archiveFileName": "x86_64-w64-mingw32.mklittlefs-fe5bb56.1578453304.zip",
|
||||
"checksum": "SHA-256:a460f410a22a59e23d7f862b8d08d6b7dfbc93aa558f8161a3d640d4df2ab86f",
|
||||
"size": "344792"
|
||||
"url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/x86_64-w64-mingw32.mklittlefs-c41e51a.200706.zip",
|
||||
"archiveFileName": "x86_64-w64-mingw32.mklittlefs-c41e51a.200706.zip",
|
||||
"checksum": "SHA-256:2e319077491f8e832e96eb4f2f7a70dd919333cee4b388c394e0e848d031d542",
|
||||
"size": "345132"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -35,7 +35,9 @@ build.sslflags=
|
||||
|
||||
build.exception_flags=-fno-exceptions
|
||||
build.stdcpp_lib=-lstdc++
|
||||
build.stdcpp_level=-std=gnu++11
|
||||
build.stdcpp_level=-std=gnu++17
|
||||
|
||||
build.stacksmash=
|
||||
|
||||
build.float=-u _printf_float -u _scanf_float
|
||||
build.led=
|
||||
@ -53,7 +55,7 @@ compiler.libc.path={runtime.platform.path}/tools/sdk/libc/xtensa-lx106-elf
|
||||
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/{build.lwip_include}" "-I{compiler.libc.path}/include" "-I{build.path}/core"
|
||||
|
||||
compiler.c.cmd=xtensa-lx106-elf-gcc
|
||||
compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections {build.exception_flags} {build.sslflags}
|
||||
compiler.c.flags=-c {compiler.warning_flags} -std=c17 {build.stacksmash_flags} -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -ffunction-sections -fdata-sections {build.exception_flags} {build.sslflags}
|
||||
|
||||
compiler.S.cmd=xtensa-lx106-elf-gcc
|
||||
compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls
|
||||
@ -64,7 +66,7 @@ compiler.c.elf.cmd=xtensa-lx106-elf-gcc
|
||||
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -lbearssl -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 {build.stdcpp_lib} -lm -lc -lgcc
|
||||
|
||||
compiler.cpp.cmd=xtensa-lx106-elf-g++
|
||||
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 {build.stdcpp_level} -MMD -ffunction-sections -fdata-sections {build.exception_flags} {build.sslflags}
|
||||
compiler.cpp.flags=-c {compiler.warning_flags} {build.stacksmash_flags} -Os -g -mlongcalls -mtext-section-literals -fno-rtti -falign-functions=4 {build.stdcpp_level} -MMD -ffunction-sections -fdata-sections {build.exception_flags} {build.sslflags}
|
||||
|
||||
compiler.as.cmd=xtensa-lx106-elf-as
|
||||
|
||||
|
@ -8,6 +8,12 @@ function install_platformio()
|
||||
{
|
||||
pip3 install --user -U https://github.com/platformio/platformio/archive/develop.zip
|
||||
platformio platform install "https://github.com/platformio/platform-espressif8266.git"
|
||||
# Overwrite toolchain with this PR's toolset. Probably better way to do this
|
||||
( cd $TRAVIS_BUILD_DIR/tools && python3 get.py )
|
||||
mv ~/.platformio/packages/toolchain-xtensa/package.json .save
|
||||
rm -rf ~/.platformio/packages/toolchain-xtensa
|
||||
mv $TRAVIS_BUILD_DIR/tools/xtensa-lx106-elf ~/.platformio/packages/toolchain-xtensa
|
||||
mv .save ~/.platformio/packages/toolchain-xtensa/package.json
|
||||
python -c "import json; import os; fp=open(os.path.expanduser('~/.platformio/platforms/espressif8266/platform.json'), 'r+'); data=json.load(fp); data['packages']['framework-arduinoespressif8266']['version'] = '*'; fp.seek(0); fp.truncate(); json.dump(data, fp); fp.close()"
|
||||
ln -sf $TRAVIS_BUILD_DIR ~/.platformio/packages/framework-arduinoespressif8266
|
||||
# Install dependencies:
|
||||
|
@ -1006,6 +1006,13 @@ macros = {
|
||||
( '.menu.exception.enabled.build.stdcpp_lib', '-lstdc++-exc' ),
|
||||
]),
|
||||
|
||||
'stacksmash_menu': collections.OrderedDict([
|
||||
( '.menu.stacksmash.disabled', 'Disabled' ),
|
||||
( '.menu.stacksmash.disabled.build.stacksmash_flags', '' ),
|
||||
( '.menu.stacksmash.enabled', 'Enabled' ),
|
||||
( '.menu.stacksmash.enabled.build.stacksmash_flags', '-fstack-protector' ),
|
||||
]),
|
||||
|
||||
'crystalfreq_menu': collections.OrderedDict([
|
||||
( '.menu.CrystalFreq.26', '26 MHz' ),
|
||||
( '.menu.CrystalFreq.40', '40 MHz' ),
|
||||
@ -1566,6 +1573,7 @@ def all_boards ():
|
||||
print('menu.ip=lwIP Variant')
|
||||
print('menu.vt=VTables')
|
||||
print('menu.exception=Exceptions')
|
||||
print('menu.stacksmash=Stack Protection')
|
||||
print('menu.wipe=Erase Flash')
|
||||
print('menu.sdk=Espressif FW')
|
||||
print('menu.ssl=SSL Support')
|
||||
@ -1587,7 +1595,7 @@ def all_boards ():
|
||||
print(id + optname + '=' + board['opts'][optname])
|
||||
|
||||
# macros
|
||||
macrolist = [ 'defaults', 'cpufreq_menu', 'vtable_menu', 'exception_menu', 'ssl_cipher_menu' ]
|
||||
macrolist = [ 'defaults', 'cpufreq_menu', 'vtable_menu', 'exception_menu', 'stacksmash_menu', 'ssl_cipher_menu' ]
|
||||
if 'macro' in board:
|
||||
macrolist += board['macro']
|
||||
if lwip == 2:
|
||||
|
@ -54,7 +54,7 @@ env.Append(
|
||||
ASFLAGS=["-x", "assembler-with-cpp"],
|
||||
|
||||
CFLAGS=[
|
||||
"-std=gnu99",
|
||||
"-std=c17",
|
||||
"-Wpointer-arith",
|
||||
"-Wno-implicit-function-declaration",
|
||||
"-Wl,-EL",
|
||||
@ -76,7 +76,7 @@ env.Append(
|
||||
|
||||
CXXFLAGS=[
|
||||
"-fno-rtti",
|
||||
"-std=c++11"
|
||||
"-std=gnu++17"
|
||||
],
|
||||
|
||||
LINKFLAGS=[
|
||||
|
@ -70,7 +70,9 @@ typedef struct _ETSTIMER_ {
|
||||
|
||||
/* interrupt related */
|
||||
|
||||
typedef void (*int_handler_t)(void*);
|
||||
// The xtos_1int handler calls with param1 as the arg, param2 as a pointer
|
||||
// to an exception frame in memory.
|
||||
typedef void (*int_handler_t)(void*, void*);
|
||||
|
||||
#define ETS_SLC_INUM 1
|
||||
#define ETS_SDIO_INUM 1
|
||||
@ -83,11 +85,11 @@ typedef void (*int_handler_t)(void*);
|
||||
#define ETS_WDT_INUM 8
|
||||
#define ETS_FRC_TIMER1_INUM 9 /* use edge*/
|
||||
|
||||
typedef void (* ets_isr_t)(void *);
|
||||
// The xtos_1int handler calls with param1 as the arg, param2 as a pointer
|
||||
// to an exception frame in memory.
|
||||
|
||||
void ets_intr_lock(void);
|
||||
void ets_intr_unlock(void);
|
||||
void ets_isr_attach(int i, ets_isr_t func, void *arg);
|
||||
|
||||
void NmiTimSetFunc(void (*func)(void));
|
||||
|
||||
|
@ -161,6 +161,10 @@ SECTIONS
|
||||
#endif
|
||||
*libgcc.a:_umoddi3.o(.literal .text)
|
||||
*libgcc.a:_udivdi3.o(.literal .text)
|
||||
*libgcc.a:_divsf3.o(.literal .text)
|
||||
*libgcc.a:_fixsfsi.o(.literal .text)
|
||||
*libgcc.a:_cmpdf2.o(.literal .text)
|
||||
*libgcc.a:_cmpsf2.o(.literal .text)
|
||||
*libstdc++.a:( .literal .text .literal.* .text.*)
|
||||
*libstdc++-exc.a:( .literal .text .literal.* .text.*)
|
||||
*libsmartconfig.a:(.literal .text .literal.* .text.*)
|
||||
@ -192,13 +196,17 @@ SECTIONS
|
||||
/* Constant strings in flash (PSTRs) */
|
||||
*(.irom0.pstr.*)
|
||||
|
||||
/* Inline flash strings PSTR() within templated code */
|
||||
*(.rodata._ZZ*__pstr__*)
|
||||
|
||||
/* __FUNCTION__ locals */
|
||||
*(.rodata._ZZ*__FUNCTION__)
|
||||
*(.rodata._ZZ*__PRETTY_FUNCTION__)
|
||||
*(.rodata._ZZ*__func__)
|
||||
|
||||
/* std::* exception strings, in their own section to allow string coalescing */
|
||||
*(.irom.exceptiontext)
|
||||
*(.irom.exceptiontext, .rodata.exceptiontext)
|
||||
*(.rodata.*__exception_what__*) /* G++ seems to throw out templatized section attributes */
|
||||
|
||||
/* c++ typeof IDs, etc. */
|
||||
*(.rodata._ZTIN* .rodata._ZTSN10* .rodata._ZTISt* .rodata._ZTSSt*)
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -41,7 +41,7 @@ extern "C" {
|
||||
// Multi-alignment variant of PSTR, n controls the alignment and should typically be 1 or 4
|
||||
// Adapted from AVR-specific code at https://forum.arduino.cc/index.php?topic=194603.0
|
||||
// Uses C attribute section instead of ASM block to allow for C language string concatenation ("x" "y" === "xy")
|
||||
#define PSTRN(s,n) (__extension__({static const char __c[] __attribute__((__aligned__(n))) __attribute__((section( "\".irom0.pstr." __FILE__ "." __STRINGIZE(__LINE__) "." __STRINGIZE(__COUNTER__) "\", \"aSM\", @progbits, 1 #"))) = (s); &__c[0];}))
|
||||
#define PSTRN(s,n) (__extension__({static const char __pstr__[] __attribute__((__aligned__(n))) __attribute__((section( "\".irom0.pstr." __FILE__ "." __STRINGIZE(__LINE__) "." __STRINGIZE(__COUNTER__) "\", \"aSM\", @progbits, 1 #"))) = (s); &__pstr__[0];}))
|
||||
#endif
|
||||
#ifndef PSTR
|
||||
// PSTR() uses the default alignment defined by PSTR_ALIGN
|
||||
@ -61,7 +61,7 @@ extern "C" {
|
||||
// w1, w0
|
||||
|
||||
#define pgm_read_with_offset(addr, res) \
|
||||
asm("extui %0, %1, 0, 2\n" /* Extract offset within word (in bytes) */ \
|
||||
__asm__("extui %0, %1, 0, 2\n" /* Extract offset within word (in bytes) */ \
|
||||
"sub %1, %1, %0\n" /* Subtract offset from addr, yielding an aligned address */ \
|
||||
"l32i.n %1, %1, 0x0\n" /* Load word from aligned address */ \
|
||||
"ssa8l %0\n" /* Prepare to shift by offset (in bits) */ \
|
||||
@ -71,25 +71,25 @@ extern "C" {
|
||||
:);
|
||||
|
||||
#define pgm_read_dword_with_offset(addr, res) \
|
||||
asm("extui %0, %1, 0, 2\n" /* Extract offset within word (in bytes) */ \
|
||||
__asm__("extui %0, %1, 0, 2\n" /* Extract offset within word (in bytes) */ \
|
||||
"sub %1, %1, %0\n" /* Subtract offset from addr, yielding an aligned address */ \
|
||||
"l32i a15, %1, 0\n" \
|
||||
"l32i a14, %1, 0\n" \
|
||||
"l32i %1, %1, 4\n" \
|
||||
"ssa8l %0\n" \
|
||||
"src %0, %1, a15\n" \
|
||||
"src %0, %1, a14\n" \
|
||||
:"=r"(res), "=r"(addr) \
|
||||
:"1"(addr) \
|
||||
:"a15");
|
||||
:"a14");
|
||||
|
||||
static inline uint8_t pgm_read_byte_inlined(const void* addr) {
|
||||
register uint32_t res;
|
||||
uint32_t res;
|
||||
pgm_read_with_offset(addr, res);
|
||||
return (uint8_t) res; /* This masks the lower byte from the returned word */
|
||||
}
|
||||
|
||||
/* Although this says "word", it's actually 16 bit, i.e. half word on Xtensa */
|
||||
static inline uint16_t pgm_read_word_inlined(const void* addr) {
|
||||
register uint32_t res;
|
||||
uint32_t res;
|
||||
pgm_read_with_offset(addr, res);
|
||||
return (uint16_t) res; /* This masks the lower half-word from the returned word */
|
||||
}
|
||||
@ -97,7 +97,7 @@ static inline uint16_t pgm_read_word_inlined(const void* addr) {
|
||||
/* Can't legally cast bits of uint32_t to a float w/o conversion or std::memcpy, which is inefficient. */
|
||||
/* The ASM block doesn't care the type, so just pass in what C thinks is a float and return in custom fcn. */
|
||||
static inline float pgm_read_float_unaligned(const void *addr) {
|
||||
register float res;
|
||||
float res;
|
||||
pgm_read_with_offset(addr, res);
|
||||
return res;
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
Subproject commit 92add5010fc329cbfbbcb1ce713108451cf9fc8c
|
||||
Subproject commit 3798bf015b5a66e9b1a420ee0d3caa9ffe5d399e
|
@ -38,9 +38,13 @@
|
||||
|
||||
#define HAS_PHY_CAPTURE 1
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
extern "C" {
|
||||
#endif
|
||||
void (*phy_capture) (int netif_idx, const char* data, size_t len, int out, int success);
|
||||
extern void (*phy_capture) (int netif_idx, const char* data, size_t len, int out, int success);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#if ARDUINO
|
||||
|
@ -1,5 +1,5 @@
|
||||
// generated by makefiles/make-lwip2-hash
|
||||
#ifndef LWIP_HASH_H
|
||||
#define LWIP_HASH_H
|
||||
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.2-30-g92add50"
|
||||
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.2-31-g3798bf0"
|
||||
#endif // LWIP_HASH_H
|
||||
|
@ -357,7 +357,7 @@ extern struct tcp_pcb ** const tcp_pcb_lists[NUM_TCP_PCB_LISTS];
|
||||
#if TCP_DEBUG_PCB_LISTS
|
||||
#define TCP_REG(pcbs, npcb) do {\
|
||||
struct tcp_pcb *tcp_tmp_pcb; \
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %" U16_F "\n", (void *)(npcb), (npcb)->local_port)); \
|
||||
LWIP_DEBUGF(TCP_DEBUG, ("TCP_REG %p local port %"U16_F"\n", (void *)(npcb), (npcb)->local_port)); \
|
||||
for (tcp_tmp_pcb = *(pcbs); \
|
||||
tcp_tmp_pcb != NULL; \
|
||||
tcp_tmp_pcb = tcp_tmp_pcb->next) { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user