Skip to content

Commit b0739d7

Browse files
bridadanilg-ul
authored andcommitted
Fixing Cortex-A and SARA_NBIOT_EVK build failures (#3)
* Adding Cortex-A support for gnuarmeclipse * Preventing '-mthumb' from being added to Cortex-A builds. Previously, both '-mthumb' and '-marm' were being supplied to the compiler (in that order). Because '-marm' came last, the compiler respected this option. This change makes it so '-mthumb' is added for all 'Cortex-M' targets only. * Renaming to capital .S for Eclipse compatibility
1 parent 57e93a5 commit b0739d7

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

tools/export/gnuarmeclipse/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ def process_options(self, opts, flags_in):
607607
'Cortex-M7': {'mcpu': 'cortex-m7', 'fpu_unit': None},
608608
'Cortex-M7F': {'mcpu': 'cortex-m7', 'fpu_unit': 'fpv4spd16'},
609609
'Cortex-M7FD': {'mcpu': 'cortex-m7', 'fpu_unit': 'fpv5d16'},
610+
'Cortex-A9': {'mcpu': 'cortex-a9', 'fpu_unit': 'vfpv3'}
610611
}
611612

612613
# Remove options that are supplied by CDT
@@ -635,9 +636,9 @@ def process_options(self, opts, flags_in):
635636
opts['common']['arm.target.arch'] = 'none'
636637
str = self.find_options(flags['common_flags'], '-march=')
637638
arch = str[len('-march='):]
638-
archs = {'armv6-m': 'armv6-m', 'armv7-m': 'armv7-m'}
639+
archs = {'armv6-m': 'armv6-m', 'armv7-m': 'armv7-m', 'armv7-a': 'armv7-a'}
639640
if arch in archs:
640-
opts['common']['arm.target.arch'] = archs[arh]
641+
opts['common']['arm.target.arch'] = archs[arch]
641642
self.remove_option(flags['common_flags'], str)
642643

643644
opts['common']['arm.target.instructionset'] = 'thumb'

tools/toolchains/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def __init__(self, target, notify=None, macros=None,
5858
cpu = target.core.lower()
5959

6060
self.cpu = ["-mcpu=%s" % cpu]
61-
if target.core.startswith("Cortex"):
61+
if target.core.startswith("Cortex-M"):
6262
self.cpu.append("-mthumb")
6363

6464
# FPU handling, M7 possibly to have double FPU

0 commit comments

Comments
 (0)