aboutsummaryrefslogtreecommitdiff
path: root/pw_build/platforms/BUILD.bazel
blob: 554957766473dbd5a134a75ea5994b32f1ac966f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Copyright 2021 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
package(default_visibility = ["//visibility:public"])

# --- OS's ---
platform(
    name = "freertos",
    constraint_values = [
        "//pw_build/constraints/rtos:freertos",
        "@platforms//os:none",
    ],
)

platform(
    name = "embos",
    constraint_values = [
        "//pw_build/constraints/rtos:embos",
        "@platforms//os:none",
    ],
)

platform(
    name = "threadx",
    constraint_values = [
        "//pw_build/constraints/rtos:threadx",
        "@platforms//os:none",
    ],
)

platform(
    name = "none",
    constraint_values = ["@platforms//os:none"],
)

# --- CPU's ---
platform(
    name = "cortex_m0",
    constraint_values = ["@pigweed_config//:target_rtos"],
    parents = ["@bazel_embedded//platforms:cortex_m0"],
)

platform(
    name = "cortex_m1",
    constraint_values = ["@pigweed_config//:target_rtos"],
    parents = ["@bazel_embedded//platforms:cortex_m1"],
)

platform(
    name = "cortex_m3",
    constraint_values = ["@pigweed_config//:target_rtos"],
    parents = ["@bazel_embedded//platforms:cortex_m3"],
)

platform(
    name = "cortex_m4",
    constraint_values = ["@pigweed_config//:target_rtos"],
    parents = ["@bazel_embedded//platforms:cortex_m4"],
)

platform(
    name = "cortex_m4_fpu",
    constraint_values = ["@pigweed_config//:target_rtos"],
    parents = ["@bazel_embedded//platforms:cortex_m4_fpu"],
)

platform(
    name = "cortex_m7",
    constraint_values = ["@pigweed_config//:target_rtos"],
    parents = ["@bazel_embedded//platforms:cortex_m7"],
)

platform(
    name = "cortex_m7_fpu",
    constraint_values = ["@pigweed_config//:target_rtos"],
    parents = ["@bazel_embedded//platforms:cortex_m7_fpu"],
)

# --- Chipsets ---
platform(
    name = "stm32f429",
    constraint_values = ["//pw_build/constraints/chipset:stm32f429"],
    parents = [":cortex_m4"],
)

platform(
    name = "lm3s6965evb",
    constraint_values = ["//pw_build/constraints/chipset:lm3s6965evb"],
    parents = [":cortex_m3"],
)

platform(
    name = "nrf52833",
    constraint_values = ["//pw_build/constraints/chipset:nrf52833"],
    parents = [":cortex_m0"],
)

# --- Boards ---
platform(
    name = "stm32f429i-disc1",
    constraint_values = ["//pw_build/constraints/board:stm32f429i-disc1"],
    parents = [":stm32f429"],
)

platform(
    name = "microbit",
    constraint_values = ["//pw_build/constraints/board:microbit"],
    parents = [":nrf52833"],
)

# --- Test platforms ---

# This is a platform for compilation testing of freertos backends. This is not
# a complete specification of any real target platform.
platform(
    name = "testonly_freertos",
    constraint_values = [
        # Use FreeRTOS backends.
        "//pw_build/constraints/rtos:freertos",
        # Use the FreeRTOS config file for stm32f429i_disc1_stm32cube.
        "//targets/stm32f429i_disc1_stm32cube:freertos_config_cv",
        # Use the ARM_CM4F port of FreeRTOS.
        "@freertos//:port_ARM_CM4F",
        # Specify this chipset to use the baremetal pw_sys_io backend (because
        # the default pw_sys_io_stdio backend is not compatible with FreeRTOS).
        "//pw_build/constraints/chipset:stm32f429",
        # os:none means, we're not building for any host platform (Windows,
        # Linux, or Mac). The pw_sys_io_baremetal_stm32f429 backend is only
        # compatible with os:none.
        "@platforms//os:none",
    ],
    # Inherit from cortex_m4_fpu to use the appropriate Arm toolchain.
    parents = [":cortex_m4_fpu"],
)