[kwlug-disc] ESPHome, ESP32, and compilers

Chris Frey cdfrey at foursquare.net
Sat Jan 15 06:59:16 EST 2022


It's certainly a wild rabbit hole when exploring the Xtensa compiler stuff.

I've learned that Xtensa chips are much more flexible than avr...
apparently the same chip can be configured to behave differently,
in terms of endianness, instruction set, registers, etc.
There is no one "Xtensa" chip.

See the bottom section: https://crosstool-ng.github.io/docs/caveats-features/

Fortunately the xtensa-overlays for espressif chips are all available:
	https://github.com/espressif/xtensa-overlays

Somehow lx106 got into Debian, but none of the others. :-)

- Chris


On Fri, Jan 14, 2022 at 10:47:25PM -0600, Tim Laurence wrote:
> Chris,
>    I didn’t know they were used in cars, neat. That might explain the CAN
> bus support.
> 
> I found this Debian bug asking for the compiler to be added. The response
> was basically when some offers to maintain it it will be accepted.
> 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868895
> 
> Interesting the creator of the bug brought up the same point as you, “it
> was easy with AVR, why not ESP?”.
> 
> —Tim
> 
> On January 12, 2022 at 1:26:02 AM, Chris Frey (cdfrey at foursquare.net) wrote:
> 
> Thanks for the link Tim.
> 
> When I was working with smaller, non-wifi devices, like the Adafruit
> Trinket,
> I was quite pleased that the default compiler gcc-avr was all I needed.
> 
> It seems that Espressif's tree has not been incorporated into the
> official gcc. Not sure why yet. But official gcc does have
> xtensa-lx106 support, which might be close. I just haven't tried
> it yet, having also used the default compiler that comes with
> Arduino IDE so far.
> 
> When I was researching some of this, it looked like the ESP chips were
> used in automotive applications. This might explain some of the history
> and why the chips are so cheap, and why the toolchains are older.
> (gcc 4 and 8 as I recall, 8 being "new")
> 
> - Chris
> 
> 
> On Tue, Jan 11, 2022 at 09:40:59PM -0500, Tim Laurence wrote:
> > Chris,
> > I must confess that I have never had to interact with my compiler
> > directly, I have always used Arduino or Platformio. When I look at my last
> > Platformio build for ESP32 here is the compiler I see being used.
> >
> >
> /Users/tim/.platformio/packages/toolchain-xtensa-esp32s2/bin/xtensa-esp32s2-elf-gcc
> >
> > I think that implies Platformio is downloading its own compiler rather
> than
> > using the system one. I did find some documentation from Espressif here
> > that might be helpful.
> >
> https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/linux-setup-scratch.html
> >
> > —Tim
> >
> > On January 10, 2022 at 10:57:46 PM, Paul Nijjar via kwlug-disc (
> > kwlug-disc at kwlug.org) wrote:
> >
> > On Sat, Jan 08, 2022 at 10:54:03PM -0500, Chris Frey wrote:
> > > On Sat, Jan 08, 2022 at 05:33:40AM -0500, Paul Nijjar via kwlug-announce
> > wrote:
> > > >
> > > > Happy January! It looks like many of us (well, those of us who are
> > > > lucky, anyways) will be spending a lot of January at home, so maybe it
> > > > is appropriate that we kick off 2022 with another presentation related
> > > > to home automation? ESPHome is a project that makes it easy to
> > > > configure ESP32 and ESP8266 devices, which are apparently low-power,
> > > > wifi/bluetooth computers more powerful than my first desktop computer?
> > > > Tim Laurence loves these boards and finds them useful, so he uses
> > > > ESPHome to configure them so they work with his Home Assistant
> > > > install. After his presentation, maybe you will too!
> > >
> > > I'm greatly interested in this talk, but I'm not sure I'll be able to
> > > make it, so I really hope it is recorded. :-)
> > >
> > > One question: have you managed to use the gcc-xtensa-lx106 compiler
> > > that comes native with Debian for these boards? Or only the
> > > xtensa-esp32s2-elf / gcc8_4_0-esp* compiler builds from the
> > > manufacturer?
> >
> > Oh nuts. I forgot to bring this up. My apologies. Maybe somebody will
> > answer on-list.
> >
> > - Paul
> >
> >
> > --
> > Events: https://feeds.off-topic.kwlug.org
> > Housing: https://unionsd.coop
> > Blog: http://pnijjar.freeshell.org
> >
> > _______________________________________________
> > kwlug-disc mailing list
> > kwlug-disc at kwlug.org
> > https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
> 
> > _______________________________________________
> > kwlug-disc mailing list
> > kwlug-disc at kwlug.org
> > https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
> 
> 
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org

> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org





More information about the kwlug-disc mailing list