#Copyright (c) 2022 HPMicro. #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. # Kernel type, e.g. "linux", "liteos_a", "liteos_m". kernel_type = "liteos_m" # Kernel version. kernel_version = "3.0.0" # Board CPU type, for example: "cortex-a7", "riscv32". board_cpu = "" # Board arch, for example: "armv7-a", "rv32imc". board_arch = "rv32imac" # Toolchain used for system compiling. # For example: gcc-arm-none-eabi, arm-linux-ohoseabi-gcc, ohos-clang, riscv32-unknown-elf. # Note: The default toolchain is "ohos-clang". It's not mandatory if you use the default toolchain. board_toolchain = "riscv32-unknown-elf" #board_toolchain = "riscv-nuclei-elf" # The path which toolchain installed, it's not mandatory if toolchain path has been added to your ~/.bashrc. board_toolchain_path = "" # Compiler prefix. board_toolchain_prefix = "riscv32-unknown-elf-" #board_toolchain_prefix = "riscv-nuclei-elf-" # Compiler type, "gcc" or "clang". board_toolchain_type = "gcc" # config.json parse if (product_path != "") { product_conf = read_file("${product_path}/config.json", "json") force_link_libs = product_conf.force_link_libs } #Debug compiler optimization level options board_opt_flags = [] # Board related common compile flags. board_cflags = [ "-mabi=ilp32", "-falign-functions=2", "-msave-restore", "-fno-optimize-strlen", "-freorder-blocks-algorithm=simple", "-fno-schedule-insns", "-fno-inline-small-functions", "-fno-inline-functions-called-once", "-mtune=size", "-mno-small-data-limit=0", "-fno-aggressive-loop-optimizations", "-Wpointer-arith", "-ffunction-sections", "-fdata-sections", "-fno-short-enums", "-fno-builtin", "-O2", "-static", "-fno-common", "-fno-stack-protector", "-fno-omit-frame-pointer", "-Wno-format-truncation", "-D__RISC_V__", "-D__LITEOS_M__", "-DLWIP_SUPPORT_CUSTOM_PBUF=1", "-D_BSD_SOURCE", "-Wformat=0", "-DLOSCFG_BASE_CORE_HILOG", "-U_FORTIFY_SOURCE" ] board_cflags += board_opt_flags board_asmflags = [ "-march=rv32imac", "-mabi=ilp32", "-static", "-O2", ] board_asmflags += board_opt_flags board_cxx_flags = board_cflags board_ld_flags = [ "" ] board_ld_flags += [ "-Wl,--wrap=_free_r", "-Wl,--wrap,_malloc_usable_size_r", "-Wl,--wrap,_malloc_r", "-Wl,--wrap,_memalign_r", "-Wl,--wrap,_realloc_r", "-Wl,--wrap,_calloc_r", "-Wl,--wrap=printf", "-Wl,--whole-archive", ] # Board related headfiles search path. board_include_dirs = [ "//utils/native/lite/include", "//commonlibrary/utils_lite/include", "//third_party/mbedtls/include", "//third_party/bounds_checking_function/include", ] # Board adapter dir for OHOS components. board_adapter_dir = "" # Sysroot path. board_configed_sysroot = "" # Board storage type, it used for file system generation. storage_type = ""