Skip to content

community/gcc-cross-embedded: add xtensa support

This packages xtensa-dynconfig, a GCC/binutils/GDB plugin that provides the configuration of a specific CPU of the highly customizable xtensa ISA.

With this, a generic bintuils-xtensa-none-elf is packaged in the same was as the other binutils. However, the subpackages binutils-xtensa-esp*-elf are special, in that they are just trivial shell wrappers for the corresponding command from binutils-xtensa-none-elf that however load the matching xtensa-dynconfig plugin. As a result, all but the base xtensa package are trivial in size.

The same approach is used for GCC. However, here libgcc and the start files need to be compiled for each target, as those depend on the target CPU config (such as big/little endian, supported instructions, ABI, registers available, etc.) Still, the host side stuff of GCC can be shared in the same fashion is with binutils.

Finally, the newlib-esp package is added. This Espressif's fork of newlib, which is compiled for all of the xtensa based ESP MCUs. Here, only the headers are shared and the bulk of the packages differs between the MCUs.

Note: Ideally we would have integrated this into community/newlib rather than having a community/newlib-esp for ESP MCUs only. But this increased friction with how Espressif's SDK integrates newlib's reentrant functions. And without the SDK's binary blob for WiFi support, those MCUs loose a lot of their appeal.

Edited by Marian Buschsieweke

Merge request reports