aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pw_cpu_exception/BUILD.gn25
-rw-r--r--targets/stm32f429i_disc1/target_toolchains.gni1
2 files changed, 26 insertions, 0 deletions
diff --git a/pw_cpu_exception/BUILD.gn b/pw_cpu_exception/BUILD.gn
index 879bb9c75..3be9750d7 100644
--- a/pw_cpu_exception/BUILD.gn
+++ b/pw_cpu_exception/BUILD.gn
@@ -58,6 +58,31 @@ pw_facade("entry") {
public = [ "public/pw_cpu_exception/entry.h" ]
}
+# The entry facade is hard tied to the definition of the pw_cpu_exception_State,
+# so spliting them into separate facades would require extra configurations
+# along with extra compatibility checks to ensure they are never mismatched.
+#
+# Instead, this ":entry_impl" target collects the entry implementation from the
+# backend that depends on the handler which in turn depends on ":entry" to avoid
+# circular deps.
+#
+# This group ("$dir_pw_cpu_exception:entry_impl") must listed in
+# pw_build_LINK_DEPS if pw_cpu_exception_ENTRY_BACKEND is set.
+#
+# Entry backends must provide their own "*.impl" target that collects their
+# entry implementation.
+group("entry_impl") {
+ # TODO(ewout): Enable this once customers have added this target to their
+ # pw_build_LINK_DEPS:
+ #
+ # public_deps = []
+ #
+ # if (pw_cpu_exception_ENTRY_BACKEND != "") {
+ # public_deps += [ get_label_info(pw_cpu_exception_ENTRY_BACKEND,
+ # "label_no_toolchain") + ".impl" ]
+ # }
+}
+
pw_facade("handler") {
backend = pw_cpu_exception_HANDLER_BACKEND
public_configs = [ ":default_config" ]
diff --git a/targets/stm32f429i_disc1/target_toolchains.gni b/targets/stm32f429i_disc1/target_toolchains.gni
index bc28991ca..e5d5bbeca 100644
--- a/targets/stm32f429i_disc1/target_toolchains.gni
+++ b/targets/stm32f429i_disc1/target_toolchains.gni
@@ -81,6 +81,7 @@ _target_config = {
pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
+ "$dir_pw_cpu_exception:entry_impl",
"$dir_pw_log:impl",
]