Skip to content

Commit e5dc97f

Browse files
committed
Test Mac intel more extensively and try fix
1 parent 6f351d4 commit e5dc97f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
os: [ubuntu-latest, windows-latest, macos-latest]
10+
os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel]
1111
example:
1212
- "examples/adc-cpu-temp-none-os"
1313
- "examples/adc-simple-none-os"

builder/frameworks/_bare.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111

1212
machine_arch = str(board.get("build.march"))
1313

14+
# the MAC x64 toolchain only has GCC8, not GCC12. Thus, we need to strip some
15+
# unsupported extensions. "xw" end "rv32ec" "rv32imc" are supported, the reset not.
16+
remap_arch = {
17+
"rv32ec_zmmul_xw": "rv32ecxw",
18+
"rv32imc_zba_zbb_zbc_zbs_xw": "rv32imcxw"
19+
}
20+
is_gcc_12 = platform.get_package_version("toolchain-riscv").split(".")[1].startswith("12")
21+
if not is_gcc_12 and machine_arch in remap_arch:
22+
machine_arch = remap_arch[machine_arch]
23+
1424
def get_flag_value(flag_name:str, default_val:bool):
1525
flag_val = board.get("build.%s" % flag_name, default_val)
1626
flag_val = str(flag_val).lower() in ("1", "yes", "true")

0 commit comments

Comments
 (0)