Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build esp32-elf cross (without runtimes) #75

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ jobs:

gnat_cross:
strategy:
fail-fast: false
matrix:
target: ["arm-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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ jobs:

gnat_cross:
strategy:
fail-fast: false
matrix:
target: ["arm-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
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/macos_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ jobs:

gnat_cross:
strategy:
fail-fast: false
matrix:
target: ["arm-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
needs: gnat
runs-on: macos-14
Expand All @@ -64,6 +67,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
Expand Down Expand Up @@ -101,7 +107,7 @@ jobs:
strategy:
matrix:
ocaml-compiler:
- 4.11.2
- 4.12.1
runs-on: macos-14
steps:
- name: Checkout code
Expand Down Expand Up @@ -139,7 +145,7 @@ jobs:
strategy:
matrix:
ocaml-compiler:
- "4.11.2"
- "4.12.1"

runs-on: macos-14
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ jobs:

gnat_cross:
strategy:
fail-fast: false
matrix:
target: ["arm-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
Expand Down
3 changes: 3 additions & 0 deletions lib/platform_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
Expand Down Expand Up @@ -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},
Expand All @@ -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"},
Expand Down
3 changes: 3 additions & 0 deletions sanity-checking/drivers/platform_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
Expand Down Expand Up @@ -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},
Expand All @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion specs/avrlibc.anod
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
]

Expand Down
5 changes: 3 additions & 2 deletions specs/gcc.anod
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand All @@ -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 == "xtensa-esp32-elf"
)

@property
Expand Down
2 changes: 1 addition & 1 deletion specs/libgpr2.anod
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
16 changes: 12 additions & 4 deletions specs/release_package.anod
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +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 "1"
else:
return "3"
return "1"

@property
def release_name(self):
Expand Down Expand Up @@ -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 [
Expand Down
1 change: 1 addition & 0 deletions utils/gen_gnat_manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
}

Expand Down
Loading