Skip to content

Commit

Permalink
targets/rp2040: Additional bazel build file coverage
Browse files Browse the repository at this point in the history
Bug: 303255049, 305746219
Change-Id: Ib46cff3b9b2962ba21e2e9be25f37c7cdea85ab1
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/211351
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
Reviewed-by: Ted Pudlik <tpudlik@google.com>
  • Loading branch information
AnthonyDiGirolamo authored and CQ Bot Account committed May 24, 2024
1 parent 8404cda commit c5c7951
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 10 deletions.
30 changes: 27 additions & 3 deletions pw_digital_io_rp2040/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,40 @@
# License for the specific language governing permissions and limitations under
# the License.

load(
"//pw_build:pigweed.bzl",
"pw_cc_test",
)

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

# RP2040 is not supported on bazel.
filegroup(
cc_library(
name = "pw_digital_io_rp2040",
srcs = [
"digital_io.cc",
"digital_io_test.cc",
],
hdrs = [
"public/pw_digital_io_rp2040/digital_io.h",
],
includes = [
"public",
],
# TODO: b/261603269 - Get this to build.
tags = ["manual"],
deps = [
"//pw_digital_io",
"//pw_status",
"@pico-sdk//src/common/pico_stdlib",
"@pico-sdk//src/rp2_common/hardware_gpio",
],
)

pw_cc_test(
name = "digital_io_test",
srcs = ["digital_io_test.cc"],
# TODO: b/261603269 - Get this to build.
tags = ["manual"],
deps = [":pw_digital_io_rp2040"],
)
1 change: 1 addition & 0 deletions pw_digital_io_rp2040/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pw_source_set("pw_digital_io_rp2040") {
deps = [
"$PICO_ROOT/src/common/pico_base",
"$PICO_ROOT/src/common/pico_stdlib",
"$PICO_ROOT/src/rp2_common/hardware_gpio",
]
public_deps = [
"$dir_pw_digital_io",
Expand Down
1 change: 1 addition & 0 deletions pw_i2c/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ cc_library(
],
includes = ["public"],
deps = [
":address",
"//pw_bytes",
"//pw_chrono:system_clock",
"//pw_status",
Expand Down
36 changes: 33 additions & 3 deletions pw_i2c_rp2040/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,46 @@
# License for the specific language governing permissions and limitations under
# the License.

load(
"//pw_build:pigweed.bzl",
"pw_cc_test",
)

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

# RP2040 is not supported on bazel.
filegroup(
cc_library(
name = "pw_i2c_rp2040",
srcs = [
"initiator.cc",
"initiator_test.cc",
],
hdrs = [
"public/pw_i2c_rp2040/initiator.h",
],
includes = [
"public",
],
# TODO: b/261603269 - Get this to build.
tags = ["manual"],
deps = [
"//pw_chrono:system_clock",
"//pw_digital_io",
"//pw_i2c:initiator",
"//pw_log",
"//pw_status",
"//pw_sync:lock_annotations",
"//pw_sync:mutex",
"@pico-sdk//src/common/pico_stdlib",
"@pico-sdk//src/rp2_common/hardware_gpio",
"@pico-sdk//src/rp2_common/hardware_i2c",
],
)

pw_cc_test(
name = "initiator_test",
srcs = ["initiator_test.cc"],
# TODO: b/261603269 - Get this to build.
tags = ["manual"],
deps = [":pw_i2c_rp2040"],
)
33 changes: 30 additions & 3 deletions pw_spi_rp2040/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,43 @@
# License for the specific language governing permissions and limitations under
# the License.

load(
"//pw_build:pigweed.bzl",
"pw_cc_test",
)

package(default_visibility = ["//visibility:public"])

licenses(["notice"])

# RP2040 is not supported on bazel.
filegroup(
cc_library(
name = "pw_spi_rp2040",
srcs = [
"initiator.cc",
"initiator_test.cc",
],
hdrs = [
"public/pw_spi_rp2040/initiator.h",
],
includes = [
"public",
],
# TODO: b/261603269 - Get this to build.
tags = ["manual"],
deps = [
"//pw_assert",
"//pw_log",
"//pw_spi:chip_selector_digital_out",
"//pw_spi:initiator",
"//pw_status",
"@pico-sdk//src/common/pico_stdlib",
"@pico-sdk//src/rp2_common/hardware_spi",
],
)

pw_cc_test(
name = "initiator_test",
srcs = ["initiator_test.cc"],
# TODO: b/261603269 - Get this to build.
tags = ["manual"],
deps = [":pw_spi_rp2040"],
)
2 changes: 2 additions & 0 deletions targets/rp2040/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ cc_library(
srcs = [
"boot.cc",
],
# TODO: b/261603269 - Get this to build.
tags = ["manual"],
target_compatible_with = [":freertos_config_cv"],
deps = [
":freertos_config",
Expand Down
2 changes: 1 addition & 1 deletion targets/rp2040/config/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#define configTASK_NOTIFICATION_ARRAY_ENTRIES 3
#define configUSE_MUTEXES 1
#define configUSE_RECURSIVE_MUTEXES 0
#define configUSE_COUNTING_SEMAPHORES 0
#define configUSE_COUNTING_SEMAPHORES 1
#define configQUEUE_REGISTRY_SIZE 10
#define configUSE_QUEUE_SETS 0
#define configUSE_TIME_SLICING 1
Expand Down

0 comments on commit c5c7951

Please sign in to comment.