Skip to content

Commit 5b67935

Browse files
author
tanche
committed
update IAR CM3 port to avoid including FreeRTOSConfig.h in portasm.s
1 parent 78e0cc7 commit 5b67935

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

portable/IAR/ARM_CM3/port.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ extern void vPortSVCHandler( void );
137137
extern void xPortPendSVHandler( void );
138138
/*-----------------------------------------------------------*/
139139

140+
/* store Max Syscall Interrupt Priority to be able to get it
141+
* in portasm.s without included FreeRTOSConfig.h
142+
*/
143+
const uint32_t portConfigMaxSyscallIntPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY;
144+
140145
/* Each task maintains its own interrupt status in the critical nesting
141146
* variable. */
142147
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;

portable/IAR/ARM_CM3/portasm.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
*
2727
*/
2828

29-
#include <FreeRTOSConfig.h>
3029

3130
RSEG CODE:CODE(2)
3231
thumb
3332

3433
EXTERN pxCurrentTCB
3534
EXTERN vTaskSwitchContext
35+
EXTERN portConfigMaxSyscallIntPriority
3636

3737
PUBLIC xPortPendSVHandler
3838
PUBLIC vPortSVCHandler
@@ -52,7 +52,7 @@ xPortPendSVHandler:
5252
str r0, [r2] /* Save the new top of stack into the first member of the TCB. */
5353

5454
stmdb sp!, {r3, r14}
55-
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
55+
ldr r0, =portConfigMaxSyscallIntPriority
5656
msr basepri, r0
5757
dsb
5858
isb

0 commit comments

Comments
 (0)