13d8536b4Sopenharmony_ci# ARM Architecture
23d8536b4Sopenharmony_ci
33d8536b4Sopenharmony_ci#
43d8536b4Sopenharmony_ci# ARM has 32-bit(Aarch32) and 64-bit(Aarch64) implementations
53d8536b4Sopenharmony_ci#
63d8536b4Sopenharmony_ciconfig ARCH_ARM_AARCH32
73d8536b4Sopenharmony_ci    bool
83d8536b4Sopenharmony_ci    select ARCH_ARM
93d8536b4Sopenharmony_ci    help
103d8536b4Sopenharmony_ci      32-bit ARM architecture implementations, Except the M-profile.
113d8536b4Sopenharmony_ci      It is not limited to ARMv7-A but also ARMv7-R, ARMv8-A 32-bit and etc.
123d8536b4Sopenharmony_ci
133d8536b4Sopenharmony_ci#
143d8536b4Sopenharmony_ci# Architecture Versions
153d8536b4Sopenharmony_ci#
163d8536b4Sopenharmony_ciconfig ARCH_ARM_V7M
173d8536b4Sopenharmony_ci    bool
183d8536b4Sopenharmony_ci
193d8536b4Sopenharmony_ciconfig ARCH_ARM_V8M
203d8536b4Sopenharmony_ci    bool
213d8536b4Sopenharmony_ci
223d8536b4Sopenharmony_ciconfig ARCH_ARM_V5TE
233d8536b4Sopenharmony_ci    bool
243d8536b4Sopenharmony_ci
253d8536b4Sopenharmony_ciconfig ARCH_ARM_VER
263d8536b4Sopenharmony_ci    string
273d8536b4Sopenharmony_ci    default "armv7-m" if ARCH_ARM_V7M
283d8536b4Sopenharmony_ci    default "armv8-m" if ARCH_ARM_V8M
293d8536b4Sopenharmony_ci    default "armv5te" if ARCH_ARM_V5TE
303d8536b4Sopenharmony_ci
313d8536b4Sopenharmony_ci#
323d8536b4Sopenharmony_ci# VFP Hardware
333d8536b4Sopenharmony_ci#
343d8536b4Sopenharmony_cichoice
353d8536b4Sopenharmony_ci    prompt "Choose FPU type"
363d8536b4Sopenharmony_ci    depends on !ARCH_FPU_DISABLE
373d8536b4Sopenharmony_ci
383d8536b4Sopenharmony_ci    choice
393d8536b4Sopenharmony_ci        prompt "Choose FPU version"
403d8536b4Sopenharmony_ci        default ARCH_FPU_VFP_V4
413d8536b4Sopenharmony_ci        depends on !ARCH_FPU_DISABLE
423d8536b4Sopenharmony_ci        help
433d8536b4Sopenharmony_ci            Choose FPU version.
443d8536b4Sopenharmony_ci        
453d8536b4Sopenharmony_ci    config ARCH_FPU_VFP_V3
463d8536b4Sopenharmony_ci        bool "VFP_V3"
473d8536b4Sopenharmony_ci        help
483d8536b4Sopenharmony_ci        An optional extension to the Arm, Thumb, and ThumbEE instruction sets in the ARMv7-A and ARMv7-R profiles.
493d8536b4Sopenharmony_ci        VFPv3U is a variant of VFPv3 that supports the trapping of floating-point exceptions to support code.
503d8536b4Sopenharmony_ci
513d8536b4Sopenharmony_ci    config ARCH_FPU_VFP_V4
523d8536b4Sopenharmony_ci        bool "VFP_V4"
533d8536b4Sopenharmony_ci        help
543d8536b4Sopenharmony_ci        An optional extension to the Arm, Thumb, and ThumbEE instruction sets in the ARMv7-A and ARMv7-R profiles.
553d8536b4Sopenharmony_ci        VFPv4U is a variant of VFPv4 that supports the trapping of floating-point exceptions to support code.
563d8536b4Sopenharmony_ci        VFPv4 and VFPv4U add both the Half-precision Extension and the fused multiply-add instructions to the features of VFPv3.
573d8536b4Sopenharmony_ci    endchoice
583d8536b4Sopenharmony_ci
593d8536b4Sopenharmony_ci    choice
603d8536b4Sopenharmony_ci        prompt "Choose num of FPU doubleword registers"
613d8536b4Sopenharmony_ci        default ARCH_FPU_VFP_D32
623d8536b4Sopenharmony_ci        depends on !ARCH_FPU_DISABLE
633d8536b4Sopenharmony_ci        help
643d8536b4Sopenharmony_ci            Choose num of FPU doubleword registers.
653d8536b4Sopenharmony_ci
663d8536b4Sopenharmony_ci    config ARCH_FPU_VFP_D16
673d8536b4Sopenharmony_ci        bool "FPU_VFP_D16"
683d8536b4Sopenharmony_ci        depends on ARCH_ARM_AARCH32
693d8536b4Sopenharmony_ci        help
703d8536b4Sopenharmony_ci        VPU implemented with 16 doubleword registers (16 x 64-bit).
713d8536b4Sopenharmony_ci
723d8536b4Sopenharmony_ci    config ARCH_FPU_VFP_D32
733d8536b4Sopenharmony_ci        bool "FPU_VFP_D32"
743d8536b4Sopenharmony_ci        depends on ARCH_ARM_AARCH32
753d8536b4Sopenharmony_ci        help
763d8536b4Sopenharmony_ci        VPU implemented with 32 doubleword registers (32 x 64-bit).
773d8536b4Sopenharmony_ci    endchoice
783d8536b4Sopenharmony_ciendchoice
793d8536b4Sopenharmony_ciconfig ARCH_FPU
803d8536b4Sopenharmony_ci    string
813d8536b4Sopenharmony_ci    default "vfpv3"       if ARCH_FPU_VFP_V3 && ARCH_FPU_VFP_D32 && !COMPILER_ICCARM
823d8536b4Sopenharmony_ci    default "vfpv3-d16"   if ARCH_FPU_VFP_V3 && ARCH_FPU_VFP_D16 && !COMPILER_ICCARM
833d8536b4Sopenharmony_ci    default "vfpv4"       if ARCH_FPU_VFP_V4 && ARCH_FPU_VFP_D32 && !COMPILER_ICCARM
843d8536b4Sopenharmony_ci    default "vfpv4-d16"   if ARCH_FPU_VFP_V4 && ARCH_FPU_VFP_D16 && !COMPILER_ICCARM
853d8536b4Sopenharmony_ci    default "VFPv3"       if ARCH_FPU_VFP_V3 && ARCH_FPU_VFP_D32 && COMPILER_ICCARM
863d8536b4Sopenharmony_ci    default "VFPv3_D16"   if ARCH_FPU_VFP_V3 && ARCH_FPU_VFP_D16 && COMPILER_ICCARM
873d8536b4Sopenharmony_ci    default "VFPv4"       if ARCH_FPU_VFP_V4 && ARCH_FPU_VFP_D32 && COMPILER_ICCARM
883d8536b4Sopenharmony_ci    default "VFPv4_D16"   if ARCH_FPU_VFP_V4 && ARCH_FPU_VFP_D16 && COMPILER_ICCARM
893d8536b4Sopenharmony_ci
903d8536b4Sopenharmony_ci#
913d8536b4Sopenharmony_ci# Supported Processor Cores
923d8536b4Sopenharmony_ci#
933d8536b4Sopenharmony_ciconfig ARCH_CORTEX_M3
943d8536b4Sopenharmony_ci    bool
953d8536b4Sopenharmony_ci    select ARCH_ARM_V7M
963d8536b4Sopenharmony_ci    select ARCH_ARM_AARCH32
973d8536b4Sopenharmony_ci
983d8536b4Sopenharmony_ciconfig ARCH_CORTEX_M4
993d8536b4Sopenharmony_ci    bool
1003d8536b4Sopenharmony_ci    select ARCH_ARM_V7M
1013d8536b4Sopenharmony_ci    select ARCH_ARM_AARCH32
1023d8536b4Sopenharmony_ci
1033d8536b4Sopenharmony_ciconfig ARCH_CORTEX_M7
1043d8536b4Sopenharmony_ci    bool
1053d8536b4Sopenharmony_ci    select ARCH_ARM_V7M
1063d8536b4Sopenharmony_ci    select ARCH_ARM_AARCH32
1073d8536b4Sopenharmony_ci
1083d8536b4Sopenharmony_ciconfig ARCH_CORTEX_M33
1093d8536b4Sopenharmony_ci    bool
1103d8536b4Sopenharmony_ci    select ARCH_ARM_V8M
1113d8536b4Sopenharmony_ci    select ARCH_ARM_AARCH32
1123d8536b4Sopenharmony_ci
1133d8536b4Sopenharmony_ciconfig ARCH_CORTEX_M55
1143d8536b4Sopenharmony_ci    bool
1153d8536b4Sopenharmony_ci    select ARCH_ARM_V8M
1163d8536b4Sopenharmony_ci    select ARCH_ARM_AARCH32
1173d8536b4Sopenharmony_ci
1183d8536b4Sopenharmony_ciconfig ARCH_ARM9
1193d8536b4Sopenharmony_ci    bool
1203d8536b4Sopenharmony_ci    select ARCH_ARM_V5TE
1213d8536b4Sopenharmony_ci    select ARCH_ARM_AARCH32
1223d8536b4Sopenharmony_ci
1233d8536b4Sopenharmony_ciconfig ARCH_CPU
1243d8536b4Sopenharmony_ci    string
1253d8536b4Sopenharmony_ci    default "cortex-m3" if ARCH_CORTEX_M3 && !COMPILER_ICCARM
1263d8536b4Sopenharmony_ci    default "cortex-m4" if ARCH_CORTEX_M4 && !COMPILER_ICCARM
1273d8536b4Sopenharmony_ci    default "cortex-m7" if ARCH_CORTEX_M7 && !COMPILER_ICCARM
1283d8536b4Sopenharmony_ci    default "cortex-m33" if ARCH_CORTEX_M33 && !COMPILER_ICCARM
1293d8536b4Sopenharmony_ci    default "cortex-m55" if ARCH_CORTEX_M55 && !COMPILER_ICCARM
1303d8536b4Sopenharmony_ci    default "Cortex-M3" if ARCH_CORTEX_M3 && COMPILER_ICCARM
1313d8536b4Sopenharmony_ci    default "Cortex-M4" if ARCH_CORTEX_M4 && COMPILER_ICCARM
1323d8536b4Sopenharmony_ci    default "Cortex-M7" if ARCH_CORTEX_M7 && COMPILER_ICCARM
1333d8536b4Sopenharmony_ci    default "Cortex-M33" if ARCH_CORTEX_M33 && COMPILER_ICCARM
1343d8536b4Sopenharmony_ci    default "Cortex-M55" if ARCH_CORTEX_M55 && COMPILER_ICCARM
1353d8536b4Sopenharmony_ci    default "arm9" if ARCH_ARM9
136