Skip to content

Commit

Permalink
fix: add additional .ltorg directives to GCC CM3/CM4 mpu ports (FreeR…
Browse files Browse the repository at this point in the history
…TOS#473)

Co-authored-by: Nils Niemann <Niemann.N@eppendorf.de>
  • Loading branch information
niniemann and Nils Niemann authored Mar 10, 2022
1 parent f18e432 commit bdec3b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions portable/GCC/ARM_CM3_MPU/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ static void prvRestoreContextOfFirstTask( void )
" ldr r14, =0xfffffffd \n"/* Load exec return code. */
" bx r14 \n"
" \n"
" .ltorg \n"/* Assemble current literal pool to avoid offset-out-of-bound errors with lto. */
" .align 4 \n"
"pxCurrentTCBConst2: .word pxCurrentTCB \n"
);
Expand Down Expand Up @@ -579,6 +580,7 @@ void xPortPendSVHandler( void )
" msr psp, r0 \n"
" bx r14 \n"
" \n"
" .ltorg \n"/* Assemble current literal pool to avoid offset-out-of-bound errors with lto. */
" .align 4 \n"
"pxCurrentTCBConst: .word pxCurrentTCB \n"
::"i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY )
Expand Down
2 changes: 2 additions & 0 deletions portable/GCC/ARM_CM4_MPU/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ static void prvRestoreContextOfFirstTask( void )
" msr basepri, r0 \n"
" bx r14 \n"
" \n"
" .ltorg \n"/* Assemble current literal pool to avoid offset-out-of-bound errors with lto. */
" .align 4 \n"
"pxCurrentTCBConst2: .word pxCurrentTCB \n"
);
Expand Down Expand Up @@ -631,6 +632,7 @@ void xPortPendSVHandler( void )
" msr psp, r0 \n"
" bx r14 \n"
" \n"
" .ltorg \n"/* Assemble the current literal pool to avoid offset-out-of-bound errors with lto. */
" .align 4 \n"
"pxCurrentTCBConst: .word pxCurrentTCB \n"
::"i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY )
Expand Down

0 comments on commit bdec3b6

Please sign in to comment.