Armando Montanez | 1c00958 | 2020-11-03 18:29:15 -0800 | [diff] [blame] | 1 | # Copyright 2020 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 | import("//build_overrides/pigweed.gni") |
| 16 | |
Armando Montanez | 7babcfc | 2023-09-11 23:12:29 +0000 | [diff] [blame] | 17 | import("$dir_pw_system/system_target.gni") |
| 18 | import("$dir_pw_third_party/stm32cube/stm32cube.gni") |
Armando Montanez | 1c00958 | 2020-11-03 18:29:15 -0800 | [diff] [blame] | 19 | import("$dir_pw_toolchain/generate_toolchain.gni") |
| 20 | import("target_toolchains.gni") |
| 21 | |
Armando Montanez | 7babcfc | 2023-09-11 23:12:29 +0000 | [diff] [blame] | 22 | pw_system_target("stm32f429i_disc1_stm32cube") { |
| 23 | cpu = PW_SYSTEM_CPU.CORTEX_M4F |
| 24 | scheduler = PW_SYSTEM_SCHEDULER.FREERTOS |
| 25 | |
Armando Montanez | dce5df8 | 2023-09-13 16:29:53 +0000 | [diff] [blame] | 26 | link_deps = [ |
| 27 | "$dir_pigweed/targets/stm32f429i_disc1_stm32cube:pre_init", |
| 28 | "$dir_pw_toolchain/arm_gcc:arm_none_eabi_gcc_support", |
| 29 | ] |
Armando Montanez | 7babcfc | 2023-09-11 23:12:29 +0000 | [diff] [blame] | 30 | build_args = { |
| 31 | pw_log_BACKEND = dir_pw_log_tokenized |
| 32 | pw_log_tokenized_HANDLER_BACKEND = "$dir_pw_system:log_backend.impl" |
| 33 | pw_third_party_freertos_CONFIG = "$dir_pigweed/targets/stm32f429i_disc1_stm32cube:stm32f4xx_freertos_config" |
| 34 | pw_third_party_freertos_PORT = "$dir_pw_third_party/freertos:arm_cm4f" |
| 35 | pw_sys_io_BACKEND = dir_pw_sys_io_stm32cube |
| 36 | dir_pw_third_party_stm32cube = dir_pw_third_party_stm32cube_f4 |
| 37 | pw_third_party_stm32cube_PRODUCT = "STM32F429xx" |
| 38 | pw_third_party_stm32cube_CONFIG = |
| 39 | "$dir_pigweed/targets/stm32f429i_disc1_stm32cube:stm32f4xx_hal_config" |
| 40 | pw_third_party_stm32cube_CORE_INIT = "" |
Anthony DiGirolamo | e05ae0d | 2023-09-12 14:56:11 +0000 | [diff] [blame] | 41 | pw_board_led_BACKEND = "//libraries/pw_board_led_stm32f429i_disc1" |
Armando Montanez | 7babcfc | 2023-09-11 23:12:29 +0000 | [diff] [blame] | 42 | pw_boot_cortex_m_LINK_CONFIG_DEFINES = [ |
| 43 | "PW_BOOT_FLASH_BEGIN=0x08000200", |
| 44 | "PW_BOOT_FLASH_SIZE=2048K", |
| 45 | |
| 46 | # TODO(b/235348465): Currently "pw_tokenizer/detokenize_test" requires at |
| 47 | # least 6K bytes in heap when using pw_malloc_freelist. The heap size |
| 48 | # required for tests should be investigated. |
| 49 | "PW_BOOT_HEAP_SIZE=7K", |
| 50 | "PW_BOOT_MIN_STACK_SIZE=1K", |
| 51 | "PW_BOOT_RAM_BEGIN=0x20000000", |
| 52 | "PW_BOOT_RAM_SIZE=192K", |
| 53 | "PW_BOOT_VECTOR_TABLE_BEGIN=0x08000000", |
| 54 | "PW_BOOT_VECTOR_TABLE_SIZE=512", |
| 55 | ] |
| 56 | } |
| 57 | } |
| 58 | |
Armando Montanez | 1c00958 | 2020-11-03 18:29:15 -0800 | [diff] [blame] | 59 | generate_toolchains("toolchains") { |
| 60 | toolchains = toolchains_list |
| 61 | } |