blob: c9e60406994492ec292af369f5ef5503bf89d2c7 [file] [log] [blame]
armandomontanez6ff3e4f2024-06-13 07:50:04 -07001load("//bazel:defs.bzl", "compatible_with_rp2")
2load("//bazel/util:transition.bzl", "kitchen_sink_test_binary")
3
4package(default_visibility = ["//visibility:public"])
5
6cc_library(
7 name = "btstack_config",
8 hdrs = ["btstack_config.h"],
9 defines = [
10 "ENABLE_CLASSIC=1",
11 "ENABLE_BLE=1",
12 ],
13 includes = ["."],
14)
15
16cc_library(
17 name = "lwip_config",
18 hdrs = ["lwipopts.h"],
19 includes = ["."],
20)
21
22cc_library(
23 name = "mbedtls_config",
24 hdrs = ["mbedtls_config.h"],
25 includes = ["."],
26)
27
28cc_library(
29 name = "kitchen_sink_common",
30 testonly = True,
31 # So that the cpp one can see the c file.
32 hdrs = ["kitchen_sink.c"],
33 target_compatible_with = compatible_with_rp2(),
34 deps = [
35 "//src/common/pico_binary_info",
36 "//src/common/pico_bit_ops",
37 "//src/common/pico_divider",
38 "//src/common/pico_stdlib",
39 "//src/common/pico_sync",
40 "//src/common/pico_time",
41 "//src/common/pico_util",
42 "//src/rp2_common/hardware_adc",
43 "//src/rp2_common/hardware_claim",
44 "//src/rp2_common/hardware_clocks",
45 "//src/rp2_common/hardware_divider",
46 "//src/rp2_common/hardware_dma",
47 "//src/rp2_common/hardware_exception",
48 "//src/rp2_common/hardware_flash",
49 "//src/rp2_common/hardware_gpio",
50 "//src/rp2_common/hardware_i2c",
51 "//src/rp2_common/hardware_interp",
52 "//src/rp2_common/hardware_irq",
53 "//src/rp2_common/hardware_pio",
54 "//src/rp2_common/hardware_pll",
55 "//src/rp2_common/hardware_pwm",
56 "//src/rp2_common/hardware_resets",
57 "//src/rp2_common/hardware_rtc",
58 "//src/rp2_common/hardware_spi",
59 "//src/rp2_common/hardware_sync",
60 "//src/rp2_common/hardware_timer",
61 "//src/rp2_common/hardware_uart",
62 "//src/rp2_common/hardware_vreg",
63 "//src/rp2_common/hardware_watchdog",
64 "//src/rp2_common/hardware_xosc",
65 "//src/rp2_common/pico_bootrom",
66 "//src/rp2_common/pico_double",
67 "//src/rp2_common/pico_fix/rp2040_usb_device_enumeration",
68 "//src/rp2_common/pico_flash",
69 "//src/rp2_common/pico_float",
70 "//src/rp2_common/pico_i2c_slave",
71 "//src/rp2_common/pico_int64_ops",
72 "//src/rp2_common/pico_malloc",
73 "//src/rp2_common/pico_mem_ops",
74 "//src/rp2_common/pico_multicore",
75 "//src/rp2_common/pico_platform",
76 "//src/rp2_common/pico_printf",
77 "//src/rp2_common/pico_rand",
78 "//src/rp2_common/pico_runtime",
79 "//src/rp2_common/pico_stdio",
80 "//src/rp2_common/pico_unique_id",
81 "//test/pico_test",
82 ],
83)
84
85cc_binary(
86 name = "kitchen_sink",
87 testonly = True,
88 srcs = ["kitchen_sink.c"],
89 deps = [":kitchen_sink_common"],
90)
91
92cc_binary(
93 name = "kitchen_sink_cpp",
94 testonly = True,
95 srcs = ["kitchen_sink_cpp.cpp"],
96 deps = [":kitchen_sink_common"],
97)
98
99cc_binary(
100 name = "kitchen_sink_lwip_poll_actual",
101 testonly = True,
102 srcs = ["kitchen_sink.c"],
103 tags = ["manual"], # Built via kitchen_sink_lwip_poll
104 deps = [
105 ":kitchen_sink_common",
106 "//src/rp2_common/pico_cyw43_arch:pico_cyw43_arch_lwip_poll",
107 ],
108)
109
110cc_binary(
111 name = "kitchen_sink_lwip_background_actual",
112 testonly = True,
113 srcs = ["kitchen_sink.c"],
114 tags = ["manual"], # Built via kitchen_sink_lwip_background
115 deps = [
116 ":kitchen_sink_common",
117 "//src/rp2_common/pico_cyw43_arch:pico_cyw43_arch_lwip_threadsafe_background",
118 ],
119)
120
121kitchen_sink_test_binary(
122 name = "kitchen_sink_lwip_poll",
123 testonly = True,
124 src = ":kitchen_sink_lwip_poll_actual",
125 bt_stack_config = ":btstack_config",
126 lwip_config = ":lwip_config",
127 target_compatible_with = compatible_with_rp2(),
128)
129
130kitchen_sink_test_binary(
131 name = "kitchen_sink_lwip_background",
132 testonly = True,
133 src = ":kitchen_sink_lwip_background_actual",
134 bt_stack_config = ":btstack_config",
135 lwip_config = ":lwip_config",
136 target_compatible_with = compatible_with_rp2(),
137)