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