1# Copyright (c) 2022 FuZhou Lockzhiner Electronic 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-gcc" 30 31use_board_toolchain = true 32 33# The toolchain path instatlled, it's not mandatory if you have added toolchian path to your ~/.bashrc. 34board_toolchain_path = "" 35 36# Compiler prefix. 37board_toolchain_prefix = "arm-none-eabi-" 38 39# Compiler type, "gcc" or "clang". 40board_toolchain_type = "gcc" 41 42# xts ldflags 43board_ld_flags_xts = [ 44 "-Wl,--start-group", 45 "-Wl,--whole-archive", 46 47 # xts测试套件 48 "-lhal_update_static", 49 "-lhctest", 50 "-lhota", 51 "-lhuks_test_common", 52 "-lmodule_ActsBootstrapTest", 53 "-lmodule_ActsDfxFuncTest", 54 "-lmodule_ActsHieventLiteTest", 55 "-lmodule_ActsHuksHalFunctionTest", 56 "-lmodule_ActsKvStoreTest", 57 "-lmodule_ActsParameterTest", 58 "-lmodule_ActsSamgrTest", 59 "-lmodule_ActsUpdaterFuncTest", 60 "-lmodule_ActsUtilsFileTest", 61 "-lmodule_ActsWifiIotTest", 62 "-lmodule_ActsWifiServiceTest", 63 "-Wl,--no-whole-archive", 64 "-Wl,--end-group", 65] 66 67# lockzhiner applications 68board_ld_flags_lockzhiner = [ 69 "-Llibs", 70 "-lblackbox", 71 "-lhal_wifiaware", 72 "-lhal_token_static", 73 "-lhidumper_mini", 74 "-lhilog_static", 75 "-lmbedtls", 76 "-lmusl-c", 77 "-lmusl-m", 78 "-lsamgr", 79 "-lsamgr_adapter", 80 "-lsamgr_source", 81 "-lwifiaware", 82 "-lwifiservice", 83 84 # 特殊处理的静态库 85 "-Wl,--start-group", 86 "-Wl,--whole-archive", 87 "-lbootstrap", 88 "-lhardware", 89 "-lkernel", 90 "-lhal_iothardware", 91 "-lcjson_static", 92 "-Wl,--no-whole-archive", 93 "-Wl,--end-group", 94] 95 96# Board related common compile flags. 97board_cflags = [ 98 "-nostartfiles", 99 "-std=c99", 100 "--inline", 101 "-ggdb", 102 "-gdwarf-2", 103 "-O0", 104 "-ffunction-sections", 105 "-fdata-sections", 106 "-mcpu=cortex-m4", 107 "-mthumb", 108 "-mthumb-interwork", 109 "-mfloat-abi=soft", 110 "-mfpu=fpv4-sp-d16", 111 "-mapcs-frame", 112 "-MD", 113 "-fno-stack-protector", 114 "-Wall", 115 "-D_BSD_SOURCE", 116] 117board_cxx_flags = [] 118board_ld_flags = [ 119 "-nostartfiles", 120 "-ffunction-sections", 121 "-fdata-sections", 122 "-mcpu=cortex-m4", 123 "-mthumb", 124 "-mthumb-interwork", 125 "-mapcs-frame", 126 "-mfloat-abi=soft", 127 "-mfpu=fpv4-sp-d16", 128 "-Wl,-Tbin/board.ld", 129 "-nostdlib", 130 "--specs=nosys.specs", 131 "-Wl,--wrap=printf", 132 "-Wl,--wrap=sprintf", 133 "-Wl,--wrap=snprintf", 134 "-Wl,--wrap=vsnprintf", 135 "-Wl,--wrap=vprintf", 136 "-Wl,--gc-sections", 137 "-Wl,--start-group", 138 "-Wl,--whole-archive", 139 "-lgcc", 140 "-Wl,--no-whole-archive", 141 "-Wl,--end-group", 142 "-Wl,-Map=OHOS_Image.map,--cref", 143 "-Wl,--gc-sections", 144] 145board_ld_flags += board_ld_flags_lockzhiner 146 147#board_ld_flags += board_ld_flags_xts 148 149# Board related headfiles search path. 150board_include_dirs = [ 151 "//device/soc/rockchip/rk2206/hardware/include", 152 "//device/soc/rockchip/rk2206/hardware/lib/CMSIS/Device/RK2206/Include", 153 "//third_party/musl/porting/liteos_m/kernel/include", 154 "//utils/native/lite/include", 155 "//third_party/mbedtls/include", 156 "//commonlibrary/utils_lite/include", 157] 158 159# Board adapter dir for OHOS components. 160board_adapter_dir = "//device/soc/rockchip/rk2206/adapter" 161 162# Sysroot path. 163board_configed_sysroot = "" 164 165# Board storage type, it used for file system generation. 166storage_type = "" 167