From 13651ddd6514ee2c3d5e22d989476d4906f8318e Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Fri, 9 Aug 2024 00:10:25 +0300 Subject: [PATCH 1/7] Build `esp32-elf` cross --- .github/workflows/linux.yml | 4 +++- .github/workflows/macos.yml | 4 +++- .github/workflows/macos_arm.yml | 4 +++- .github/workflows/windows.yml | 4 +++- README.md | 2 ++ esp32-e3.patch | 26 ++++++++++++++++++++++++++ specs/gcc.anod | 1 + specs/release_package.anod | 8 ++++++++ 8 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 esp32-e3.patch diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 64855ab..ce0d3ac 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -96,7 +96,7 @@ jobs: gnat_cross: strategy: matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] name: GNAT ${{ matrix.target }}-linux needs: gnat runs-on: ubuntu-20.04 @@ -118,6 +118,8 @@ jobs: run: | python -m pip install --upgrade pip pip install e3-core==22.1.0 + FILE=$(python -c "import e3.platform_db.knowledge_base;print (e3.platform_db.knowledge_base.__file__)") + patch "$FILE" ./esp32-e3.patch - name: Build GNAT ${{ matrix.target }} run: ./anod build gcc -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 259a4c4..d7bce1d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -93,7 +93,7 @@ jobs: gnat_cross: strategy: matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] name: GNAT ${{ matrix.target }}-darwin needs: gnat runs-on: macos-12 @@ -115,6 +115,8 @@ jobs: run: | python -m pip install --upgrade pip pip install e3-core==22.1.0 + FILE=$(python -c "import e3.platform_db.knowledge_base;print (e3.platform_db.knowledge_base.__file__)") + patch "$FILE" ./esp32-e3.patch - name: Build GNAT ${{ matrix.target }} run: ./anod build gcc -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup diff --git a/.github/workflows/macos_arm.yml b/.github/workflows/macos_arm.yml index 0f09772..b433251 100644 --- a/.github/workflows/macos_arm.yml +++ b/.github/workflows/macos_arm.yml @@ -53,7 +53,7 @@ jobs: gnat_cross: strategy: matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] name: GNAT ${{ matrix.target }}-darwin needs: gnat runs-on: macos-14 @@ -78,6 +78,8 @@ jobs: run: | python -m pip install --upgrade pip pip install e3-core==22.1.0 + FILE=$(python -c "import e3.platform_db.knowledge_base;print (e3.platform_db.knowledge_base.__file__)") + patch "$FILE" ./esp32-e3.patch - name: Build GNAT ${{ matrix.target }} run: ./anod build gcc -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index da0c97b..d29c3ea 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -127,7 +127,7 @@ jobs: gnat_cross: strategy: matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] name: GNAT ${{ matrix.target }}-windows needs: gnat runs-on: windows-2019 @@ -155,6 +155,8 @@ jobs: run: | python -m pip install --upgrade pip pip install e3-core==22.1.0 + FILE=$(python -c "import e3.platform_db.knowledge_base;print (e3.platform_db.knowledge_base.__file__)") + patch "$FILE" ./esp32-e3.patch - name: Prepare msys2 build setup # We need a path that is compatible between Windows and Unix world diff --git a/README.md b/README.md index e5af352..3702f4a 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ This can be done in a virtual env, e.g.: $ python3 -m venv my-virtual-env $ source my-virtual-env/bin/activate $ pip install e3-core==22.1.0 +# For esp32 only: +$ patch -p1 < esp32-e3.patch ``` To build a spec, for example `mpc`, run the `anod` script: diff --git a/esp32-e3.patch b/esp32-e3.patch new file mode 100644 index 0000000..aa3cf6e --- /dev/null +++ b/esp32-e3.patch @@ -0,0 +1,26 @@ +--- my-virtual-env/lib/python3.10/site-packages/e3/platform_db/knowledge_base.py 2024-08-16 09:12:34.234094200 +0300 ++++ my-virtual-env/lib/python3.10/site-packages/e3/platform_db/knowledge_base.py 2024-08-16 09:13:03.987098168 +0300 +@@ -10,6 +10,7 @@ + "aarch64": {"endian": "little", "bits": 64}, + "arm": {"endian": "little", "bits": 32}, + "avr": {"endian": "little", "bits": 16}, ++ "esp32": {"endian": "little", "bits": 32}, + "powerpc": {"endian": "big", "bits": 32}, + "powerpc64": {"endian": "big", "bits": 64}, + "sparc": {"endian": "big", "bits": 32}, +@@ -81,6 +82,7 @@ + "arm-ios": {"cpu": "arm", "os": "ios", "is_hie": False}, + "avr-elf": {"cpu": "avr", "os": "none", "is_hie": True}, + "arm-linux": {"cpu": "arm", "os": "linux", "is_hie": False, "endian": "little"}, ++ "esp32-elf": {"cpu": "esp32", "os": "none", "is_hie": True}, + "ppc-aix": {"cpu": "powerpc", "os": "aix", "is_hie": False}, + "ppc-linux": {"cpu": "powerpc", "os": "linux", "is_hie": False}, + "raspberrypi-linux": { +@@ -118,6 +120,7 @@ + "arm-ios": {"name": "arm-apple-darwin10"}, + "avr-elf": {"name": "avr"}, + "arm-linux": {"name": "arm-linux-gnueabi"}, ++ "esp32-elf": {"name": "xtensa-esp32-elf"}, + "ppc-aix": {"name": "powerpc-ibm-aix%(os_version)s.0.0"}, + "ppc-linux": {"name": "powerpc-generic-linux-gnu"}, + "raspberrypi-linux": {"name": "arm-linux-gnueabihf"}, diff --git a/specs/gcc.anod b/specs/gcc.anod index eb8b805..2fdcb19 100644 --- a/specs/gcc.anod +++ b/specs/gcc.anod @@ -53,6 +53,7 @@ class GCC(spec("gh-artifact")): self.env.target.triplet == "arm-eabi" or self.env.target.triplet == "riscv64-elf" or self.env.target.triplet == "avr-elf" + or self.env.target.triplet.endswith("esp32-elf") ) @property diff --git a/specs/release_package.anod b/specs/release_package.anod index 0e2925c..0545712 100644 --- a/specs/release_package.anod +++ b/specs/release_package.anod @@ -59,6 +59,8 @@ class ReleasePackage(spec("common")): return "3" elif self.env.target.triplet == "avr-elf": return "3" + elif self.env.target.triplet == "xtensa-esp32-elf": + return "3" else: return "3" @@ -131,6 +133,12 @@ class ReleasePackage(spec("common")): Anod.Dependency("avrlibc", track=True), ] + elif self.env.target.triplet == "xtensa-esp32-elf": + return [ + Anod.Dependency("gcc", track=True), + Anod.Dependency("gdb", track=True), + ] + elif self.env.host.triplet == self.env.target.triplet: # Native return [ From 6ad8349bd2729f92242bb9ff2fcd82669858c848 Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Sat, 17 Aug 2024 07:30:43 +0300 Subject: [PATCH 2/7] Try to fix MacOS X ARM64 build --- .github/workflows/macos_arm.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos_arm.yml b/.github/workflows/macos_arm.yml index b433251..45478fe 100644 --- a/.github/workflows/macos_arm.yml +++ b/.github/workflows/macos_arm.yml @@ -64,6 +64,9 @@ jobs: - name: Checkout Project uses: actions/checkout@v2 + - name: Install texinfo with Homebrew + run: brew install texinfo + - uses: actions/download-artifact@v2 with: name: anod-artifacts @@ -103,7 +106,7 @@ jobs: strategy: matrix: ocaml-compiler: - - 4.11.2 + - 4.12.1 runs-on: macos-14 steps: - name: Checkout code @@ -141,7 +144,7 @@ jobs: strategy: matrix: ocaml-compiler: - - "4.11.2" + - "4.12.1" runs-on: macos-14 steps: From 0f16cbb3df3ba841be6291fd33fe0fe5083d6bd3 Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Sat, 17 Aug 2024 11:11:43 +0300 Subject: [PATCH 3/7] Fix SPARK (actually libgpr2-next) build on Mac OS X. Latest version of libgpr2 has `SOURCE_DIR :=` with more than one spaces before assignment in `Makefile`, so our hack stops working. --- specs/libgpr2.anod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/libgpr2.anod b/specs/libgpr2.anod index 830326f..d1574f7 100644 --- a/specs/libgpr2.anod +++ b/specs/libgpr2.anod @@ -112,7 +112,7 @@ class LibGPR2(spec("common")): # an absolute path. print(os.path.join(self["SRC_DIR"], "Makefile")) text_replace(os.path.join(self["SRC_DIR"], "Makefile"), - [("SOURCE_DIR := .*", + [("SOURCE_DIR *:= .*", "SOURCE_DIR := " + self["SRC_DIR"])]) self.env.add_search_path("PYTHONPATH", os.path.join(self["SRC_DIR"], "langkit_src")) From 7eed2a8eeca99e0597e55f33715befefb0efd18c Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Sat, 17 Aug 2024 11:10:21 +0300 Subject: [PATCH 4/7] Replace `http` with `https` in avrlibc URL to fix "406 Client Error: Not Acceptable" on Mac OS X. --- specs/avrlibc.anod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/avrlibc.anod b/specs/avrlibc.anod index 1c699db..6f08885 100644 --- a/specs/avrlibc.anod +++ b/specs/avrlibc.anod @@ -18,7 +18,7 @@ class AVRLibc(spec("common")): return [ self.HTTPSSourceBuilder( name=self.tarball, - url="http://download.savannah.gnu.org/releases/avr-libc/" + self.tarball, + url="https://download.savannah.gnu.org/releases/avr-libc/" + self.tarball, ) ] From 2c311161d971eabf840c58ae51483e2ae0e3377d Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Sat, 17 Aug 2024 19:55:31 +0300 Subject: [PATCH 5/7] Build GCC 14.2 --- specs/gcc.anod | 4 ++-- specs/release_package.anod | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/specs/gcc.anod b/specs/gcc.anod index 2fdcb19..7c0ea35 100644 --- a/specs/gcc.anod +++ b/specs/gcc.anod @@ -13,7 +13,7 @@ patch_name = "ld" class GCC(spec("gh-artifact")): @property def version(self): - return "14.1.0" + return "14.2.0" @property def tarball(self): @@ -30,7 +30,7 @@ class GCC(spec("gh-artifact")): if not self.host_is_macos_arm else "https://github.com/iains/gcc-14-branch/archive/refs/" - + "tags/gcc-14.1-darwin-r1.tar.gz" + + "tags/gcc-14.2-darwin-r1.tar.gz" ) ), self.LocalSourceBuilder(name=patch_name) diff --git a/specs/release_package.anod b/specs/release_package.anod index 0545712..ad1b6a3 100644 --- a/specs/release_package.anod +++ b/specs/release_package.anod @@ -54,15 +54,15 @@ class ReleasePackage(spec("common")): return "1" elif package == "gnat": if self.env.target.triplet == "arm-eabi": - return "3" + return "1" elif self.env.target.triplet == "riscv64-elf": - return "3" + return "1" elif self.env.target.triplet == "avr-elf": - return "3" + return "1" elif self.env.target.triplet == "xtensa-esp32-elf": - return "3" + return "1" else: - return "3" + return "1" @property def release_name(self): From 3956b1af9280e144b1412400ea93f7b5512569fc Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Sun, 18 Aug 2024 00:02:46 +0300 Subject: [PATCH 6/7] Disable avr-elf on MacOS X ARM64 because avr-libc doesn't recognize this machine. --- .github/workflows/linux.yml | 1 + .github/workflows/macos.yml | 1 + .github/workflows/macos_arm.yml | 5 ++++- .github/workflows/windows.yml | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ce0d3ac..08c2f80 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -95,6 +95,7 @@ jobs: gnat_cross: strategy: + fail-fast: false matrix: target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] name: GNAT ${{ matrix.target }}-linux diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d7bce1d..3d63d43 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -92,6 +92,7 @@ jobs: gnat_cross: strategy: + fail-fast: false matrix: target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] name: GNAT ${{ matrix.target }}-darwin diff --git a/.github/workflows/macos_arm.yml b/.github/workflows/macos_arm.yml index 45478fe..82602e0 100644 --- a/.github/workflows/macos_arm.yml +++ b/.github/workflows/macos_arm.yml @@ -52,8 +52,11 @@ jobs: gnat_cross: strategy: + fail-fast: false matrix: - target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "esp32-elf", "riscv64-elf"] # , "avr-elf"] + # libc-avr doesn't recognize aarch64-apple machine + # https://github.com/avrdudes/avr-libc/issues/978 name: GNAT ${{ matrix.target }}-darwin needs: gnat runs-on: macos-14 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d29c3ea..8b0bfb5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -126,6 +126,7 @@ jobs: gnat_cross: strategy: + fail-fast: false matrix: target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] name: GNAT ${{ matrix.target }}-windows From 4a97b23d5aa86592a642749a51acfa7a6ce1b58e Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Sun, 18 Aug 2024 19:23:20 +0300 Subject: [PATCH 7/7] Rename esp32-elf to xtensa-elf. Drop e3-core patch and change `lib/platform_db.py` instead. --- .github/workflows/linux.yml | 4 +--- .github/workflows/macos.yml | 4 +--- .github/workflows/macos_arm.yml | 4 +--- .github/workflows/windows.yml | 4 +--- README.md | 2 -- esp32-e3.patch | 26 -------------------------- lib/platform_db.py | 3 +++ sanity-checking/drivers/platform_db.py | 3 +++ specs/gcc.anod | 2 +- utils/gen_gnat_manifests.py | 1 + 10 files changed, 12 insertions(+), 41 deletions(-) delete mode 100644 esp32-e3.patch diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 08c2f80..5259899 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -97,7 +97,7 @@ jobs: strategy: fail-fast: false matrix: - target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "riscv64-elf", "avr-elf", "xtensa-elf"] name: GNAT ${{ matrix.target }}-linux needs: gnat runs-on: ubuntu-20.04 @@ -119,8 +119,6 @@ jobs: run: | python -m pip install --upgrade pip pip install e3-core==22.1.0 - FILE=$(python -c "import e3.platform_db.knowledge_base;print (e3.platform_db.knowledge_base.__file__)") - patch "$FILE" ./esp32-e3.patch - name: Build GNAT ${{ matrix.target }} run: ./anod build gcc -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3d63d43..3b9f686 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -94,7 +94,7 @@ jobs: strategy: fail-fast: false matrix: - target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "riscv64-elf", "avr-elf", "xtensa-elf"] name: GNAT ${{ matrix.target }}-darwin needs: gnat runs-on: macos-12 @@ -116,8 +116,6 @@ jobs: run: | python -m pip install --upgrade pip pip install e3-core==22.1.0 - FILE=$(python -c "import e3.platform_db.knowledge_base;print (e3.platform_db.knowledge_base.__file__)") - patch "$FILE" ./esp32-e3.patch - name: Build GNAT ${{ matrix.target }} run: ./anod build gcc -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup diff --git a/.github/workflows/macos_arm.yml b/.github/workflows/macos_arm.yml index 82602e0..31af9cb 100644 --- a/.github/workflows/macos_arm.yml +++ b/.github/workflows/macos_arm.yml @@ -54,7 +54,7 @@ jobs: strategy: fail-fast: false matrix: - target: ["arm-elf", "esp32-elf", "riscv64-elf"] # , "avr-elf"] + target: ["arm-elf", "riscv64-elf", "xtensa-elf"] # , "avr-elf"] # libc-avr doesn't recognize aarch64-apple machine # https://github.com/avrdudes/avr-libc/issues/978 name: GNAT ${{ matrix.target }}-darwin @@ -84,8 +84,6 @@ jobs: run: | python -m pip install --upgrade pip pip install e3-core==22.1.0 - FILE=$(python -c "import e3.platform_db.knowledge_base;print (e3.platform_db.knowledge_base.__file__)") - patch "$FILE" ./esp32-e3.patch - name: Build GNAT ${{ matrix.target }} run: ./anod build gcc -v --loglevel DEBUG --target=${{ matrix.target }} --enable-cleanup diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8b0bfb5..c875f50 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -128,7 +128,7 @@ jobs: strategy: fail-fast: false matrix: - target: ["arm-elf", "esp32-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "riscv64-elf", "avr-elf", "xtensa-elf"] name: GNAT ${{ matrix.target }}-windows needs: gnat runs-on: windows-2019 @@ -156,8 +156,6 @@ jobs: run: | python -m pip install --upgrade pip pip install e3-core==22.1.0 - FILE=$(python -c "import e3.platform_db.knowledge_base;print (e3.platform_db.knowledge_base.__file__)") - patch "$FILE" ./esp32-e3.patch - name: Prepare msys2 build setup # We need a path that is compatible between Windows and Unix world diff --git a/README.md b/README.md index 3702f4a..e5af352 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,6 @@ This can be done in a virtual env, e.g.: $ python3 -m venv my-virtual-env $ source my-virtual-env/bin/activate $ pip install e3-core==22.1.0 -# For esp32 only: -$ patch -p1 < esp32-e3.patch ``` To build a spec, for example `mpc`, run the `anod` script: diff --git a/esp32-e3.patch b/esp32-e3.patch deleted file mode 100644 index aa3cf6e..0000000 --- a/esp32-e3.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- my-virtual-env/lib/python3.10/site-packages/e3/platform_db/knowledge_base.py 2024-08-16 09:12:34.234094200 +0300 -+++ my-virtual-env/lib/python3.10/site-packages/e3/platform_db/knowledge_base.py 2024-08-16 09:13:03.987098168 +0300 -@@ -10,6 +10,7 @@ - "aarch64": {"endian": "little", "bits": 64}, - "arm": {"endian": "little", "bits": 32}, - "avr": {"endian": "little", "bits": 16}, -+ "esp32": {"endian": "little", "bits": 32}, - "powerpc": {"endian": "big", "bits": 32}, - "powerpc64": {"endian": "big", "bits": 64}, - "sparc": {"endian": "big", "bits": 32}, -@@ -81,6 +82,7 @@ - "arm-ios": {"cpu": "arm", "os": "ios", "is_hie": False}, - "avr-elf": {"cpu": "avr", "os": "none", "is_hie": True}, - "arm-linux": {"cpu": "arm", "os": "linux", "is_hie": False, "endian": "little"}, -+ "esp32-elf": {"cpu": "esp32", "os": "none", "is_hie": True}, - "ppc-aix": {"cpu": "powerpc", "os": "aix", "is_hie": False}, - "ppc-linux": {"cpu": "powerpc", "os": "linux", "is_hie": False}, - "raspberrypi-linux": { -@@ -118,6 +120,7 @@ - "arm-ios": {"name": "arm-apple-darwin10"}, - "avr-elf": {"name": "avr"}, - "arm-linux": {"name": "arm-linux-gnueabi"}, -+ "esp32-elf": {"name": "xtensa-esp32-elf"}, - "ppc-aix": {"name": "powerpc-ibm-aix%(os_version)s.0.0"}, - "ppc-linux": {"name": "powerpc-generic-linux-gnu"}, - "raspberrypi-linux": {"name": "arm-linux-gnueabihf"}, diff --git a/lib/platform_db.py b/lib/platform_db.py index 3f34762..3fadd62 100644 --- a/lib/platform_db.py +++ b/lib/platform_db.py @@ -4,6 +4,7 @@ class PlatDB(PlatformDBPlugin): def update_db(self) -> None: self.cpu_info.update( { + "xtensa": {"endian": "little", "bits": 32}, "riscv32": {"endian": "little", "bits": 32}, "riscv64": {"endian": "little", "bits": 64}, } @@ -34,6 +35,7 @@ def update_db(self) -> None: self.platform_info.update( { "aarch64-darwin": {"cpu": "aarch64", "os": "darwin", "is_hie": False}, + "xtensa-elf": {"cpu": "xtensa", "os": "none", "is_hie": True}, "riscv32-elf": {"cpu": "riscv32", "os": "none", "is_hie": True}, "riscv64-elf": {"cpu": "riscv64", "os": "none", "is_hie": True}, "riscv32-unknown-elf": {"cpu": "riscv32", "os": "none", "is_hie": True}, @@ -44,6 +46,7 @@ def update_db(self) -> None: self.build_targets.update( { "aarch64-darwin": {"name": "aarch64-apple-darwin%(os_version)s"}, + "xtensa-elf": {"name": "xtensa-esp32-elf"}, "riscv32-elf": {"name": "riscv32-elf"}, "riscv64-elf": {"name": "riscv64-elf"}, "riscv32-unknown-elf": {"name": "riscv32-unknown-elf"}, diff --git a/sanity-checking/drivers/platform_db.py b/sanity-checking/drivers/platform_db.py index c88aed9..8a9113b 100644 --- a/sanity-checking/drivers/platform_db.py +++ b/sanity-checking/drivers/platform_db.py @@ -4,6 +4,7 @@ class PlatDB(PlatformDBPlugin): def update_db(self) -> None: self.cpu_info.update( { + "xtensa": {"endian": "little", "bits": 32}, "riscv32": {"endian": "little", "bits": 32}, "riscv64": {"endian": "little", "bits": 64}, } @@ -32,6 +33,7 @@ def update_db(self) -> None: self.platform_info.update( { + "xtensa-elf": {"cpu": "xtensa", "os": "none", "is_hie": True}, "riscv32-elf": {"cpu": "riscv32", "os": "none", "is_hie": True}, "riscv64-elf": {"cpu": "riscv64", "os": "none", "is_hie": True}, "riscv32-unknown-elf": {"cpu": "riscv32", "os": "none", "is_hie": True}, @@ -41,6 +43,7 @@ def update_db(self) -> None: self.build_targets.update( { + "xtensa-elf": {"name": "xtensa-esp32-elf"}, "riscv32-elf": {"name": "riscv32-elf"}, "riscv64-elf": {"name": "riscv64-elf"}, "riscv32-unknown-elf": {"name": "riscv32-unknown-elf"}, diff --git a/specs/gcc.anod b/specs/gcc.anod index 7c0ea35..65eceb3 100644 --- a/specs/gcc.anod +++ b/specs/gcc.anod @@ -53,7 +53,7 @@ class GCC(spec("gh-artifact")): self.env.target.triplet == "arm-eabi" or self.env.target.triplet == "riscv64-elf" or self.env.target.triplet == "avr-elf" - or self.env.target.triplet.endswith("esp32-elf") + or self.env.target.triplet == "xtensa-esp32-elf" ) @property diff --git a/utils/gen_gnat_manifests.py b/utils/gen_gnat_manifests.py index 84ba17f..264b782 100755 --- a/utils/gen_gnat_manifests.py +++ b/utils/gen_gnat_manifests.py @@ -14,6 +14,7 @@ "x86_64": {"crate": "gnat_native", "description": "Native"}, "arm-elf": {"crate": "gnat_arm_elf", "description": "ARM cross-compiler"}, "avr-elf": {"crate": "gnat_avr_elf", "description": "RISC-V cross-compiler"}, + "xtensa-elf": {"crate": "gnat_xtensa_elf", "description": "Xtensa LX7 cross-compiler"}, "riscv64-elf": {"crate": "gnat_riscv64_elf", "description": "AVR cross-compiler"}, }