pw_thread_threadx: Add basic thread snapshotting

Adds an optional library for capturing ThreadX thread state in
proto snapshots.

Change-Id: I47dbc5a57faf3d4411255ea83f04f17bf0a4dc46
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/51405
Commit-Queue: Rob Mohr <mohrr@google.com>
Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
diff --git a/pw_thread/BUILD b/pw_thread/BUILD
index 3590e3e..a069b82 100644
--- a/pw_thread/BUILD
+++ b/pw_thread/BUILD
@@ -164,6 +164,25 @@
 )
 
 pw_cc_library(
+    name = "snapshot",
+    hdrs = [
+        "public/pw_thread/snapshot.h"
+    ],
+    srcs = [
+        "snapshot.cc"
+    ],
+    deps = [
+        ":util",
+        "//pw_thread:protos",
+        "//pw_bytes",
+        "//pw_function",
+        "//pw_protobuf",
+        "//pw_status",
+        "//pw_log",
+    ],
+)
+
+pw_cc_library(
     name = "test_threads_header",
     hdrs = [
         "public/pw_thread/test_threads.h",