[PATCH 0/5] Add Xtensa ESP chips support
Alexey Lapshin
alexey.lapshin@espressif.com
Sat Oct 22 12:51:12 GMT 2022
Since ESP chips are getting more and more popular for developers I
would like to suggest these patches to consider to include Xtensa ESP
chips support for binutils and gdb.
The chips support was done in a not common binutils way. There are a
few reasons for that:
As I know, the Xtensa specific code for binutils and gdb is generated
with tools from Tensilica Inc.
To build binutils and gdb with other chip presets we need to override
some related files (https://github.com/espressif/xtensa-overlays).
To make it easy to integrate new chips I did refactor the code a bit to
make a possibility to just copy and paste Tensilica-generated files and
modify a few lines in a code to make it supported in binutils and gdb.
Please consider these changes to merge, I believe this could be a
pretty improvement to extend supported CPUs without using third-party
sources patches.
Alexey Lapshin (5):
bfd: xtensa: move common code from ld and gas
gas: xtensa: add endianness, loops, booleans options
ld: xtensa: use default LD command line options to specify endianness
gas: xtensa: add esp32, esp32s2, esp32s3 isa-modules options
gdb: xtensa: add support for esp32, esp32s2, esp32s3 isa-modules
bfd/Makefile.am | 10 +-
bfd/Makefile.in | 15 +-
bfd/configure | 4 +-
bfd/configure.ac | 4 +-
bfd/elf32-xtensa.c | 126 +
...nsa-modules.c => xtensa-default-modules.c} | 2 +-
bfd/xtensa-esp32-modules.c | 19191 +++++++
bfd/xtensa-esp32s2-modules.c | 11671 +++++
bfd/xtensa-esp32s3-modules.c | 43674 ++++++++++++++++
bfd/xtensa-isa.c | 25 +-
gas/config/tc-xtensa.c | 79 +-
gas/config/tc-xtensa.h | 2 +-
gas/config/xtensa-relax.c | 8 +-
gdb/Makefile.in | 10 +-
gdb/configure.tgt | 2 +-
...tensa-config.c => xtensa-config-default.c} | 66 +-
gdb/xtensa-config-esp32.c | 389 +
gdb/xtensa-config-esp32s2.c | 271 +
gdb/xtensa-config-esp32s3.c | 496 +
gdb/xtensa-tdep.c | 70 +-
gdb/xtensa-tdep.h | 2 +-
include/elf/xtensa.h | 22 +
include/xtensa-isa.h | 8 +
ld/emultempl/xtensaelf.em | 169 +-
24 files changed, 76128 insertions(+), 188 deletions(-)
rename bfd/{xtensa-modules.c => xtensa-default-modules.c} (99%)
create mode 100644 bfd/xtensa-esp32-modules.c
create mode 100644 bfd/xtensa-esp32s2-modules.c
create mode 100644 bfd/xtensa-esp32s3-modules.c
rename gdb/{xtensa-config.c => xtensa-config-default.c} (84%)
create mode 100644 gdb/xtensa-config-esp32.c
create mode 100644 gdb/xtensa-config-esp32s2.c
create mode 100644 gdb/xtensa-config-esp32s3.c
--
2.34.1
More information about the Binutils
mailing list