blob: c1206f522aed666a92f8f86dc226a5f149b8ec74 [file] [log] [blame]
Armando Montanez5104cd62019-12-10 14:36:43 -08001# 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
Armando Montanezfb3d3fb2020-06-09 18:12:12 -070015# gn-format disable
16import("//build_overrides/pigweed.gni")
17
Alexei Frolovedd2f142020-06-09 19:11:27 -070018import("$dir_pw_build/target_types.gni")
Armando Montanez5104cd62019-12-10 14:36:43 -080019import("$dir_pw_docgen/docs.gni")
20import("$dir_pw_unit_test/test.gni")
Alexei Frolov258fc1b2020-06-10 16:24:50 -070021config("default_config") {
22 include_dirs = [ "public" ]
23}
Armando Montanez5104cd62019-12-10 14:36:43 -080024
Armando Montanez356bf972020-06-04 10:35:55 -070025pw_source_set("support") {
Alexei Frolov258fc1b2020-06-10 16:24:50 -070026 public_configs = [ ":default_config" ]
Armando Montanez356bf972020-06-04 10:35:55 -070027 public_deps = [
28 "$dir_pw_cpu_exception:support_facade",
Alexei Frolov258fc1b2020-06-10 16:24:50 -070029 "$dir_pw_preprocessor",
Armando Montanez356bf972020-06-04 10:35:55 -070030 "$dir_pw_string",
Alexei Frolov258fc1b2020-06-10 16:24:50 -070031 ]
32 public = [ "public/pw_cpu_exception_armv7m/cpu_state.h" ]
Armando Montanez356bf972020-06-04 10:35:55 -070033 sources = [ "cpu_state.cc" ]
34}
35
36pw_source_set("pw_cpu_exception_armv7m") {
37 public_configs = [ ":default_config" ]
38 public_deps = [
39 ":support",
40 "$dir_pw_cpu_exception:entry_facade",
41 "$dir_pw_cpu_exception:handler",
42 "$dir_pw_preprocessor",
Alexei Frolov258fc1b2020-06-10 16:24:50 -070043 ]
Armando Montanez356bf972020-06-04 10:35:55 -070044 sources = [ "entry.cc" ]
Alexei Frolov258fc1b2020-06-10 16:24:50 -070045}
Armando Montanez5104cd62019-12-10 14:36:43 -080046
Alexei Frolov258fc1b2020-06-10 16:24:50 -070047pw_test_group("tests") {
48 tests = [ ":cpu_exception_entry_test" ]
49}
Armando Montanez5104cd62019-12-10 14:36:43 -080050
Alexei Frolov258fc1b2020-06-10 16:24:50 -070051pw_test("cpu_exception_entry_test") {
Armando Montanez356bf972020-06-04 10:35:55 -070052 deps = [ ":pw_cpu_exception_armv7m" ]
Alexei Frolov258fc1b2020-06-10 16:24:50 -070053 sources = [ "exception_entry_test.cc" ]
Armando Montanez5104cd62019-12-10 14:36:43 -080054}
55
56pw_doc_group("docs") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080057 sources = [ "docs.rst" ]
Armando Montanez5104cd62019-12-10 14:36:43 -080058}