1#Copyright (c) 2022 HPMicro. 2#Licensed under the Apache License, Version 2.0 (the "License"); 3#you may not use this file except in compliance with the License. 4#You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8#Unless required by applicable law or agreed to in writing, software 9#distributed under the License is distributed on an "AS IS" BASIS, 10#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11#See the License for the specific language governing permissions and 12#limitations under the License. 13 14# Kernel type, e.g. "linux", "liteos_a", "liteos_m". 15kernel_type = "liteos_m" 16 17# Kernel version. 18kernel_version = "3.0.0" 19 20# Board CPU type, for example: "cortex-a7", "riscv32". 21board_cpu = "" 22 23# Board arch, for example: "armv7-a", "rv32imc". 24board_arch = "rv32imac" 25 26# Toolchain used for system compiling. 27# For example: gcc-arm-none-eabi, arm-linux-ohoseabi-gcc, ohos-clang, riscv32-unknown-elf. 28# Note: The default toolchain is "ohos-clang". It's not mandatory if you use the default toolchain. 29board_toolchain = "riscv32-unknown-elf" 30#board_toolchain = "riscv-nuclei-elf" 31 32# The path which toolchain installed, it's not mandatory if toolchain path has been added to your ~/.bashrc. 33board_toolchain_path = "" 34 35# Compiler prefix. 36board_toolchain_prefix = "riscv32-unknown-elf-" 37#board_toolchain_prefix = "riscv-nuclei-elf-" 38 39# Compiler type, "gcc" or "clang". 40board_toolchain_type = "gcc" 41 42# config.json parse 43if (product_path != "") { 44 product_conf = read_file("${product_path}/config.json", "json") 45 force_link_libs = product_conf.force_link_libs 46} 47 48#Debug compiler optimization level options 49board_opt_flags = [] 50 51# Board related common compile flags. 52board_cflags = [ 53 "-march=rv32imac", 54 "-mabi=ilp32", 55 "-ffunction-sections", 56 "-fdata-sections", 57 "-O2", 58 "-static", 59 "-nostdlib", 60 "-D__RISC_V__", 61 "-D__LITEOS_M__", 62 "-DLOSCFG_BASE_CORE_HILOG", 63] 64 65board_cflags += board_opt_flags 66 67board_asmflags = [ 68] 69board_asmflags += board_opt_flags 70board_cxx_flags = board_cflags 71board_ld_flags = [ "" ] 72board_ld_flags += [ 73 "-Wl,--wrap=printf", 74 "-Wl,--whole-archive", 75 "-Wl,--print-memory-usage", 76] 77 78# Board related headfiles search path. 79board_include_dirs = [ 80 "//utils/native/lite/include", 81 "//commonlibrary/utils_lite/include", 82 "//third_party/mbedtls/include", 83 "//third_party/bounds_checking_function/include", ] 84 85# Board adapter dir for OHOS components. 86board_adapter_dir = "" 87 88# Sysroot path. 89board_configed_sysroot = "" 90 91# Board storage type, it used for file system generation. 92storage_type = "" 93