Skip to content

Commit

Permalink
Modify the python tools to support Cortex-A5
Browse files Browse the repository at this point in the history
  • Loading branch information
Meano committed Jun 21, 2021
1 parent 3467485 commit db344b2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions tools/export/gnuarmeclipse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ def process_options(self, opts, flags_in):
'Cortex-M7': {'mcpu': 'cortex-m7', 'fpu_unit': None},
'Cortex-M7F': {'mcpu': 'cortex-m7', 'fpu_unit': 'fpv4spd16'},
'Cortex-M7FD': {'mcpu': 'cortex-m7', 'fpu_unit': 'fpv5d16'},
'Cortex-A5': {'mcpu': 'cortex-a5', 'fpu_unit': 'vfpv3'},
'Cortex-A9': {'mcpu': 'cortex-a9', 'fpu_unit': 'vfpv3'}
}

Expand Down
1 change: 1 addition & 0 deletions tools/export/mcuxpresso/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ def process_options(self, opts, flags_in, libraries):
'Cortex-M7': {'mcpu': 'cortex-m7', 'fpu_unit': None},
'Cortex-M7F': {'mcpu': 'cortex-m7', 'fpu_unit': 'fpv4spd16'},
'Cortex-M7FD': {'mcpu': 'cortex-m7', 'fpu_unit': 'fpv5d16'},
'Cortex-A5': {'mcpu': 'cortex-a5', 'fpu_unit': 'vfpv3'},
'Cortex-A9': {'mcpu': 'cortex-a9', 'fpu_unit': 'vfpv3'}
}

Expand Down
2 changes: 2 additions & 0 deletions tools/targets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"Cortex-M7F": ["M7", "CORTEX_M", "RTOS_M4_M7", "LIKE_CORTEX_M7", "CORTEX"],
"Cortex-M7FD": ["M7", "CORTEX_M", "RTOS_M4_M7", "LIKE_CORTEX_M7",
"CORTEX"],
"Cortex-A5": ["A5", "CORTEX_A", "LIKE_CORTEX_A5", "CORTEX"],
"Cortex-A9": ["A9", "CORTEX_A", "LIKE_CORTEX_A9", "CORTEX"],
"Cortex-M23": ["M23", "CORTEX_M", "LIKE_CORTEX_M23", "CORTEX"],
"Cortex-M23-NS": ["M23", "M23_NS", "CORTEX_M", "LIKE_CORTEX_M23",
Expand All @@ -74,6 +75,7 @@
"Cortex-M7": 7,
"Cortex-M7F": 7,
"Cortex-M7FD": 7,
"Cortex-A5": 7,
"Cortex-A9": 7,
"Cortex-M23": 8,
"Cortex-M23-NS": 8,
Expand Down
4 changes: 2 additions & 2 deletions tools/toolchains/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ARM(mbedToolchain):
SHEBANG = "#! armcc -E"
SUPPORTED_CORES = [
"Cortex-M0", "Cortex-M0+", "Cortex-M3", "Cortex-M4", "Cortex-M4F",
"Cortex-M7", "Cortex-M7F", "Cortex-M7FD", "Cortex-A9"
"Cortex-M7", "Cortex-M7F", "Cortex-M7FD", "Cortex-A5", "Cortex-A9"
]
ARMCC_RANGE = (LooseVersion("5.06"), LooseVersion("5.07"))
ARMCC_PRODUCT_RE = re.compile(b"Product: (.*)")
Expand Down Expand Up @@ -544,7 +544,7 @@ class ARMC6(ARM_STD):
"Cortex-M4F", "Cortex-M7", "Cortex-M7F", "Cortex-M7FD",
"Cortex-M23", "Cortex-M23-NS", "Cortex-M33", "Cortex-M33F",
"Cortex-M33-NS", "Cortex-M33F-NS", "Cortex-M33FE-NS", "Cortex-M33FE",
"Cortex-A9"
"Cortex-A5", "Cortex-A9"
]
ARMCC_RANGE = (LooseVersion("6.10"), LooseVersion("7.0"))
LD_DIAGNOSTIC_PATTERN = re.compile(
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchains/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
self.cpu.append("-mfpu=fpv5-d16")
self.cpu.append("-mfloat-abi=softfp")

if target.core == "Cortex-A9":
if target.core == "Cortex-A9" or target.core == "Cortex-A5":
self.cpu.append("-mthumb-interwork")
self.cpu.append("-marm")
self.cpu.append("-march=armv7-a")
Expand Down
2 changes: 2 additions & 0 deletions tools/toolchains/mbed_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
"__CMSIS_RTOS"],
"Cortex-M7FD": ["__CORTEX_M7", "ARM_MATH_CM7", "__FPU_PRESENT=1",
"__CMSIS_RTOS"],
"Cortex-A5": ["__CORTEX_A5", "ARM_MATH_CA5", "__FPU_PRESENT",
"__CMSIS_RTOS", "__EVAL"],
"Cortex-A9": ["__CORTEX_A9", "ARM_MATH_CA9", "__FPU_PRESENT",
"__CMSIS_RTOS", "__EVAL"],
"Cortex-M23-NS": ["__CORTEX_M23", "ARM_MATH_ARMV8MBL", "DOMAIN_NS=1",
Expand Down

0 comments on commit db344b2

Please sign in to comment.