rp2040: Add backend for atomic operations

Following http://pwrev.dev/232351, use of pw_metric requires having an
atomic backend set if the platform does not natively support them. This
sets that backend for the Kudzu device target.

Change-Id: Ia7d19d949e3bb93ff727ce5eaf210d9026cc6dd2
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/kudzu/+/273014
Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Pigweed-Auto-Submit: Alexei Frolov <frolv@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Keir Mierle <keir@google.com>
diff --git a/targets/rp2040/BUILD.bazel b/targets/rp2040/BUILD.bazel
index b4c4942..d0036ff 100644
--- a/targets/rp2040/BUILD.bazel
+++ b/targets/rp2040/BUILD.bazel
@@ -37,6 +37,7 @@
     deps = [
         "//targets/rp2040:pre_init",
         "@pico-sdk//src/common/pico_stdlib:pico_stdlib",
+        "@pigweed//pw_atomic:atomic_cortex_m",
         "@pigweed//pw_tokenizer:linker_script",
     ],
     alwayslink = 1,
diff --git a/targets/rp2040/BUILD.gn b/targets/rp2040/BUILD.gn
index 1de97a5..bf04e40 100644
--- a/targets/rp2040/BUILD.gn
+++ b/targets/rp2040/BUILD.gn
@@ -66,6 +66,7 @@
     pw_build_LINK_DEPS += [
       "//targets/rp2040:pre_init",
       "$dir_pw_assert:impl",
+      "$dir_pw_atomic:atomic_cortex_m",
       "$dir_pw_log:impl",
       "$dir_pigweed/targets/rp2040:float_printf_adapter",
     ]