|  | # Copyright 2020 The Pigweed Authors | 
|  | # | 
|  | # Licensed under the Apache License, Version 2.0 (the "License"); you may not | 
|  | # use this file except in compliance with the License. You may obtain a copy of | 
|  | # the License at | 
|  | # | 
|  | #     https://www.apache.org/licenses/LICENSE-2.0 | 
|  | # | 
|  | # Unless required by applicable law or agreed to in writing, software | 
|  | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | 
|  | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | 
|  | # License for the specific language governing permissions and limitations under | 
|  | # the License. | 
|  |  | 
|  | import("//build_overrides/pigweed.gni") | 
|  |  | 
|  | import("$dir_pw_system/system_target.gni") | 
|  | import("$dir_pw_third_party/stm32cube/stm32cube.gni") | 
|  | import("$dir_pw_toolchain/generate_toolchain.gni") | 
|  | import("target_toolchains.gni") | 
|  |  | 
|  | pw_system_target("stm32f429i_disc1_stm32cube") { | 
|  | cpu = PW_SYSTEM_CPU.CORTEX_M4F | 
|  | scheduler = PW_SYSTEM_SCHEDULER.FREERTOS | 
|  |  | 
|  | link_deps = [ | 
|  | "$dir_pigweed/targets/stm32f429i_disc1_stm32cube:pre_init", | 
|  | "$dir_pw_toolchain/arm_gcc:arm_none_eabi_gcc_support", | 
|  | ] | 
|  | build_args = { | 
|  | pw_log_BACKEND = dir_pw_log_tokenized | 
|  | pw_log_tokenized_HANDLER_BACKEND = "$dir_pw_system:log_backend.impl" | 
|  | pw_third_party_freertos_CONFIG = "$dir_pigweed/targets/stm32f429i_disc1_stm32cube:stm32f4xx_freertos_config" | 
|  | pw_third_party_freertos_PORT = "$dir_pw_third_party/freertos:arm_cm4f" | 
|  | pw_sys_io_BACKEND = dir_pw_sys_io_stm32cube | 
|  | dir_pw_third_party_stm32cube = dir_pw_third_party_stm32cube_f4 | 
|  | pw_third_party_stm32cube_PRODUCT = "STM32F429xx" | 
|  | pw_third_party_stm32cube_CONFIG = | 
|  | "$dir_pigweed/targets/stm32f429i_disc1_stm32cube:stm32f4xx_hal_config" | 
|  | pw_third_party_stm32cube_CORE_INIT = "" | 
|  | pw_board_led_BACKEND = "//libraries/pw_board_led_stm32f429i_disc1" | 
|  | pw_boot_cortex_m_LINK_CONFIG_DEFINES = [ | 
|  | "PW_BOOT_FLASH_BEGIN=0x08000200", | 
|  | "PW_BOOT_FLASH_SIZE=2048K", | 
|  |  | 
|  | # TODO(b/235348465): Currently "pw_tokenizer/detokenize_test" requires at | 
|  | # least 6K bytes in heap when using pw_malloc_freelist. The heap size | 
|  | # required for tests should be investigated. | 
|  | "PW_BOOT_HEAP_SIZE=7K", | 
|  | "PW_BOOT_MIN_STACK_SIZE=1K", | 
|  | "PW_BOOT_RAM_BEGIN=0x20000000", | 
|  | "PW_BOOT_RAM_SIZE=192K", | 
|  | "PW_BOOT_VECTOR_TABLE_BEGIN=0x08000000", | 
|  | "PW_BOOT_VECTOR_TABLE_SIZE=512", | 
|  | ] | 
|  | } | 
|  | } | 
|  |  | 
|  | generate_toolchains("toolchains") { | 
|  | toolchains = toolchains_list | 
|  | } |