Ted Pudlik | c383816 | 2023-11-02 21:45:46 +0000 | [diff] [blame] | 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 | |
| 15 | load("@pigweed//pw_build:pigweed.bzl", "pw_linker_script") |
| 16 | |
| 17 | package(default_visibility = ["//visibility:public"]) |
| 18 | |
| 19 | platform( |
| 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 DiGirolamo | 70b2b2d | 2024-05-31 21:15:06 +0000 | [diff] [blame] | 26 | "@pigweed//pw_interrupt_cortex_m:backend", |
| 27 | "@pigweed//targets/stm32f429i_disc1_stm32cube:freertos_config_cv", |
Ted Pudlik | f6c2aa2 | 2024-06-21 17:50:37 +0000 | [diff] [blame] | 28 | "@platforms//os:none", |
Anthony DiGirolamo | 70b2b2d | 2024-05-31 21:15:06 +0000 | [diff] [blame] | 29 | |
Ted Pudlik | c383816 | 2023-11-02 21:45:46 +0000 | [diff] [blame] | 30 | # For toolchain selection. |
| 31 | "@platforms//cpu:armv7e-m", |
| 32 | "@pw_toolchain//constraints/arm_mcpu:cortex-m4", |
| 33 | ], |
| 34 | ) |
| 35 | |
| 36 | pw_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 Pudlik | 616d09d | 2024-05-22 18:59:08 +0000 | [diff] [blame] | 50 | |
| 51 | cc_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 DiGirolamo | 560bee8 | 2024-05-31 17:26:54 +0000 | [diff] [blame] | 59 | alwayslink = 1, |
Ted Pudlik | 616d09d | 2024-05-22 18:59:08 +0000 | [diff] [blame] | 60 | ) |