blob: fbb4ca3cef5b037af318ca1f26f618846dbbdd2f [file] [log] [blame]
Ted Pudlikc3838162023-11-02 21:45:46 +00001# 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("@pigweed//pw_build:pigweed.bzl", "pw_linker_script")
16
17package(default_visibility = ["//visibility:public"])
18
19platform(
20 name = "platform",
21 constraint_values = [
22 "//libraries/pw_board_led_stm32f429i_disc1:backend_constraint_value",
23 "@freertos//:port_ARM_CM4F",
24 "@freertos//:disable_task_statics",
25 "@pigweed//pw_build/constraints/rtos:freertos",
Anthony DiGirolamo70b2b2d2024-05-31 21:15:06 +000026 "@pigweed//pw_interrupt_cortex_m:backend",
27 "@pigweed//targets/stm32f429i_disc1_stm32cube:freertos_config_cv",
Ted Pudlikf6c2aa22024-06-21 17:50:37 +000028 "@platforms//os:none",
Anthony DiGirolamo70b2b2d2024-05-31 21:15:06 +000029
Ted Pudlikc3838162023-11-02 21:45:46 +000030 # For toolchain selection.
31 "@platforms//cpu:armv7e-m",
32 "@pw_toolchain//constraints/arm_mcpu:cortex-m4",
33 ],
34)
35
36pw_linker_script(
37 name = "linker_script",
38 defines = [
39 "PW_BOOT_FLASH_BEGIN=0x08000200",
40 "PW_BOOT_FLASH_SIZE=2048K",
41 "PW_BOOT_HEAP_SIZE=7K",
42 "PW_BOOT_MIN_STACK_SIZE=1K",
43 "PW_BOOT_RAM_BEGIN=0x20000000",
44 "PW_BOOT_RAM_SIZE=192K",
45 "PW_BOOT_VECTOR_TABLE_BEGIN=0x08000000",
46 "PW_BOOT_VECTOR_TABLE_SIZE=512",
47 ],
48 linker_script = "@pigweed//pw_boot_cortex_m:basic_cortex_m.ld",
49)
Ted Pudlik616d09d2024-05-22 18:59:08 +000050
51cc_library(
52 name = "extra_platform_libs",
53 deps = [
54 ":linker_script",
55 "@pigweed//pw_tokenizer:linker_script",
56 "@pigweed//pw_toolchain/arm_gcc:arm_none_eabi_gcc_support",
57 "@pigweed//targets/stm32f429i_disc1_stm32cube:pre_init",
58 ],
Anthony DiGirolamo560bee82024-05-31 17:26:54 +000059 alwayslink = 1,
Ted Pudlik616d09d2024-05-22 18:59:08 +000060)