Skip to content

Commit ff80e29

Browse files
author
deepikabhavnani
committed
Align to CMSIS defines for Non-secure
CMSIS updated the __DOMAIN_NS define to DOMAIN_NS. Update the define in existing code for non-secure part.
1 parent 920db63 commit ff80e29

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_MICRO/M2351.sct

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Secure: 32KiB
1111
* Non-secure: 64KiB
1212
*/
13-
#if defined(__DOMAIN_NS) && __DOMAIN_NS
13+
#if defined(DOMAIN_NS) && DOMAIN_NS
1414

1515
#ifndef MBED_APP_START
1616
#define MBED_APP_START 0x10040000
@@ -64,14 +64,14 @@
6464

6565
/* Initial/ISR stack size */
6666
#if (! defined(NU_INITIAL_STACK_SIZE))
67-
#if defined(__DOMAIN_NS) && __DOMAIN_NS
67+
#if defined(DOMAIN_NS) && DOMAIN_NS
6868
#define NU_INITIAL_STACK_SIZE 0x800
6969
#else
7070
#define NU_INITIAL_STACK_SIZE 0x800
7171
#endif
7272
#endif
7373

74-
#if defined(__DOMAIN_NS) && __DOMAIN_NS
74+
#if defined(DOMAIN_NS) && DOMAIN_NS
7575

7676
LR_IROM1 MBED_APP_START
7777
{

targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_ARM_STD/M2351.sct

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Secure: 32KiB
1111
* Non-secure: 64KiB
1212
*/
13-
#if defined(__DOMAIN_NS) && __DOMAIN_NS
13+
#if defined(DOMAIN_NS) && DOMAIN_NS
1414

1515
#ifndef MBED_APP_START
1616
#define MBED_APP_START 0x10040000
@@ -64,14 +64,14 @@
6464

6565
/* Initial/ISR stack size */
6666
#if (! defined(NU_INITIAL_STACK_SIZE))
67-
#if defined(__DOMAIN_NS) && __DOMAIN_NS
67+
#if defined(DOMAIN_NS) && DOMAIN_NS
6868
#define NU_INITIAL_STACK_SIZE 0x800
6969
#else
7070
#define NU_INITIAL_STACK_SIZE 0x800
7171
#endif
7272
#endif
7373

74-
#if defined(__DOMAIN_NS) && __DOMAIN_NS
74+
#if defined(DOMAIN_NS) && DOMAIN_NS
7575

7676
LR_IROM1 MBED_APP_START
7777
{

targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_GCC_ARM/M2351.ld

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Secure: 32KiB
1313
* Non-secure: 64KiB
1414
*/
15-
#if defined(__DOMAIN_NS) && __DOMAIN_NS
15+
#if defined(DOMAIN_NS) && DOMAIN_NS
1616

1717
#ifndef MBED_APP_START
1818
#define MBED_APP_START 0x10040000
@@ -50,7 +50,7 @@
5050

5151
#endif
5252

53-
#if defined(__DOMAIN_NS) && __DOMAIN_NS
53+
#if defined(DOMAIN_NS) && DOMAIN_NS
5454
StackSize = 0x800;
5555
#else
5656
StackSize = 0x800;
@@ -71,7 +71,7 @@ StackSize = 0x800;
7171
#endif
7272

7373

74-
#if defined(__DOMAIN_NS) && __DOMAIN_NS
74+
#if defined(DOMAIN_NS) && DOMAIN_NS
7575

7676
MEMORY
7777
{
@@ -192,7 +192,7 @@ SECTIONS
192192
KEEP(*(.eh_frame*))
193193
} > FLASH
194194

195-
#if (! defined(__DOMAIN_NS)) || (! __DOMAIN_NS)
195+
#if (! defined(DOMAIN_NS)) || (! DOMAIN_NS)
196196
/* Veneer$$CMSE : */
197197
.gnu.sgstubs :
198198
{

targets/TARGET_NUVOTON/TARGET_M2351/device/TOOLCHAIN_IAR/M2351.icf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*-Editor annotation file-*/
33
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
44

5-
if (isdefinedsymbol(__DOMAIN_NS)) {
5+
if (isdefinedsymbol(DOMAIN_NS)) {
66

77
if (! isdefinedsymbol(MBED_APP_START)) {
88
define symbol MBED_APP_START = 0x10040000;
@@ -85,7 +85,7 @@ do not initialize { section .noinit };
8585
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
8686

8787
place in ROM_region { readonly };
88-
if (! isdefinedsymbol(__DOMAIN_NS)) {
88+
if (! isdefinedsymbol(DOMAIN_NS)) {
8989
place at address mem:__ICFEDIT_region_NSCROM_start__ { readonly section Veneer$$CMSE };
9090
}
9191
place at start of IRAM_region { block CSTACK };

tools/toolchains/arm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,9 @@ def __init__(self, target, *args, **kwargs):
424424
build_dir = kwargs['build_dir']
425425
secure_file = join(build_dir, "cmse_lib.o")
426426
self.flags["ld"] += ["--import_cmse_lib_out=%s" % secure_file]
427-
# Add linking time preprocessor macro __DOMAIN_NS
427+
# Add linking time preprocessor macro DOMAIN_NS
428428
if target.core == "Cortex-M23-NS" or self.target.core == "Cortex-M33-NS":
429-
define_string = self.make_ld_define("__DOMAIN_NS", "0x1")
429+
define_string = self.make_ld_define("DOMAIN_NS", "0x1")
430430
self.flags["ld"].append(define_string)
431431

432432
asm_cpu = {

tools/toolchains/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
9797
"-Wl,--out-implib=%s" % join(build_dir, "cmse_lib.o")
9898
])
9999
elif target.core == "Cortex-M23-NS" or target.core == "Cortex-M33-NS":
100-
self.flags["ld"].append("-D__DOMAIN_NS=1")
100+
self.flags["ld"].append("-DDOMAIN_NS=1")
101101

102102
self.flags["common"] += self.cpu
103103

0 commit comments

Comments
 (0)