mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-21 14:16:26 +00:00
da0bccb98f
This adds a pw_log based unit test event handler, and switches it to be the default. Change-Id: I83808e1e0ffcb0061644a45d4acc1d47f1161f57
79 lines
2.6 KiB
Plaintext
79 lines
2.6 KiB
Plaintext
# Copyright 2019 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.
|
|
|
|
# Target configuration for the STM32f429I-DISC1 development board.
|
|
#
|
|
# TODO(amontanez): This target configuration treats
|
|
# pw_dumb_io_baremetal_stm32f429 as if it were a platform. This is for
|
|
# testing/development and should eventually point to something more
|
|
# sophisticated.
|
|
|
|
import("$dir_pigweed/pw_vars_default.gni")
|
|
|
|
declare_args() {
|
|
# Specifies the toolchain to use for this build.
|
|
pw_target_toolchain = "$dir_pw_toolchain:arm_gcc_cortex_m4f_og"
|
|
|
|
# Experimental! Enable the pw_target_runner for distributed testing.
|
|
pw_use_test_server = false
|
|
}
|
|
|
|
# Use the logging main.
|
|
pw_unit_test_main = "$dir_pw_unit_test:logging_main"
|
|
|
|
# Expose the tool to use for preprocessing linker scripts.
|
|
# TODO(pwbug/53): Temporary, will be removed when proper linker script support
|
|
# is added to GN.
|
|
pw_cc_command = "arm-none-eabi-gcc"
|
|
|
|
# Executable wrapper that includes some baremetal startup code.
|
|
template("stm32f429i_executable") {
|
|
target("executable", target_name) {
|
|
forward_variables_from(invoker, "*")
|
|
if (!defined(deps)) {
|
|
deps = []
|
|
}
|
|
deps += [ dir_pw_dumb_io_baremetal_stm32f429 ]
|
|
}
|
|
}
|
|
|
|
# Configuration options for Pigweed executable targets.
|
|
pw_executable_config.target_type = "stm32f429i_executable"
|
|
|
|
# Path to the bloaty config file for the output binaries.
|
|
pw_executable_config.bloaty_config_file =
|
|
"$dir_pw_boot_armv7m/bloaty_config.bloaty"
|
|
|
|
if (pw_use_test_server) {
|
|
pw_automatic_test_runner =
|
|
get_path_info("py/stm32f429i_disc1_utils/unit_test_client.py", "abspath")
|
|
}
|
|
|
|
# Facade backends
|
|
dir_pw_boot_backend = dir_pw_boot_armv7m
|
|
dir_pw_cpu_exception_backend = dir_pw_cpu_exception_armv7m
|
|
dir_pw_dumb_io_backend = dir_pw_dumb_io_baremetal_stm32f429
|
|
dir_pw_log_backend = dir_pw_log_basic
|
|
|
|
pw_boot_armv7m_config.defines += [
|
|
"PW_BOOT_FLASH_BEGIN=0x08000200",
|
|
"PW_BOOT_FLASH_SIZE=512K",
|
|
"PW_BOOT_HEAP_SIZE=0",
|
|
"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",
|
|
]
|