1# Copyright (c) 2022 ASR Microelectronics (Shanghai) Co., Ltd. All rights reserved. 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, e.g. "cortex-a7", "riscv32". 21board_cpu = "cortex-m4" 22 23# Board arch, e.g. "armv7-a", "rv32imac". 24board_arch = "" 25 26# Toolchain name used for system compiling. 27# E.g. gcc-arm-none-eabi, arm-linux-harmonyeabi-gcc, ohos-clang, riscv32-unknown-elf. 28# Note: The default toolchain is "ohos-clang". It's not mandatory if you use the default toochain. 29board_toolchain = "arm-none-eabi" 30 31#use_board_toolchain = true 32 33# The toolchain path instatlled, it's not mandatory if you have added toolchian path to your ~/.bashrc. 34# board_toolchain_path = rebase_path("//device/soc/asrmicro/gcc/gcc-arm-none-eabi/Linux64/bin") 35board_toolchain_path = "" 36 37# Compiler prefix. 38board_toolchain_prefix = "arm-none-eabi-" 39 40# Compiler type, "gcc" or "clang". 41board_toolchain_type = "gcc" 42 43# config.json parse 44if (product_path != "") { 45 product_conf = read_file("${product_path}/config.json", "json") 46 product_name = product_conf.product_name 47 xts_list = product_conf.xts_list 48 tests_list = product_conf.tests_list 49} 50 51# Board related common compile flags. 52 53board_cflags = [ 54 "-mfloat-abi=softfp", 55 "-mcpu=cortex-m4", 56 "-mthumb", 57 "-mthumb-interwork", 58 "-mfloat-abi=softfp", 59 "-mfpu=fpv4-sp-d16", 60 "-W", 61 "-std=gnu99", 62 "-fdata-sections", 63 "-ffunction-sections", 64 "-fno-builtin", 65 "-fno-strict-aliasing", 66 67 #"-fno-short-enums", 68 "-ggdb", 69 "-Wall", 70 "-Wfatal-errors", 71 "-fsigned-char", 72 "-fno-common", 73 "-std=gnu11", 74 75 #"-std=c99", 76 "-Wno-unused-label", 77 "-DDUET_CM4", 78 "-D__FPU_PRESENT=1", 79 80 #"-D__FPU_USED=1", 81 #"-DLWIP_2_1_2", 82 #"-DLWIP_DHCP", 83 #"-D_POSIX_SOURCE", 84 #"-D_GNU_SOURCE=1", 85 "-DCFG_NAN_CONFIG", 86 "-D__LITEOS_M__", 87 "-Wno-unused-parameter", 88 "-Wno-sign-compare", 89 "-Wno-parentheses", 90 "-Wno-cast-function-type", 91] 92 93board_cxx_flags = board_cflags 94 95board_ld_flags = [ 96 "-mcpu=cortex-m4", 97 "-mthumb", 98 "-mthumb-interwork", 99 "-mfloat-abi=softfp", 100 "-mfpu=fpv4-sp-d16", 101 "-W", 102] 103 104# Newlib adapt. 105board_ld_flags += [ 106 "-Wl,--wrap=_free_r", 107 "-Wl,--wrap=_malloc_usable_size_r", 108 "-Wl,--wrap=_malloc_r", 109 "-Wl,--wrap=_memalign_r", 110 "-Wl,--wrap=_realloc_r", 111 "-Wl,--wrap=printf", 112 "-Wl,--wrap=sprintf", 113 "-Wl,--wrap=snprintf", 114 "-Wl,--wrap=vprintf", 115 "-Wl,--wrap=vsprintf", 116 "-Wl,--wrap=vsnprintf", 117] 118 119# Board related headfiles search path. 120board_include_dirs = [ 121 "//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/platform/system/include/", 122 "//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/platform/CMSIS/Include/", 123 "//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/platform/misc/", 124 "//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/kv/include/", 125 "//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/driver/inc/", 126 "//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/common/", 127 "//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/include/", 128 "//device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/iperf/", 129 "//device/soc/asrmicro/asr582x/liteos_m/sdk/config/", 130 "//device/soc/asrmicro/asr582x/liteos_m/sdk/liteos_m/", 131 "//kernel/liteos_m/kernel/arch/arm/cortex-m4/gcc/", 132 "//kernel/liteos_m/kernel/arch/include/", 133 "//kernel/liteos_m/utils/", 134 "//kernel/liteos_m/kal/cmsis/", 135 "//device/soc/asrmicro/asr582x/liteos_m/sdk/rtos", 136 "//commonlibrary/utils_lite/kal/timer/", 137 "//commonlibrary/utils_lite/include/", 138 "//third_party/bounds_checking_function/include", 139 "//kernel/liteos_m/kernel/include/", 140 "//kernel/liteos_m/kal/posix/include/", 141 "//kernel/liteos_m/components/exchook/", 142 "//third_party/openssl", 143 "//third_party/openssl/include", 144 "//third_party/openssl/crypto/include", 145 "//third_party/openssl/crypto/ec", 146] 147board_include_dirs += [] 148 149# Board adapter dir for OHOS components. 150board_adapter_dir = "" 151 152# Sysroot path. 153board_configed_sysroot = "" 154 155# Board storage type, it used for file system generation. 156storage_type = "" 157#ohos_build_type = "release" 158