Giter Site home page Giter Site logo

Comments (7)

LeCyberDucky avatar LeCyberDucky commented on August 29, 2024 1

@robertlipe I agree that it's very frustrating to deal with these layers upon layers of abstractions.

I have not had the time to look at this for a little while now, so I'm a bit out of the loop and therefore not sure of how much help I can be.

As I recall, however, I ended up making use of this: platformio/platform-espressif32#1281, which let me compile the stuff I wanted to compile. Is that of any help?

My very cluttered platformio.ini kinda documents what I've been through, in case that is of any interest:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:lilygo-t-display-s3]
; Using a custom toolchain to use GCC 13 instead of 8 and get access to C++20
; https://community.platformio.org/t/c-20-ranges-library-fatal-error-ranges-no-such-file-or-directory/37771
; https://esp32.com/viewtopic.php?f=19&t=37770
; https://github.com/espressif/crosstool-NG/issues/48
; https://github.com/Jason2866/platform-espressif32
; https://github.com/orgs/espressif/projects/3/views/14
; https://community.platformio.org/t/which-c-standard-am-i-using/24597
; platform = espressif32
; platform = https://github.com/platformio/platform-espressif32.git 
; platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.01.10/platform-espressif32.zip
;https://github.com/platformio/platform-espressif32/pull/1281
platform = https://github.com/sgryphon/platform-espressif32.git#sgryphon/add-esp32-arduino-libs
platform_packages =
    platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#master
    platformio/framework-arduinoespressif32-libs @ https://github.com/espressif/esp32-arduino-libs.git#idf-release/v5.1
; https://community.platformio.org/t/esp32-with-c-20-for-std-span/35279/
; https://registry.platformio.org/tools/espressif/toolchain-riscv32-esp/versions
; https://registry.platformio.org/tools/espressif/toolchain-xtensa-esp32s3/versions
; platform_packages = espressif/[email protected]+20230208
board = lilygo-t-display-s3
framework = arduino
; framework = https://github.com/espressif/arduino-esp32.git
build_unflags = -std=gnu++11
build_flags = -std=gnu++2b ;https://community.platformio.org/t/which-c-standard-am-i-using/24597/4
              -D LV_CONF_INCLUDE_SIMPLE
              -D LV_CONF_SKIP ; Configure LVGL in platformio.ini instead of lv_conf.h - https://github.com/lvgl/lv_platformio/issues/28
              ; Configuration instructions: https://docs.lvgl.io/master/porting/project.html
              -D LV_COLOR_DEPTH=16
              -D LV_USE_ST7789
              -D LV_USE_LOG
              -D LV_LOG_LEVEL=LV_LOG_LEVEL_INFO
              -D LV_USE_ASSERT_NULL
lib_deps = lvgl = https://github.com/lvgl/lvgl.git@^9.0.0
        ;    lv_drivers = https://github.com/lvgl/lv_drivers
monitor_filters = esp32_exception_decoder, colorize, time ; debug
build_type = debug

from crosstool-ng.

robertlipe avatar robertlipe commented on August 29, 2024 1

Thanx for the helpful reply. That was the nudge I needed. As you saw, I ran into other issues caused by a bump in the 3.0 RC, but am now moving forward. Incidentally, I saw your name in other LED strip and S3 projects in recent days, so we're running in similar circles.

I'm very much with you on the layering issues. It's a huge mess...and it's clear that at least some of the problems holding back progress on 3.0 aren't all technical.

I appreciate the hand!

from crosstool-ng.

igrr avatar igrr commented on August 29, 2024

Looks like you are using Arduino-esp32 core version 2.0.14, which is based on ESP-IDF v4.x, which uses GCC 8.4.x for its toolchain. Newer IDF versions are already using the newer versions of GCC (12.2, 13.2). The upcoming Arduino-esp32 v3.0.0 release will be based on IDF v5.1.x, so the functionality you are looking for will be available there. Here is the project which tracks the 3.0.0 release of Arduino-esp32 core: https://github.com/orgs/espressif/projects/3/views/14

from crosstool-ng.

LeCyberDucky avatar LeCyberDucky commented on August 29, 2024

Thank you for the very quick and helpful reply!

Whoa, that's quite a jump in the GCC versions. I gather that pre-releases of version 3.0.0 are available here: https://github.com/espressif/arduino-esp32/releases

