update IAR CM3 port to avoid including FreeRTOSConfig.h in portasm.s

This commit is contained in:
tanche 2025-01-17 11:36:48 +01:00
parent 78e0cc778a
commit 5b67935daf
2 changed files with 7 additions and 2 deletions

View file

@ -137,6 +137,11 @@ extern void vPortSVCHandler( void );
extern void xPortPendSVHandler( void );
/*-----------------------------------------------------------*/
/* store Max Syscall Interrupt Priority to be able to get it
* in portasm.s without included FreeRTOSConfig.h
*/
const uint32_t portConfigMaxSyscallIntPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY;
/* Each task maintains its own interrupt status in the critical nesting
* variable. */
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;

View file

@ -26,13 +26,13 @@
*
*/
#include <FreeRTOSConfig.h>
RSEG CODE:CODE(2)
thumb
EXTERN pxCurrentTCB
EXTERN vTaskSwitchContext
EXTERN portConfigMaxSyscallIntPriority
PUBLIC xPortPendSVHandler
PUBLIC vPortSVCHandler
@ -52,7 +52,7 @@ xPortPendSVHandler:
str r0, [r2] /* Save the new top of stack into the first member of the TCB. */
stmdb sp!, {r3, r14}
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY
ldr r0, =portConfigMaxSyscallIntPriority
msr basepri, r0
dsb
isb