1# Copyright 2019 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15import("//build_overrides/pigweed.gni")
16
17import("$dir_pw_build/target_types.gni")
18import("$dir_pw_docgen/docs.gni")
19import("$dir_pw_malloc/backend.gni")
20import("$dir_pw_toolchain/generate_toolchain.gni")
21import("target_toolchains.gni")
22
23generate_toolchains("target_toolchains") {
24  toolchains = pw_target_toolchain_stm32f429i_disc1_list
25}
26
27config("pw_malloc_active") {
28  if (pw_malloc_BACKEND != "") {
29    defines = [ "PW_MALLOC_ACTIVE=1" ]
30  }
31}
32
33if (current_toolchain != default_toolchain) {
34  pw_source_set("pre_init") {
35    configs = [ ":pw_malloc_active" ]
36    public_deps = [
37      "$dir_pw_boot_armv7m",
38      "$dir_pw_sys_io_baremetal_stm32f429",
39    ]
40    deps = [
41      "$dir_pw_malloc",
42      "$dir_pw_preprocessor",
43    ]
44    sources = [
45      "boot.cc",
46      "vector_table.c",
47    ]
48  }
49
50  pw_source_set("system_rpc_server") {
51    deps = [
52      "$dir_pw_hdlc:pw_rpc",
53      "$dir_pw_hdlc:rpc_channel_output",
54      "$dir_pw_rpc/system_server:facade",
55      "$dir_pw_stream:sys_io_stream",
56      dir_pw_log,
57    ]
58    sources = [ "system_rpc_server.cc" ]
59  }
60}
61
62pw_doc_group("target_docs") {
63  sources = [ "target_docs.rst" ]
64}
65