mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #9431 from deepikabhavnani/iar_armv8m_changes
Update IAR Armv8M changespull/9602/head
commit
0ae6a048e4
|
|
@ -130,19 +130,6 @@ extern void SystemInit(void);
|
|||
extern void SystemCoreClockUpdate(void);
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined (__ICCARM__)
|
||||
uint32_t __TZ_get_PSP_NS(void);
|
||||
void __TZ_set_PSP_NS(uint32_t topOfProcStack);
|
||||
int32_t __TZ_get_MSP_NS(void);
|
||||
void __TZ_set_MSP_NS(uint32_t topOfMainStack);
|
||||
uint32_t __TZ_get_PRIMASK_NS(void);
|
||||
void __TZ_set_PRIMASK_NS(uint32_t priMask);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -341,5 +341,8 @@
|
|||
"GBECoreSlave": 39,
|
||||
"FPU2": 6,
|
||||
"GFPUCoreSlave2": 39
|
||||
},
|
||||
"M2351KIAAEES": {
|
||||
"OGChipSelectEditMenu": "M2351 series\tNuvoton M2351 series"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ from os import remove
|
|||
from os.path import join, splitext, exists
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
from tools.targets import CORE_ARCH
|
||||
from tools.toolchains import mbedToolchain, TOOLCHAIN_PATHS
|
||||
from tools.hooks import hook_tool
|
||||
from tools.utils import run_cmd, NotSupportedException
|
||||
|
|
@ -43,23 +44,34 @@ class IAR(mbedToolchain):
|
|||
|
||||
def __init__(self, target, notify=None, macros=None, build_profile=None,
|
||||
build_dir=None):
|
||||
mbedToolchain.__init__(self, target, notify, macros, build_dir=build_dir,
|
||||
build_profile=build_profile)
|
||||
if target.core == "Cortex-M7F" or target.core == "Cortex-M7FD":
|
||||
cpuchoice = "Cortex-M7"
|
||||
elif target.core.startswith("Cortex-M23"):
|
||||
cpuchoice = "8-M.baseline"
|
||||
elif target.core.startswith("Cortex-M33"):
|
||||
cpuchoice = "8-M.mainline"
|
||||
mbedToolchain.__init__(self, target, notify, macros, build_dir=build_dir, build_profile=build_profile)
|
||||
core = target.core
|
||||
if CORE_ARCH[target.core] == 8:
|
||||
# Add linking time preprocessor macro DOMAIN_NS
|
||||
if target.core.endswith("-NS"):
|
||||
define_string = self.make_ld_define("DOMAIN_NS", "0x1")
|
||||
self.flags["ld"].append(define_string)
|
||||
core = target.core[:-3]
|
||||
else:
|
||||
cpuchoice = target.core
|
||||
# Create Secure library
|
||||
self.flags["asm"] += ["--cmse"]
|
||||
self.flags["common"] += ["--cmse"]
|
||||
secure_file = join(build_dir, "cmse_lib.o")
|
||||
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]
|
||||
|
||||
cpu = {
|
||||
"Cortex-M7FD": "Cortex-M7.fp.dp",
|
||||
"Cortex-M7F": "Cortex-M7.fp.sp",
|
||||
"Cortex-M33": "Cortex-M33.no_dsp",
|
||||
"Cortex-M33F": "Cortex-M33.fp.no_dsp",
|
||||
"Cortex-M33FE": "Cortex-M33.fp"}.get(core, core)
|
||||
|
||||
# flags_cmd are used only by our scripts, the project files have them already defined,
|
||||
# using this flags results in the errors (duplication)
|
||||
# asm accepts --cpu Core or --fpu FPU, not like c/c++ --cpu=Core
|
||||
asm_flags_cmd = ["--cpu", cpuchoice]
|
||||
asm_flags_cmd = ["--cpu", cpu]
|
||||
# custom c flags
|
||||
c_flags_cmd = ["--cpu", cpuchoice]
|
||||
c_flags_cmd = ["--cpu", cpu]
|
||||
|
||||
c_flags_cmd.extend([
|
||||
"--thumb", "--dlib_config", "DLib_Config_Full.h"
|
||||
|
|
@ -68,20 +80,6 @@ class IAR(mbedToolchain):
|
|||
cxx_flags_cmd = [
|
||||
"--c++", "--no_rtti", "--no_exceptions"
|
||||
]
|
||||
if target.core == "Cortex-M7FD":
|
||||
asm_flags_cmd += ["--fpu", "VFPv5"]
|
||||
c_flags_cmd.append("--fpu=VFPv5")
|
||||
elif target.core == "Cortex-M7F":
|
||||
asm_flags_cmd += ["--fpu", "VFPv5_sp"]
|
||||
c_flags_cmd.append("--fpu=VFPv5_sp")
|
||||
elif target.core == "Cortex-M23" or target.core == "Cortex-M33" or target.core == "Cortex-M33F":
|
||||
self.flags["asm"] += ["--cmse"]
|
||||
self.flags["common"] += ["--cmse"]
|
||||
|
||||
# Create Secure library
|
||||
if target.core == "Cortex-M23" or self.target.core == "Cortex-M33" or self.target.core == "Cortex-M33F":
|
||||
secure_file = join(build_dir, "cmse_lib.o")
|
||||
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]
|
||||
|
||||
IAR_BIN = join(TOOLCHAIN_PATHS['IAR'], "bin")
|
||||
main_cc = join(IAR_BIN, "iccarm")
|
||||
|
|
|
|||
Loading…
Reference in New Issue