1# Copyright (c) 2021 FnLink (hunan) Technologies CO., LIMITED. 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-m33" 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 31# The toolchain path instatlled, it's not mandatory if you have added toolchian path to your ~/.bashrc. 32board_toolchain_path = "" 33 34# Compiler prefix. 35board_toolchain_prefix = "arm-none-eabi-" 36 37# Compiler type, "gcc" or "clang". 38board_toolchain_type = "gcc" 39 40# config.json parse 41if (product_path != "") { 42 product_conf = read_file("${product_path}/config.json", "json") 43 product_name = product_conf.product_name 44 flash_partition_dir = product_conf.flash_partition_dir 45 bin_list = product_conf.bin_list 46 fs_list = product_conf.fs_list 47 bsp_bin_list = product_conf.bsp_bin_list 48 pack_burn = product_conf.pack_burn 49} 50flash_size = 32 51 52# Board related common compile flags. 53board_cflags = [ 54 "-mcpu=cortex-m33", 55 "-mfpu=fpv5-sp-d16", 56 "-mfloat-abi=hard", 57 "-fdata-sections", 58 "-mthumb", 59 "-mthumb-interwork", 60 "-DPLAYER_TOOL", 61 "-DCHIP_BEST2003", 62 "-DOS_HEAP_SIZE=0x400000", 63 "-DCHIP_HAS_UART=3", 64 "-DRTOS", 65 "-DDEBUG=1", 66 "-DCMSIS_OS_VER=2", 67 "-DOS_HWI_MAX_NUM=96", 68 "-DCONFIG_DISPLAY_A064", 69 "-DLFS_MAX_OPEN_DIRS=32", 70 "-DMBEDTLS_CMSIS_FILE=\"rtos/liteos/liteos_m/kal/cmsis/cmsis_os.h\"", 71 "-DLOSCFG_BASE_CORE_HILOG", 72 "-DPTHREAD_KEYS_MAX=128", 73] 74 75board_cxx_flags = board_cflags 76board_ld_flags = [ "-L${ohos_root_path}out/${board_name}/${product_name}/libs" ] 77 78# fs functions support 79wrap_fs_api = "true" 80foreach(fs, fs_list) { 81 if (fs.enable == "true") { 82 wrap_fs_api = "true" 83 } 84} 85 86if (wrap_fs_api == "true") { 87 board_ld_flags += [ 88 "-Wl,--wrap=_calloc_r", 89 "-Wl,--wrap=_malloc_r", 90 "-Wl,--wrap=_realloc_r", 91 "-Wl,--wrap=_reallocf_r", 92 "-Wl,--wrap=_free_r", 93 "-Wl,--wrap=_memalign_r", 94 "-Wl,--wrap=_malloc_usable_size_r", 95 "-Wl,--wrap=printf", 96 "-Wl,--wrap=sprintf", 97 "-Wl,--wrap=snprintf", 98 "-Wl,--wrap=vsnprintf", 99 "-Wl,--wrap=vprintf", 100 ] 101} 102 103# Board related headfiles search path. 104board_include_dirs = [ 105 "${ohos_root_path}device/soc/bestechnic/bes2600/liteos_m/sdk/bsp/include/rtos/liteos/liteos_m/kal/cmsis", 106 "${ohos_root_path}utils/native/lite/include", 107] 108board_include_dirs += [] 109 110# Board adapter dir for OHOS components. 111board_adapter_dir = "${ohos_root_path}device/soc/bestechnic" 112 113# Sysroot path. 114board_configed_sysroot = "" 115 116# Board storage type, it used for file system generation. 117storage_type = "" 118