mirror of
https://fuchsia.googlesource.com/third_party/pigweed.googlesource.com/pigweed/pigweed
synced 2024-09-21 06:12:09 +00:00
docs: Use stm32f429i-disc1 toolchain
This updates the upstream docs target to use the disco toolchain instead of a custom one, to produce more accurate size reports for an actual board configuration. Change-Id: I50e6d03322273d33e34b4114d74b5bb9dc5f1c6a Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/16285 Reviewed-by: Keir Mierle <keir@google.com> Commit-Queue: Alexei Frolov <frolv@google.com>
This commit is contained in:
parent
69cd61d077
commit
d27b674d1a
|
@ -113,9 +113,9 @@ template("pw_size_report") {
|
|||
|
||||
# Allow each binary to override the global bloaty config.
|
||||
if (defined(binary.bloaty_config)) {
|
||||
_bloaty_configs += [ get_path_info(binary.bloaty_config, "abspath") ]
|
||||
_bloaty_configs += [ rebase_path(binary.bloaty_config) ]
|
||||
} else {
|
||||
_bloaty_configs += [ get_path_info(pw_bloat_BLOATY_CONFIG, "abspath") ]
|
||||
_bloaty_configs += [ rebase_path(pw_bloat_BLOATY_CONFIG) ]
|
||||
}
|
||||
|
||||
_binary_path += ";" + "<TARGET_FILE($_binary_base)>"
|
||||
|
@ -128,7 +128,7 @@ template("pw_size_report") {
|
|||
"--bloaty-config",
|
||||
string_join(";", _bloaty_configs),
|
||||
"--out-dir",
|
||||
target_gen_dir,
|
||||
rebase_path(target_gen_dir),
|
||||
"--target",
|
||||
target_name,
|
||||
"--title",
|
||||
|
@ -150,9 +150,7 @@ template("pw_size_report") {
|
|||
|
||||
_doc_rst_output = "$target_gen_dir/${target_name}"
|
||||
|
||||
# TODO(frolv): Size reports are temporarily disabled pending the toolchain
|
||||
# refactor.
|
||||
if (true || host_os == "win") {
|
||||
if (host_os == "win") {
|
||||
# Bloaty is not yet packaged for Windows systems; display a message
|
||||
# indicating this.
|
||||
not_needed("*")
|
||||
|
|
|
@ -15,48 +15,26 @@
|
|||
# gn-format disable
|
||||
import("//build_overrides/pigweed.gni")
|
||||
|
||||
import("$dir_pigweed/targets/stm32f429i-disc1/target_toolchains.gni")
|
||||
import("$dir_pw_docgen/docs.gni")
|
||||
import("$dir_pw_toolchain/arm_gcc/toolchains.gni")
|
||||
import("$dir_pw_toolchain/generate_toolchain.gni")
|
||||
|
||||
# Toolchain for generating upstream Pigweed documentation.
|
||||
generate_toolchain("docs") {
|
||||
# Use the Cortex M4 toolchain for regular pw_size_report targets.
|
||||
forward_variables_from(pw_toolchain_arm_gcc.cortex_m4_size_optimized,
|
||||
# Use the stm32f429i-disc1 toolchain for pw_size_report targets.
|
||||
_base_toolchain = pw_target_toolchain_stm32f429i_disc1.size_optimized
|
||||
forward_variables_from(_base_toolchain,
|
||||
"*",
|
||||
[
|
||||
"defaults",
|
||||
"name",
|
||||
])
|
||||
defaults = {
|
||||
_base_toolchain = pw_toolchain_arm_gcc.cortex_m4_size_optimized
|
||||
forward_variables_from(_base_toolchain.defaults, "*")
|
||||
|
||||
# This is the docs target.
|
||||
pw_docgen_BUILD_DOCS = true
|
||||
|
||||
_arm_bloaty_config = "$dir_pw_boot_armv7m/bloaty_config.bloaty"
|
||||
|
||||
pw_bloat_BLOATY_CONFIG = _arm_bloaty_config
|
||||
|
||||
# Toolchains to compare in documentation size reports.
|
||||
pw_bloat_TOOLCHAINS = [
|
||||
{
|
||||
name = "arm-none-eabi-gcc -Og -mcpu=cortex-m4"
|
||||
target = "$dir_pw_toolchain:arm_gcc_cortex_m4_debug"
|
||||
bloaty_config = _arm_bloaty_config
|
||||
},
|
||||
{
|
||||
name = "arm-none-eabi-gcc -Os -mcpu=cortex-m4"
|
||||
target = "$dir_pw_toolchain:arm_gcc_cortex_m4_size_optimized"
|
||||
bloaty_config = _arm_bloaty_config
|
||||
},
|
||||
{
|
||||
name = "arm-none-eabi-gcc -O2 -mcpu=cortex-m4"
|
||||
target = "$dir_pw_toolchain:arm_gcc_cortex_m4_speed_optimized"
|
||||
bloaty_config = _arm_bloaty_config
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user