Skip to content

Commit 287121f

Browse files
deepikabhavnanibulislaw
authored andcommitted
CMSIS/RTX: Pre-processor defines used for assembly
CMSIS repo does not support pre-processor defines, hence multiple assembly files are added for secure/non-secure and floating point tools. Mbed OS tools support assembly file pre-processing, but the build system does not support multiple assembly files for each target, hence updating the assembly files.
1 parent b882548 commit 287121f

File tree

7 files changed

+23
-25
lines changed

7 files changed

+23
-25
lines changed

rtos/TARGET_CORTEX/TARGET_CORTEX_M/TOOLCHAIN_ARM/except.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
; */
2424
#ifndef MBED_FAULT_HANDLER_DISABLED
2525
26-
#ifndef __DOMAIN_NS
27-
#define __DOMAIN_NS 1
26+
#ifndef DOMAIN_NS
27+
#define DOMAIN_NS 1
2828
#endif
2929
3030
FAULT_TYPE_HARD_FAULT EQU 0x10
@@ -67,7 +67,7 @@ UsageFault_Handler\
6767
6868
Fault_Handler PROC
6969
EXPORT Fault_Handler
70-
#if (__DOMAIN_NS == 1)
70+
#if (DOMAIN_NS == 1)
7171
IMPORT osRtxInfo
7272
IMPORT mbed_fault_handler
7373
IMPORT mbed_fault_context

rtos/TARGET_CORTEX/TARGET_CORTEX_M/TOOLCHAIN_GCC/except.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
.file "except.S"
2727
.syntax unified
2828
29-
#ifndef __DOMAIN_NS
30-
#define __DOMAIN_NS 1
29+
#ifndef DOMAIN_NS
30+
#define DOMAIN_NS 1
3131
#endif
3232

3333
.equ FAULT_TYPE_HARD_FAULT, 0x10
@@ -103,7 +103,7 @@ UsageFault_Handler:
103103
.cantunwind
104104

105105
Fault_Handler:
106-
#if (__DOMAIN_NS == 1)
106+
#if (DOMAIN_NS == 1)
107107
MRS R0,MSP
108108
LDR R1,=0x4
109109
MOV R2,LR

rtos/TARGET_CORTEX/TARGET_CORTEX_M/TOOLCHAIN_IAR/except.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ FAULT_TYPE_USAGE_FAULT EQU 0x40
3131

3232
#ifndef MBED_FAULT_HANDLER_DISABLED
3333
34-
#ifndef __DOMAIN_NS
35-
#define __DOMAIN_NS 1
34+
#ifndef DOMAIN_NS
35+
#define DOMAIN_NS 1
3636
#endif
3737
PRESERVE8
3838
SECTION .rodata:DATA:NOROOT(2)
@@ -62,7 +62,7 @@ UsageFault_Handler
6262
6363
Fault_Handler
6464
EXPORT Fault_Handler
65-
#if (__DOMAIN_NS == 1)
65+
#if (DOMAIN_NS == 1)
6666
IMPORT osRtxInfo
6767
IMPORT mbed_fault_context
6868
IMPORT mbed_fault_handler

rtos/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M23/irq_armv8mbl.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
; */
2525

2626

27-
IF :LNOT::DEF:DOMAIN_NS
28-
DOMAIN_NS EQU 0
29-
ENDIF
27+
#ifndef DOMAIN_NS
28+
DOMAIN_NS EQU 0
29+
#endif
3030

3131
I_T_RUN_OFS EQU 20 ; osRtxInfo.thread.run offset
3232
TCB_SM_OFS EQU 48 ; TCB.stack_mem offset

rtos/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_ARM/TARGET_M33/irq_armv8mml.S

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@
2424
; */
2525

2626

27-
IF :LNOT::DEF:DOMAIN_NS
28-
DOMAIN_NS EQU 0
29-
ENDIF
27+
#ifndef DOMAIN_NS
28+
DOMAIN_NS EQU 0
29+
#endif
3030

31-
IF ({FPU}="FPv5-SP") || ({FPU}="FPv5_D16")
32-
__FPU_USED EQU 1
33-
ELSE
31+
#ifndef __FPU_USED
3432
__FPU_USED EQU 0
35-
ENDIF
33+
#endif
3634

3735
I_T_RUN_OFS EQU 20 ; osRtxInfo.thread.run offset
3836
TCB_SM_OFS EQU 48 ; TCB.stack_mem offset

rtos/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M23/irq_armv8mbl.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
.file "irq_armv8mbl.S"
2828
.syntax unified
2929

30-
.ifndef DOMAIN_NS
30+
#ifndef DOMAIN_NS
3131
.equ DOMAIN_NS, 0
32-
.endif
32+
#endif
3333

3434
.equ I_T_RUN_OFS, 20 // osRtxInfo.thread.run offset
3535
.equ TCB_SM_OFS, 48 // TCB.stack_mem offset

rtos/TARGET_CORTEX/rtx5/RTX/Source/TOOLCHAIN_GCC/TARGET_M33/irq_armv8mml.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
.file "irq_armv8mml.S"
2828
.syntax unified
2929

30-
.ifndef DOMAIN_NS
30+
#ifndef DOMAIN_NS
3131
.equ DOMAIN_NS, 0
32-
.endif
32+
#endif
3333

34-
.ifndef __FPU_USED
34+
#ifndef __FPU_USED
3535
.equ __FPU_USED, 0
36-
.endif
36+
#endif
3737

3838
.equ I_T_RUN_OFS, 20 // osRtxInfo.thread.run offset
3939
.equ TCB_SM_OFS, 48 // TCB.stack_mem offset

0 commit comments

Comments
 (0)