• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2021 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14package(default_visibility = ["//visibility:public"])
15
16# --- OS's ---
17platform(
18    name = "freertos",
19    constraint_values = [
20        "//pw_build/constraints/rtos:freertos",
21        "@platforms//os:none",
22    ],
23)
24
25platform(
26    name = "embos",
27    constraint_values = [
28        "//pw_build/constraints/rtos:embos",
29        "@platforms//os:none",
30    ],
31)
32
33platform(
34    name = "threadx",
35    constraint_values = [
36        "//pw_build/constraints/rtos:threadx",
37        "@platforms//os:none",
38    ],
39)
40
41platform(
42    name = "none",
43    constraint_values = ["@platforms//os:none"],
44)
45
46# --- CPU's ---
47platform(
48    name = "cortex_m0",
49    constraint_values = ["@pigweed_config//:target_rtos"],
50    parents = ["@bazel_embedded//platforms:cortex_m0"],
51)
52
53platform(
54    name = "cortex_m1",
55    constraint_values = ["@pigweed_config//:target_rtos"],
56    parents = ["@bazel_embedded//platforms:cortex_m1"],
57)
58
59platform(
60    name = "cortex_m3",
61    constraint_values = ["@pigweed_config//:target_rtos"],
62    parents = ["@bazel_embedded//platforms:cortex_m3"],
63)
64
65platform(
66    name = "cortex_m4",
67    constraint_values = ["@pigweed_config//:target_rtos"],
68    parents = ["@bazel_embedded//platforms:cortex_m4"],
69)
70
71platform(
72    name = "cortex_m4_fpu",
73    constraint_values = ["@pigweed_config//:target_rtos"],
74    parents = ["@bazel_embedded//platforms:cortex_m4_fpu"],
75)
76
77platform(
78    name = "cortex_m7",
79    constraint_values = ["@pigweed_config//:target_rtos"],
80    parents = ["@bazel_embedded//platforms:cortex_m7"],
81)
82
83platform(
84    name = "cortex_m7_fpu",
85    constraint_values = ["@pigweed_config//:target_rtos"],
86    parents = ["@bazel_embedded//platforms:cortex_m7_fpu"],
87)
88
89# --- Chipsets ---
90platform(
91    name = "stm32f429",
92    constraint_values = ["//pw_build/constraints/chipset:stm32f429"],
93    parents = [":cortex_m4"],
94)
95
96platform(
97    name = "lm3s6965evb",
98    constraint_values = ["//pw_build/constraints/chipset:lm3s6965evb"],
99    parents = [":cortex_m3"],
100)
101
102platform(
103    name = "nrf52833",
104    constraint_values = ["//pw_build/constraints/chipset:nrf52833"],
105    parents = [":cortex_m0"],
106)
107
108# --- Boards ---
109platform(
110    name = "stm32f429i-disc1",
111    constraint_values = ["//pw_build/constraints/board:stm32f429i-disc1"],
112    parents = [":stm32f429"],
113)
114
115platform(
116    name = "microbit",
117    constraint_values = ["//pw_build/constraints/board:microbit"],
118    parents = [":nrf52833"],
119)
120
121# --- Test platforms ---
122
123# This is a platform for compilation testing of freertos backends. This is not
124# a complete specification of any real target platform.
125platform(
126    name = "testonly_freertos",
127    constraint_values = [
128        # Use FreeRTOS backends.
129        "//pw_build/constraints/rtos:freertos",
130        # Use the FreeRTOS config file for stm32f429i_disc1_stm32cube.
131        "//targets/stm32f429i_disc1_stm32cube:freertos_config_cv",
132        # Use the ARM_CM4F port of FreeRTOS.
133        "@freertos//:port_ARM_CM4F",
134        # Specify this chipset to use the baremetal pw_sys_io backend (because
135        # the default pw_sys_io_stdio backend is not compatible with FreeRTOS).
136        "//pw_build/constraints/chipset:stm32f429",
137        # os:none means, we're not building for any host platform (Windows,
138        # Linux, or Mac). The pw_sys_io_baremetal_stm32f429 backend is only
139        # compatible with os:none.
140        "@platforms//os:none",
141    ],
142    # Inherit from cortex_m4_fpu to use the appropriate Arm toolchain.
143    parents = [":cortex_m4_fpu"],
144)
145