1# Copyright (c) 2022 Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK") 2# All rights reserved. 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16import("//kernel/liteos_m/liteos.gni") 17 18kernel_module("platform_main") { 19 sources = [ 20 "src/_stub.c", 21 "src/board_config.c", 22 "src/canary.c", 23 "src/inject_start.S", 24 "src/littlefs_hal.c", 25 "src/main.c", 26 "src/power_b91.c", 27 "src/reset_vector.S", 28 "src/riscv_irq.c", 29 "src/system.c", 30 "src/system_b91.c", 31 ] 32 33 deps = [ 34 "//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite", 35 "//base/hiviewdfx/hiview_lite", 36 ] 37 38 include_dirs = [ 39 "//base/hiviewdfx/hilog_lite/frameworks/mini", 40 "//third_party/glib/glib/gnulib", 41 "//third_party/littlefs", 42 "//third_party/musl/porting/liteos_m/kernel/include", 43 "//kernel/liteos_m/components/fs", 44 "//kernel/liteos_m/components/fs/littlefs", 45 ] 46 47 configs += [ "../:B91_config" ] 48 49 if (!defined(defines)) { 50 defines = [] 51 } 52} 53 54config("public") { 55 lib_dirs = [ "$root_out_dir/libs" ] 56 57 ldflags = [ 58 "-z", 59 "muldefs", 60 "-Wl,--gc-sections", 61 "-Wl,-T" + rebase_path("../liteos.ld"), 62 ] 63} 64