• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd. All rights reserved.
2#
3# Redistribution and use in source and binary forms, with or without modification,
4# are permitted provided that the following conditions are met:
5#
6# 1. Redistributions of source code must retain the above copyright notice, this list of
7#    conditions and the following disclaimer.
8#
9# 2. Redistributions in binary form must reproduce the above copyright notice, this list
10#    of conditions and the following disclaimer in the documentation and/or other materials
11#    provided with the distribution.
12#
13# 3. Neither the name of the copyright holder nor the names of its contributors may be used
14#    to endorse or promote products derived from this software without specific prior written
15#    permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
19# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
24# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
27# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
29# Kernel type, e.g. "linux", "liteos_a", "liteos_m", "uniproton".
30kernel_type = "uniproton"
31
32# Kernel version.
33kernel_version = "3.0.0"
34
35# Board CPU type, e.g. "cortex-a7", "riscv32","cortex-m4".
36board_cpu = "cortex-m4"
37
38# Board arch, e.g.  "armv7-a", "rv32imac".
39board_arch = ""
40
41# Toolchain name used for system compiling.
42# E.g. gcc-arm-none-eabi, arm-linux-harmonyeabi-gcc, ohos-clang,  riscv32-unknown-elf.
43# Note: The default toolchain is "ohos-clang". It's not mandatory if you use the default toolchain.
44board_toolchain = "arm-none-eabi-gcc"
45
46use_board_toolchain = true
47
48# The toolchain path installed, it's not mandatory if you have added toolchain path to your ~/.bashrc.
49board_toolchain_path = ""
50
51# Compiler prefix.
52board_toolchain_prefix = "arm-none-eabi-"
53
54# Compiler type, "gcc" or "clang".
55board_toolchain_type = "gcc"
56
57#Debug compiler optimization level options
58board_opt_flags = []
59
60# Board related common compile flags.
61board_cflags = [
62  "-mcpu=cortex-m4",
63  "-fno-common",
64  "-fomit-frame-pointer",
65  "-fstack-protector-strong",
66  "-fdata-sections",
67  "-ffunction-sections",
68  "-fshort-enums",
69  "-funsigned-char",
70  "-mfloat-abi=softfp",
71  "-mfpu=vfpv4-d16",
72  "-mthumb",
73  "-Wa,-mimplicit-it=thumb",
74  "-O2",
75  "-DSECUREC_BUFFER_SIZE=32",
76  "-D__RTOS__",
77  "-DOS_DEVICE_CONFIG",
78  "-DSTM32F40XX",
79]
80board_cflags += board_opt_flags
81
82board_asmflags = [
83  "-mcpu=cortex-m4",
84  "-mfloat-abi=softfp",
85  "-mfpu=vfpv4-d16",
86  "-mthumb",
87  "-Wa,-mimplicit-it=thumb",
88  "-fno-common",
89  "-fomit-frame-pointer",
90  "-funsigned-char",
91  "-O2",
92]
93board_asmflags += board_opt_flags
94
95board_cxx_flags = board_cflags
96
97board_ld_flags = []
98
99board_ld_flags += []
100
101# Board related headfiles search path.
102board_include_dirs = [
103  "//third_party/mbedtls/include",
104  "//device/soc/st/stm32f407zg/uniproton/hals",
105  "//device/soc/st/stm32f407zg/uniproton/hals/cmsis",
106  "//third_party/cmsis",
107]
108
109# Board adapter dir for OHOS components.
110board_adapter_dir = "//device/soc/st/stm32f407zg/uniproton"
111
112# Sysroot path.
113board_configed_sysroot = ""
114
115# Board storage type, it used for file system generation.
116storage_type = "spinor"
117