pw_system: Added Cortex M7f as a supported CPU
Change-Id: Icca01d13bd681822963ddefbc077e890b23d7584
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/84583
Reviewed-by: Armando Montanez <amontanez@google.com>
Commit-Queue: Brandon Kinman <bkinman@google.com>
diff --git a/pw_system/system_target.gni b/pw_system/system_target.gni
index 07c00eb..e149f5a 100644
--- a/pw_system/system_target.gni
+++ b/pw_system/system_target.gni
@@ -26,6 +26,7 @@
PW_SYSTEM_CPU = {
CORTEX_M4F = "cortex-m4f"
CORTEX_M3 = "cortex-m3"
+ CORTEX_M7F = "cortex-m7f"
# Native builds for the host CPU.
NATIVE = "native"
@@ -46,7 +47,7 @@
#
# Args:
# cpu: (required) The architecture to target.
-# Supported choices: PW_SYSTEM_CPU.CORTEX_M4F, PW_SYSTEM_CPU.CORTEX_M3, PW_SYSTEM_CPU.NATIVE
+# Supported choices: PW_SYSTEM_CPU.CORTEX_M7F, PW_SYSTEM_CPU.CORTEX_M4F, PW_SYSTEM_CPU.CORTEX_M3, PW_SYSTEM_CPU.NATIVE
# scheduler: (required) The scheduler implementation and API to use for this
# target.
# Supported choices: PW_SYSTEM_SCHEDULER.FREERTOS, PW_SYSTEM_SCHEDULER.NATIVE
@@ -93,8 +94,33 @@
# Populate architecture-specific build args.
assert(
defined(invoker.cpu),
- "Please select a `cpu` for $target_name. Options: PW_SYSTEM_CPU.CORTEX_M4F, PW_SYSTEM_CPU.CORTEX_M3, PW_SYSTEM_CPU.NATIVE")
- if (invoker.cpu == PW_SYSTEM_CPU.CORTEX_M4F) {
+ "Please select a `cpu` for $target_name. Options: PW_SYSTEM_CPU.CORTEX_M7, PW_SYSTEM_CPU.CORTEX_M4F, PW_SYSTEM_CPU.CORTEX_M3, PW_SYSTEM_CPU.NATIVE")
+ if (invoker.cpu == PW_SYSTEM_CPU.CORTEX_M7F) {
+ _current_cpu = "arm"
+ _default_configs += [ "$dir_pw_toolchain/arm_gcc:enable_float_printf" ]
+ _arch_build_args = {
+ pw_bloat_BLOATY_CONFIG = "$dir_pw_boot_cortex_m/bloaty_config.bloaty"
+ pw_boot_BACKEND = "$dir_pw_boot_cortex_m:armv7m"
+ pw_interrupt_CONTEXT_BACKEND = "$dir_pw_interrupt_cortex_m:context_armv7m"
+ }
+
+ _final_binary_extension = ".elf"
+
+ _toolchains = [
+ {
+ toolchain_base = pw_toolchain_arm_gcc.cortex_m7f_debug
+ level_name = _OPTIMIZATION_LEVELS.DEBUG
+ },
+ {
+ toolchain_base = pw_toolchain_arm_gcc.cortex_m7f_size_optimized
+ level_name = _OPTIMIZATION_LEVELS.SIZE_OPTIMIZED
+ },
+ {
+ toolchain_base = pw_toolchain_arm_gcc.cortex_m7f_speed_optimized
+ level_name = _OPTIMIZATION_LEVELS.SPEED_OPTIMIZED
+ },
+ ]
+ } else if (invoker.cpu == PW_SYSTEM_CPU.CORTEX_M4F) {
_current_cpu = "arm"
_default_configs += [ "$dir_pw_toolchain/arm_gcc:enable_float_printf" ]
_arch_build_args = {