1# Copyright 2023 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 15load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library") 16load("//pw_build:compatibility.bzl", "incompatible_with_mcu") 17load("//pw_build:pw_linker_script.bzl", "pw_linker_script") 18 19package(default_visibility = ["//visibility:public"]) 20 21licenses(["notice"]) 22 23pw_linker_script( 24 name = "flash_linker_script", 25 defines = [ 26 "PW_BOOT_FLASH_BEGIN=0x08001180", 27 "PW_BOOT_FLASH_SIZE=0x001FEE80", 28 "PW_BOOT_HEAP_SIZE=200K", 29 "PW_BOOT_MIN_STACK_SIZE=1K", 30 "PW_BOOT_RAM_BEGIN=0x20080000", 31 "PW_BOOT_RAM_SIZE=0x00280000", 32 "PW_BOOT_VECTOR_TABLE_BEGIN=0x08001000", 33 "PW_BOOT_VECTOR_TABLE_SIZE=0x00000180", 34 ], 35 linker_script = "mimxrt595_flash.ld", 36) 37 38cc_library( 39 name = "boot", 40 srcs = [ 41 "boot.cc", 42 "vector_table.c", 43 ], 44 defines = [ 45 "PW_MALLOC_ACTIVE=1", 46 ], 47 target_compatible_with = [ 48 "//pw_build/constraints/board:mimxrt595_evk", 49 "@platforms//cpu:armv8-m", 50 ], 51 deps = [ 52 ":flash_linker_script", 53 "//pw_boot", 54 "//pw_boot_cortex_m", 55 "//pw_preprocessor", 56 "//pw_sys_io_mcuxpresso", 57 "//targets:mcuxpresso_sdk", 58 "//third_party/freertos:support", 59 ], 60 alwayslink = 1, 61) 62 63cc_library( 64 name = "freertos_config", 65 hdrs = [ 66 "FreeRTOSConfig.h", 67 ], 68 includes = ["./"], 69 deps = ["//third_party/freertos:config_assert"], 70) 71 72sphinx_docs_library( 73 name = "docs", 74 srcs = [ 75 "target_docs.rst", 76 ], 77 target_compatible_with = incompatible_with_mcu(), 78) 79