-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Arduino bugfix v.2.5.1 is released #147
Comments
@valeros could you investigate why does not work the latest source code v2.5.1 of Arduino core? it builds OK but does not work after flashing. @d-a-v, @earlephilhower do we have critical changes in 2.5.1 build process? Do we need to upgrade to the latest ESP8266 toolchain and switch off from esptool-ck to esptool-py? Thanks! |
@ivankravets There was a linking change (.text into .text and .text1 segment to allow moving some specific functions to IRAM as needed for IRQ callbacks) but I think we already got you in the loop on it. |
@ivankravets @valeros Core 2.5.1 is used in Project Tasmota with Platformio. You can try online: |
Just to make clear what "linked files has to be reordered" means, see |
@mcspr why do you need this hook mcspr/platformio-core@708eff2 ? |
Without this hook, code doesnt boot when builded with new xtensa build chain. |
Yes, like @Jason2866 said - updated toolchain seemingly treats -Wl,-T and just -T differently. |
@Jason2866 @mcspr this is a bug with ESP8266 toolchain. Please file an issue here https://github.com/earlephilhower/esp-quick-toolchain and I'm sure @earlephilhower will take a look. See GCC docs https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html
PlatformIO Core is used for over 30 dev/platform which depend on the different toolchains. It would be great if we can keep PlatformIO Core compatible with GCC CLI. |
Guys, the toolchain got bumped in 2.5.0 and was not touched significantly for 2.5.1 AFAIR. Was 2.5.0 working? If so, then I really think it's something else because we're building the unadulterated GNU sources for the vast majority of things (minor patches, unrelated to the linker). Just checked, the last time the toolchain was released was Dec 14 2018. Ardui9no 8266 2.5.0 came out in Feb 2019. |
@earlephilhower the toolchain from 2.5.0 is working fine for 2.5.1 with this change from @mcspr |
@earlephilhower the bug was introduced in this release https://github.com/earlephilhower/esp-quick-toolchain/releases/tag/2.5.0-3 We use a toolchain that was before "2.5.0-3". The latest "2.5.0-3" breaks ESP8266 SDKs which we support in PlatformIO. |
@ivankravets what is the exact version you have been using? Again, we are building the plain GCC code here so there's not much I expect to be able to track down. Patches are kept in a separate dir in the repo, and none relate to the g++/ld options parsing... |
@ivankravets anyway, with the old build chain (which is standard for Arduino ESP8266) the code compiles fine and does work. |
Also, does PIO use its own bootloader on-chip? Like I said, there is another segment in the generated binary now (iram.text1) which needs to be supported. The Arduino bootloader handles it seemlessly (w/o any changes), but if you've got a custom one it needs to be aware of this and support it. |
PIO uses GCC in a way that causes the compiler to optimize away the IRQ vectors (since they're not used in our code itself) in the final build stage. We can avoid this by forcing all of libmain to be included in the final object. This is a small file, and almost completely related to IRQs, so space impact is minimal. Fixes esp8266#6087 and platformio/platform-espressif8266#147
Just to add my few cents. I'm having some issues with OTA updates using the stable release. It appears that espota thinks its done sending the sketch before the fact and I get an Error[4]: End Failed on the serial output. The sketch gets to about 89% done uploading before it fails. I tried using the 2.5.0 release of the core in the arduino IDE and it works great, so I don't think the core is the problem. After changing the platform using #147 (comment) the uploads completes most of the times. However, when I switched to an AP with a stronger signal, the fail rate drops with stable and with #147 (comment) . Does OTA update work differently in platformio from arduino ide? I wasn't sure if I should open a new issue, so apologies if I should have. |
@octavio2895 I've just switch espota to official script from Arduino core. Please re-test with upstream version http://docs.platformio.org/en/latest/platforms/espressif8266.html#upstream |
@earlephilhower @Jason2866 @mcspr I've just switch ElfToBin builder and upload process to esptool.py: It works for me now. Please re-test with upstream version of dev/platform http://docs.platformio.org/en/latest/platforms/espressif8266.html#upstream if it works for you too, we will make a final release. Thanks! |
That commit uses the new elf2bin.py script which knows about the add'l .text1 section. If that really works, then the -Wl was a red herring and we can ignore it in the core. |
@ivankravets that fixed the issue! where can I find the version of espota.py that was being used before? I would like to take a look at it. Also, should I make an issue for this? since its not fixed on the stable release to help people with similar problems? |
Can confirm that elf2bin change is working with platform from platform.json:["packages"]["toolchain-xtensa"]["version"] is still pointing to the ~1.40802.0, so toolchain problem obviously is not there. |
Can confirm develop is working. Feature request with this issue is done. Thx. Issue with toolchain ~2.4 is still there (when used) as @mcspr mentioned. The develop version uses ~1.4 build chain:
|
Please update to the stable version of dev/platform https://github.com/platformio/platform-espressif8266/releases/tag/v2.1.0 |
Release does install and compile results in a working firmware of tried project Tasmota |
Since v.2.5.1 is released could you please update to this version?
Thx!
The text was updated successfully, but these errors were encountered: