From b40ecc98b47a37b187f40408ae0c3d89ef9b5f79 Mon Sep 17 00:00:00 2001 From: Silviu Grigore Date: Mon, 28 Oct 2024 09:10:37 +0000 Subject: [PATCH] pw_toolchain: Add ARM Cortex-M55F GCC toolchain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: b/375562597 Change-Id: I63161d05600a66b7fdcd030dab50d44ddbfea1ad Signed-off-by: Silviu Grigore Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/244672 Lint: Lint 🤖 Reviewed-by: Armando Montanez --- pw_toolchain/arm_gcc/BUILD.gn | 9 ++++++++ pw_toolchain/arm_gcc/toolchains.gni | 34 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/pw_toolchain/arm_gcc/BUILD.gn b/pw_toolchain/arm_gcc/BUILD.gn index 1699493b0a..7a3154b147 100644 --- a/pw_toolchain/arm_gcc/BUILD.gn +++ b/pw_toolchain/arm_gcc/BUILD.gn @@ -144,6 +144,15 @@ config("cortex_hardware_fpu_v5_sp") { ldflags = cflags } +config("cortex_hardware_fpu_auto") { + cflags = [ + "-mfloat-abi=hard", + "-mfpu=auto", + ] + asmflags = cflags + ldflags = cflags +} + config("wrap_newlib_stdio_functions") { ldflags = [ "-Wl,--wrap=__sread", diff --git a/pw_toolchain/arm_gcc/toolchains.gni b/pw_toolchain/arm_gcc/toolchains.gni index 0c4034fa65..7d5e4ef9f7 100644 --- a/pw_toolchain/arm_gcc/toolchains.gni +++ b/pw_toolchain/arm_gcc/toolchains.gni @@ -161,6 +161,12 @@ _cortex_m55 = [ "$dir_pw_toolchain/arm_gcc:cortex_software_fpu", ] +_cortex_m55f = [ + "$dir_pw_toolchain/arm_gcc:cortex_common", + "$dir_pw_toolchain/arm_gcc:cortex_m55", + "$dir_pw_toolchain/arm_gcc:cortex_hardware_fpu_auto", +] + _cortex_a32 = [ "$dir_pw_toolchain/arm_gcc:cortex_common", "$dir_pw_toolchain/arm_gcc:cortex_a32", @@ -385,6 +391,31 @@ pw_toolchain_arm_gcc = { [ "$dir_pw_build:optimize_size" ] } } + cortex_m55f_debug = { + name = "arm_gcc_cortex_m55f_debug" + forward_variables_from(arm_gcc_toolchain_tools, "*") + defaults = { + default_configs = pigweed_default_configs + _arm_gcc + _cortex_m55f + + [ "$dir_pw_build:optimize_debugging" ] + } + } + cortex_m55f_speed_optimized = { + name = "arm_gcc_cortex_m55f_speed_optimized" + forward_variables_from(arm_gcc_toolchain_tools, "*") + defaults = { + default_configs = pigweed_default_configs + _arm_gcc + _cortex_m55f + + [ "$dir_pw_build:optimize_speed" ] + } + } + + cortex_m55f_size_optimized = { + name = "arm_gcc_cortex_m55f_size_optimized" + forward_variables_from(arm_gcc_toolchain_tools, "*") + defaults = { + default_configs = pigweed_default_configs + _arm_gcc + _cortex_m55f + + [ "$dir_pw_build:optimize_size" ] + } + } cortex_a32_debug = { name = "arm_gcc_cortex_a32_debug" @@ -443,6 +474,9 @@ pw_toolchain_arm_gcc_list = [ pw_toolchain_arm_gcc.cortex_m55_debug, pw_toolchain_arm_gcc.cortex_m55_speed_optimized, pw_toolchain_arm_gcc.cortex_m55_size_optimized, + pw_toolchain_arm_gcc.cortex_m55f_debug, + pw_toolchain_arm_gcc.cortex_m55f_speed_optimized, + pw_toolchain_arm_gcc.cortex_m55f_size_optimized, pw_toolchain_arm_gcc.cortex_a32_debug, pw_toolchain_arm_gcc.cortex_a32_speed_optimized, pw_toolchain_arm_gcc.cortex_a32_size_optimized,