diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 64e8a01..ed2a6cc 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", "riscv64-elf", "avr-elf", "xtensa-esp32-elf"] name: GNAT ${{ matrix.target }}-linux needs: gnat runs-on: ubuntu-20.04 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index c6ff4e8..443ac26 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", "riscv64-elf", "avr-elf", "xtensa-esp32-elf"] name: GNAT ${{ matrix.target }}-darwin needs: gnat runs-on: macos-12 diff --git a/.github/workflows/macos_arm.yml b/.github/workflows/macos_arm.yml index 4aebc29..80e974a 100644 --- a/.github/workflows/macos_arm.yml +++ b/.github/workflows/macos_arm.yml @@ -53,7 +53,10 @@ jobs: gnat_cross: strategy: matrix: - target: ["arm-elf", "riscv64-elf", "avr-elf"] + target: ["arm-elf", "riscv64-elf", "xtensa-esp32-elf"] + # We don't enable avr on aarch64 macOS as 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 32259e4..fe88fe4 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", "riscv64-elf", "avr-elf", "xtensa-esp32-elf"] name: GNAT ${{ matrix.target }}-windows needs: gnat runs-on: windows-2019 diff --git a/lib/platform_db.py b/lib/platform_db.py index 3f34762..e7408c6 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-esp32-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-esp32-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..e7408c6 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}, } @@ -23,6 +24,7 @@ def update_db(self) -> None: self.host_guess.pop("x86-windows") self.host_guess.update( { + "aarch64-darwin": {"os": "Darwin", "cpu": "arm64"}, "x86_64-windows64": { "os": "Windows", "cpu": "AMD64", @@ -32,6 +34,8 @@ def update_db(self) -> None: self.platform_info.update( { + "aarch64-darwin": {"cpu": "aarch64", "os": "darwin", "is_hie": False}, + "xtensa-esp32-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 +45,8 @@ def update_db(self) -> None: self.build_targets.update( { + "aarch64-darwin": {"name": "aarch64-apple-darwin%(os_version)s"}, + "xtensa-esp32-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 77752f4..b3ef2e3 100644 --- a/specs/gcc.anod +++ b/specs/gcc.anod @@ -176,6 +176,11 @@ class GCC(spec("gh-artifact")): args += cross_commons args.append("--enable-multilib") + if self.env.target.triplet == "extensa-esp32-elf": + args += cross_commons + args.append("--enable-multilib") + + return args def artifact_build(self): diff --git a/specs/release_package.anod b/specs/release_package.anod index 76d5295..a43c03d 100644 --- a/specs/release_package.anod +++ b/specs/release_package.anod @@ -140,6 +140,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 [