blob: d13d7e1888f07a568ac2d980ed6d2c3c589d8187 [file] [log] [blame]
# Copyright (c) 2023 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build_overrides/asr.gni")
import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
assert(asr_ic_family == "asr582x" || asr_ic_family == "asr595x",
"Unsupported ASR IC: ${asr_ic_family}")
if (asr_ic_family == "asr582x") {
import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni")
_tool_name_root = "${asr_toolchain_root}arm-none-eabi-"
}
if (asr_ic_family == "asr595x") {
import("${build_root}/toolchain/riscv_gcc/riscv_toolchain.gni")
_tool_name_root = "${asr_toolchain_root}riscv-asr-elf-"
}
declare_args() {
asr_ar = _tool_name_root + "ar"
asr_cc = _tool_name_root + "gcc"
asr_cxx = _tool_name_root + "g++"
}
gcc_toolchain("asrtoolchain") {
ar = asr_ar
cc = asr_cc
cxx = asr_cxx
toolchain_args = {
current_os = "freertos"
is_clang = false
}
}