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. 14 15package(default_visibility = ["//visibility:public"]) 16 17licenses(["notice"]) 18 19# Exported because this file may be preprocessed with different defines for 20# different targets (platforms). 21exports_files(["basic_cortex_m.ld"]) 22 23cc_library( 24 name = "pw_boot_cortex_m", 25 srcs = [ 26 "core_init.c", 27 "public/pw_boot_cortex_m/boot.h", 28 ], 29 includes = ["public"], 30 target_compatible_with = select({ 31 "@platforms//cpu:armv7-m": [], 32 "@platforms//cpu:armv7e-m": [], 33 "@platforms//cpu:armv7e-mf": [], 34 "@platforms//cpu:armv8-m": [], 35 "//conditions:default": ["@platforms//:incompatible"], 36 }), 37 deps = [ 38 "//pw_boot:facade", 39 "//pw_preprocessor", 40 "//pw_preprocessor:cortex_m", 41 ], 42) 43 44# The following targets are deprecated, depend on ":pw_boot_cortex_m" instead. 45cc_library( 46 name = "armv7m", 47 target_compatible_with = select({ 48 "@platforms//cpu:armv7-m": [], 49 "@platforms//cpu:armv7e-m": [], 50 "@platforms//cpu:armv7e-mf": [], 51 "//conditions:default": ["@platforms//:incompatible"], 52 }), 53 deps = [":pw_boot_cortex_m"], 54) 55 56cc_library( 57 name = "armv8m", 58 target_compatible_with = select({ 59 "@platforms//cpu:armv8-m": [], 60 "//conditions:default": ["@platforms//:incompatible"], 61 }), 62 deps = [":pw_boot_cortex_m"], 63) 64