From b86375ad5d2c1879a3c5ab07afa60f3c3673def5 Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Thu, 14 May 2020 21:43:26 +0300 Subject: [PATCH] BareMetal: Add support for RISC-V architecture in GCC toolchain This commit adds support for the RISC-V atchitecture: * https://riscv.org/ using GCC toolchains. Tested auto-detection on Windows using the GCC v7.7.1 toolchain provided from the following URL: * https://gnutoolchains.com/risc-v/ Change-Id: Ice10469ebda8af9cf7bf32299bb38e548b30b315 Reviewed-by: hjk --- src/plugins/projectexplorer/abi.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/projectexplorer/abi.cpp b/src/plugins/projectexplorer/abi.cpp index e07e6fc0477..6a2d9979543 100644 --- a/src/plugins/projectexplorer/abi.cpp +++ b/src/plugins/projectexplorer/abi.cpp @@ -517,6 +517,12 @@ Abi Abi::abiFromTargetTriplet(const QString &triple) flavor = GenericFlavor; format = ElfFormat; width = 32; + } else if (p.startsWith("riscv")) { + arch = RiscVArchitecture; + os = BareMetalOS; + flavor = GenericFlavor; + format = ElfFormat; + width = 32; } else if (p.startsWith("mips")) { arch = MipsArchitecture; width = p.contains("64") ? 64 : 32;