Do you know whether it would be possible to change my setup to use that?

from crosstool-ng.

igrr avatar igrr commented on August 29, 2024

Platformio does not yet have support for arduino-esp32 v3.0.0 pre-releases, however there is a fork maintained by Tasmota which already supports this version: https://github.com/Jason2866/platform-espressif32. Perhaps you can try it and see if that works.

from crosstool-ng.

LeCyberDucky avatar LeCyberDucky commented on August 29, 2024

Alright, that sounds great, I'll give it a try! Thanks for pointing me in the right direction.

I suppose we can close this issue then :)

from crosstool-ng.

robertlipe avatar robertlipe commented on August 29, 2024

I just crashed into this hard. I was questioning my sanity because I "knew" that the latest updates used IDF 5.1 and IDF 5.1 used GCC13 and I'd recently confirmed that my g++ brothers are indeed gcc13 with a correspondingly recent libstdc++. I even knew that
xtensa-esp32s3-elf-g++ -c -std=gnu++2a src/tokenize.cc
worked, but platformio couldn't compile my ranges even though the header is clearly there.
But nooooo. pio run SAYS it's running xtensa-esp32s3-elf-g++, but it seems to actually be running an ancient copy of xtensa-esp32s3-elf-g++ squirreled away that's nowhere near where my idf.py PATHED for me. Sure enough, up at the top, I see:
^[[0m - framework-arduinoespressif32 @ 3.20014.231204 (2.0.14) ^M
^[[0m - tool-esptoolpy @ 1.40501.0 (4.5.1) ^M
^[[0m - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 ^M
^[[0m - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5^M

I don't even know where it's finding that:
$ find .espressif -name xtensa-esp32s3-elf-g++

.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32s3-elf-g++

[ hammer drops ]
Oh. Platformio squirrels away it OWN copies instead of using what's in esp-idf. :-( It's not calling exec() on what it's printing at all; it's seemingly building a separate path and using THAT.

$ find .platformio -name xtensa-esp32s3-elf-g++

.platformio/packages/[email protected]+2021r2-patch5/bin/xtensa-esp32s3-elf-g++
.platformio/packages/toolchain-xtensa-esp32s3/bin/xtensa-esp32s3-elf-g++

It's in $HOME and hidden, so it doesn't show up in finder or locate. Awesome...and it's not been updated since 2018, which explains why {fmt} and ranges and such are problematic.

I didn't understand that a project linking a compatibility shim with AVR would hold back the toolchain like this. That's pretty wild.

The second line of https://github.com/platformio/platform-espressif32/releases says "updated to IDF 5.2.1" and that doc says "This has now been upgraded to GCC 13.2.0 " ... but it seems to still be using a 6 y/o g++ behind the covers. It still claims pretty modern C++23 support in https://docs.espressif.com/projects/esp-idf/en/v5.1.3/esp32/api-guides/cplusplus.html#cplusplus-limitations

https://blog.espressif.com/announcing-the-arduino-esp32-core-version-3-0-0-3bf9f24e20d4 shows the 3.0 transition for that package should have embraced IDF 5.1 months ago and https://github.com/orgs/espressif/projects/3/views/14 looks more empty than not. I've updated every IDF and PIO package I can find.

I feel like I'm missing a joke somewhere in all the layers of abstraction. I have a g++ in my path that's not being used. It reports framework-arduinoespressif32 version 3.2. Is there some cached value or .ini tweak I need to make to get it to really match what esp-idf/export.sh is reporting?
xtensa-esp32-elf-g++ --version
xtensa-esp-elf-g++ (crosstool-NG esp-13.2.0_20230928) 13.2.0
with the same for xtensa-esp32s3-elf-gcc, of course.

I know this is an older (and closed) report, but is the current advice for anyone needing a g++ from the last six years still to go to another toolchain?

Sorry if I'm sounding cranky but all these independently maintained layers hiding the details of the other layers, but missing six years worth of language updates is pretty frustrating. (We experience UNIX dudes tend to always sound cranky at all this stuff in the way of our Makefiles. :-) ) Updating IDF to 5.1.3, pio upgrade 6.1.5, and all the pio pkg updates doesn't seem to be updating the right things.

Something between ESP_IDF and this pio wrapper that seems to be sticking on old versions or I've missed a config change.

How did you get back to an actively maintaned chain, @LeCyberDucky ?

Thanx!

from crosstool-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.