diff --git a/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_MICRO/M2351.sct b/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_MICRO/M2351.sct index d393d81492..e7de211e84 100644 --- a/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_MICRO/M2351.sct +++ b/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_MICRO/M2351.sct @@ -10,7 +10,7 @@ * Secure: 32KiB * Non-secure: 64KiB */ -#if defined(__DOMAIN_NS) && __DOMAIN_NS +#if defined(DOMAIN_NS) && DOMAIN_NS #ifndef MBED_APP_START #define MBED_APP_START 0x10040000 @@ -64,14 +64,14 @@ /* Initial/ISR stack size */ #if (! defined(NU_INITIAL_STACK_SIZE)) -#if defined(__DOMAIN_NS) && __DOMAIN_NS +#if defined(DOMAIN_NS) && DOMAIN_NS #define NU_INITIAL_STACK_SIZE 0x800 #else #define NU_INITIAL_STACK_SIZE 0x800 #endif #endif -#if defined(__DOMAIN_NS) && __DOMAIN_NS +#if defined(DOMAIN_NS) && DOMAIN_NS LR_IROM1 MBED_APP_START { diff --git a/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_STD/M2351.sct b/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_STD/M2351.sct index d393d81492..e7de211e84 100644 --- a/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_STD/M2351.sct +++ b/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_STD/M2351.sct @@ -10,7 +10,7 @@ * Secure: 32KiB * Non-secure: 64KiB */ -#if defined(__DOMAIN_NS) && __DOMAIN_NS +#if defined(DOMAIN_NS) && DOMAIN_NS #ifndef MBED_APP_START #define MBED_APP_START 0x10040000 @@ -64,14 +64,14 @@ /* Initial/ISR stack size */ #if (! defined(NU_INITIAL_STACK_SIZE)) -#if defined(__DOMAIN_NS) && __DOMAIN_NS +#if defined(DOMAIN_NS) && DOMAIN_NS #define NU_INITIAL_STACK_SIZE 0x800 #else #define NU_INITIAL_STACK_SIZE 0x800 #endif #endif -#if defined(__DOMAIN_NS) && __DOMAIN_NS +#if defined(DOMAIN_NS) && DOMAIN_NS LR_IROM1 MBED_APP_START { diff --git a/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_GCC_ARM/M2351.ld b/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_GCC_ARM/M2351.ld index 956901e5d4..185e5fa42e 100644 --- a/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_GCC_ARM/M2351.ld +++ b/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_GCC_ARM/M2351.ld @@ -12,7 +12,7 @@ * Secure: 32KiB * Non-secure: 64KiB */ -#if defined(__DOMAIN_NS) && __DOMAIN_NS +#if defined(DOMAIN_NS) && DOMAIN_NS #ifndef MBED_APP_START #define MBED_APP_START 0x10040000 @@ -50,7 +50,7 @@ #endif -#if defined(__DOMAIN_NS) && __DOMAIN_NS +#if defined(DOMAIN_NS) && DOMAIN_NS StackSize = 0x800; #else StackSize = 0x800; @@ -71,7 +71,7 @@ StackSize = 0x800; #endif -#if defined(__DOMAIN_NS) && __DOMAIN_NS +#if defined(DOMAIN_NS) && DOMAIN_NS MEMORY { @@ -192,7 +192,7 @@ SECTIONS KEEP(*(.eh_frame*)) } > FLASH -#if (! defined(__DOMAIN_NS)) || (! __DOMAIN_NS) +#if (! defined(DOMAIN_NS)) || (! DOMAIN_NS) /* Veneer$$CMSE : */ .gnu.sgstubs : { diff --git a/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_IAR/M2351.icf b/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_IAR/M2351.icf index cc591e7ca7..ab844f73ea 100644 --- a/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_IAR/M2351.icf +++ b/targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_IAR/M2351.icf @@ -2,7 +2,7 @@ /*-Editor annotation file-*/ /* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */ -if (isdefinedsymbol(__DOMAIN_NS)) { +if (isdefinedsymbol(DOMAIN_NS)) { if (! isdefinedsymbol(MBED_APP_START)) { define symbol MBED_APP_START = 0x10040000; @@ -85,7 +85,7 @@ do not initialize { section .noinit }; place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; place in ROM_region { readonly }; -if (! isdefinedsymbol(__DOMAIN_NS)) { +if (! isdefinedsymbol(DOMAIN_NS)) { place at address mem:__ICFEDIT_region_NSCROM_start__ { readonly section Veneer$$CMSE }; } place at start of IRAM_region { block CSTACK }; diff --git a/tools/toolchains/arm.py b/tools/toolchains/arm.py index d37c94e92b..d3614e2c53 100644 --- a/tools/toolchains/arm.py +++ b/tools/toolchains/arm.py @@ -424,9 +424,9 @@ class ARMC6(ARM_STD): build_dir = kwargs['build_dir'] secure_file = join(build_dir, "cmse_lib.o") self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file] - # Add linking time preprocessor macro __DOMAIN_NS + # Add linking time preprocessor macro DOMAIN_NS if target.core == "Cortex-M23-NS" or self.target.core == "Cortex-M33-NS": - define_string = self.make_ld_define("__DOMAIN_NS", "0x1") + define_string = self.make_ld_define("DOMAIN_NS", "0x1") self.flags["ld"].append(define_string) asm_cpu = { diff --git a/tools/toolchains/gcc.py b/tools/toolchains/gcc.py index f094fb9702..5b1a07eb5c 100644 --- a/tools/toolchains/gcc.py +++ b/tools/toolchains/gcc.py @@ -97,7 +97,7 @@ class GCC(mbedToolchain): "-Wl,--out-implib=%s" % join(build_dir, "cmse_lib.o") ]) elif target.core == "Cortex-M23-NS" or target.core == "Cortex-M33-NS": - self.flags["ld"].append("-D__DOMAIN_NS=1") + self.flags["ld"].append("-DDOMAIN_NS=1") self.flags["common"] += self.cpu