• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 Beken Corporation
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"
19
20# Board CPU type, e.g. "cortex-a7", "riscv32".
21board_cpu = ""
22
23# Board arch, e.g.  "armv7-a", "rv32imac".
24board_arch = "rv32imfcxandes"
25
26#"rv32imac"
27
28# Toolchain name used for system compiling.
29# E.g. gcc-arm-none-eabi, arm-linux-harmonyeabi-gcc, ohos-clang,  riscv32-unknown-elf.
30# Note: The default toolchain is "ohos-clang". It's not mandatory if you use the default toolchain.
31board_toolchain = "riscv32-unknown-elf"
32
33# The toolchain path installed, it's not mandatory if you have added toolchain path to your ~/.bashrc.
34board_toolchain_path = ""
35
36# Compiler prefix.
37board_toolchain_prefix = "riscv32-unknown-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  product_name = product_conf.product_name
46  xts_list = product_conf.xts_list
47  tests_list = product_conf.tests_list
48}
49
50# Board related common compile flags.not in --start-group
51board_cflags = [
52  "-std=c99",
53  "-mstrict-align",
54  "-Wl,--gc-sections",
55  "-ffunction-sections",
56  "-fdata-sections",
57  "-D__LITEOS__",
58  "-DCFG_SUPPORT_LITEOS",
59  "-DBEKEN_PLATFORM",
60  "-Wno-strict-prototypes",
61  "-Wno-parentheses",
62  "-nostdlib",
63  "-Wl,-wrap,strlen",
64  "-Wl,-wrap,malloc",
65  "-Wl,-wrap,_malloc_r",
66  "-Wl,-wrap,free",
67  "-Wl,-wrap,_free_r",
68  "-Wl,-wrap,zalloc",
69  "-Wl,-wrap,calloc",
70  "-Wl,-wrap,realloc",
71  "-Wl,-wrap,_realloc_r",
72  "-Wl,-wrap,printf",
73  "-Wl,-wrap,vsnprintf",
74  "-Wl,-wrap,snprintf",
75  "-Wl,-wrap,sprintf",
76  "-Wl,-wrap,puts",
77  "-Wl,--defsym,vprintf=bk_wrap_vprintf",
78  "-Wl,--defsym,__ctype_ptr__=bk_wrap__ctype_ptr__",
79  "-Wl,-wrap,strncmp",
80  "-Wl,-wrap,HalTrapEntry",
81  "-Wl,-wrap,HalTrapVector",
82  "-Wl,-wrap,HalTaskContextSwitch",
83  "-Wl,-wrap,HalStartToRun",
84  "-Wl,-wrap,ArchTskStackInit",
85  "-Wl,--defsym,memcpy=memcpy_ss",
86  "-Wl,--defsym,memcmp=memcmp_ss",
87  "-Wl,--defsym,siprintf=sprintf",
88  "-Wl,--defsym,sniprintf=snprintf",
89]
90board_cxx_flags = board_cflags
91board_ld_flags = []
92board_asmflags = []
93
94beken_chip_type = "bk7235"
95soc_company = "beken"
96beken_sdk_dir = "${ohos_root_path}/device/soc/${soc_company}/${beken_chip_type}/liteos_m/bk_sdk_armino"
97extra_include_dir = "${ohos_root_path}/device/soc/${soc_company}/${beken_chip_type}/liteos_m/inc"
98third_party_adatpter_path = "${ohos_root_path}/device/soc/${soc_company}/${beken_chip_type}/liteos_m/third_party_adapter"
99
100# Board related headfiles search path.
101board_include_dirs = [
102  "${extra_include_dir}",
103  "${ohos_root_path}utils/native/lite/include",
104  "${ohos_root_path}third_party/bounds_checking_function/include",
105  "${ohos_root_path}kernel/liteos_m/config",
106  "${ohos_root_path}kernel/liteos_m/kal/cmsis",
107  "${ohos_root_path}kernel/liteos_m/utils",
108  "${ohos_root_path}kernel/liteos_m/components/cpup",
109  "${ohos_root_path}kernel/liteos_m/components/power",
110  "${ohos_root_path}kernel/liteos_m/kernel/include",
111  "${ohos_root_path}kernel/liteos_m/arch/include",
112  "${ohos_root_path}kernel/liteos_m/arch/risc-v/riscv32/gcc",
113  "${ohos_root_path}kernel/liteos_m/arch/risc-v/riscv32/gcc/asm",
114  "${ohos_root_path}third_party/musl/porting/liteos_m/kernel/include",
115
116  "${beken_sdk_dir}/build/openharmony/${beken_chip_type}/config",
117]
118
119# Board adapter dir for OHOS components.
120board_adapter_dir =
121    "${ohos_root_path}device/soc/${soc_company}/${beken_chip_type}"
122
123# Sysroot path.
124board_configed_sysroot = ""
125
126# Board storage type, it used for file system generation.
127storage_type = ""
128