1d6aed566Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd.
2d6aed566Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3d6aed566Sopenharmony_ci# you may not use this file except in compliance with the License.
4d6aed566Sopenharmony_ci# You may obtain a copy of the License at
5d6aed566Sopenharmony_ci#
6d6aed566Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7d6aed566Sopenharmony_ci#
8d6aed566Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9d6aed566Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10d6aed566Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11d6aed566Sopenharmony_ci# See the License for the specific language governing permissions and
12d6aed566Sopenharmony_ci# limitations under the License.
13d6aed566Sopenharmony_ci
14d6aed566Sopenharmony_ciimport("//kernel/liteos_m/liteos.gni")
15d6aed566Sopenharmony_ci
16d6aed566Sopenharmony_cikernel_module("bsp_config") {
17d6aed566Sopenharmony_ci  sources = [
18d6aed566Sopenharmony_ci    "fs/fs_init.c",
19d6aed566Sopenharmony_ci    "fs/littlefs_hal.c",
20d6aed566Sopenharmony_ci    "hals/csky_driver/src/ck_usart.c",
21d6aed566Sopenharmony_ci    "hals/csky_driver/src/devices.c",
22d6aed566Sopenharmony_ci    "hals/csky_driver/src/dw_gpio.c",
23d6aed566Sopenharmony_ci    "hals/csky_driver/src/dw_timer.c",
24d6aed566Sopenharmony_ci    "hals/csky_driver/src/isr.c",
25d6aed566Sopenharmony_ci    "hals/csky_driver/src/pinmux.c",
26d6aed566Sopenharmony_ci    "hals/csky_driver/src/sys_freq.c",
27d6aed566Sopenharmony_ci    "libc/dprintf.c",
28d6aed566Sopenharmony_ci    "main.c",
29d6aed566Sopenharmony_ci    "startup.S",
30d6aed566Sopenharmony_ci  ]
31d6aed566Sopenharmony_ci  if (!defined(LOSCFG_TEST)) {
32d6aed566Sopenharmony_ci    # kernel's testsuites not enabled, use ower's
33d6aed566Sopenharmony_ci    sources += [ "test/task_demo.c" ]
34d6aed566Sopenharmony_ci  }
35d6aed566Sopenharmony_ci  include_dirs = [
36d6aed566Sopenharmony_ci    "//commonlibrary/utils_lite/include",
37d6aed566Sopenharmony_ci    "test",
38d6aed566Sopenharmony_ci    "libc",
39d6aed566Sopenharmony_ci  ]
40d6aed566Sopenharmony_ci}
41d6aed566Sopenharmony_ci
42d6aed566Sopenharmony_ciconfig("public") {
43d6aed566Sopenharmony_ci  ldflags = [
44d6aed566Sopenharmony_ci    "-mcpu=e802",
45d6aed566Sopenharmony_ci    "-Wl,-T" + rebase_path("liteos.ld"),
46d6aed566Sopenharmony_ci    "-nostdlib",
47d6aed566Sopenharmony_ci  ]
48d6aed566Sopenharmony_ci
49d6aed566Sopenharmony_ci  libs = [ "gcc" ]
50d6aed566Sopenharmony_ci
51d6aed566Sopenharmony_ci  include_dirs = [
52d6aed566Sopenharmony_ci    ".",
53d6aed566Sopenharmony_ci    "hals/csky_driver/include",
54d6aed566Sopenharmony_ci    "fs",
55d6aed566Sopenharmony_ci  ]
56d6aed566Sopenharmony_ci}
57