Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions portable/IAR/ARM_CM3/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions portable/IAR/ARM_CM3/portasm.s
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
*
*/

#include <FreeRTOSConfig.h>

RSEG CODE:CODE(2)
thumb

EXTERN pxCurrentTCB
EXTERN vTaskSwitchContext
EXTERN portConfigMaxSyscallIntPriority

PUBLIC xPortPendSVHandler
PUBLIC vPortSVCHandler
Expand All @@ -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
Expand Down
Loading