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# -------------------- 17# --- OS Platforms --- 18# -------------------- 19 20platform( 21 name = "freertos", 22 constraint_values = [ 23 "//pw_build/constraints/rtos:freertos", 24 "@platforms//os:none", 25 ], 26) 27 28platform( 29 name = "embos", 30 constraint_values = [ 31 "//pw_build/constraints/rtos:embos", 32 "@platforms//os:none", 33 ], 34) 35 36platform( 37 name = "threadx", 38 constraint_values = [ 39 "//pw_build/constraints/rtos:threadx", 40 "@platforms//os:none", 41 ], 42) 43 44# -------------------------- 45# --- Hardware Platforms --- 46# -------------------------- 47platform( 48 name = "lm3s6965evb", 49 constraint_values = [ 50 "@pw_toolchain//constraints/arm_mcpu:cortex-m3", 51 "//pw_build/constraints/chipset:lm3s6965evb", 52 "//pw_sys_io_baremetal_lm3s6965evb:backend", 53 "@platforms//cpu:armv7-m", 54 "@rust_crates//:no_std", 55 ], 56) 57 58platform( 59 name = "nrf52833", 60 constraint_values = [ 61 "@pw_toolchain//constraints/arm_mcpu:cortex-m0", 62 "//pw_build/constraints/chipset:nrf52833", 63 "@platforms//cpu:armv6-m", 64 ], 65) 66 67# Primarily a QEMU supported m0 target for rust development, based on the 68# nRF51822. 69platform( 70 name = "microbit", 71 constraint_values = [ 72 "//pw_build/constraints/board:microbit", 73 "@rust_crates//:no_std", 74 # We have no pw_sys_io backend for this platform. 75 ], 76 parents = [":nrf52833"], 77) 78 79# ---------------------- 80# --- Test Platforms --- 81# ---------------------- 82 83# This is a platform for compilation testing of freertos backends. This is not 84# a complete specification of any real target platform. 85platform( 86 name = "testonly_freertos", 87 constraint_values = [ 88 # Use FreeRTOS backends. 89 "//pw_build/constraints/rtos:freertos", 90 # Use the FreeRTOS config file for stm32f429i_disc1_stm32cube. 91 "//targets/stm32f429i_disc1_stm32cube:freertos_config_cv", 92 # Use the ARM_CM4F port of FreeRTOS. 93 "@freertos//:port_ARM_CM4F", 94 # Use the baremetal pw_sys_io backend (because the default 95 # pw_sys_io_stdio backend is not compatible with FreeRTOS). 96 "//pw_sys_io_baremetal_stm32f429:backend", 97 # Select cortex-m backends 98 "//pw_cpu_exception:basic_handler_backend", 99 "//pw_cpu_exception_cortex_m:entry_backend", 100 "//pw_cpu_exception_cortex_m:support_backend", 101 "//pw_interrupt_cortex_m:backend", 102 "//pw_malloc_freertos:backend", 103 # os:none means, we're not building for any host platform (Windows, 104 # Linux, or Mac). The pw_sys_io_baremetal_stm32f429 backend is only 105 # compatible with os:none. 106 "@platforms//os:none", 107 # For toolchain resolution. 108 "@pw_toolchain//constraints/arm_mcpu:cortex-m4", 109 ], 110) 111 112# ---------------------- 113# --- Misc Platforms --- 114# ---------------------- 115 116platform( 117 name = "none", 118 constraint_values = ["@platforms//os:none"], 119) 120