Skip to content

Commit

Permalink
Merge branch 'cortex-reg-saved'
Browse files Browse the repository at this point in the history
  • Loading branch information
jlbirccyn committed Sep 17, 2018
2 parents 390f441 + 13aa97a commit 72a6749
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions goil/templates/build/build_py.goilTemplate
Expand Up @@ -291,8 +291,8 @@ if "gcc" in compiler:
libcPath = os.path.dirname(procLibc.stdout.readline().strip())
libgccPath = os.path.dirname(procLibgcc.stdout.readline().strip())
#--- Add both to linker flags
ldflags += ['-L' + str(libcPath), '-lc']
ldflags += ['-L' + str(libgccPath), '-lgcc']
ldflags += ['-L' + bytesdecode(libcPath), '-lc']
ldflags += ['-L' + bytesdecode(libgccPath), '-lgcc']
%
end if

Expand Down
10 changes: 9 additions & 1 deletion machines/cortex/tpl_sc_handler.S
Expand Up @@ -120,6 +120,14 @@ tpl_sc_handler:
* So SP is MSP, not PSP *
*-----------------------------------------------------------------------*/

/*-------------------------------------------------------------------------
* 0 - registers R0-R3 have to be restored from the stack. First the PSP
* (process stack pointer) is copied in R0. Second registers R0-R3 are
* loaded from the process stack
*/
mrs r0,psp
ldmia r0,{r0, r1, r2, r3}

/*-------------------------------------------------------------------------
* 1 - The service identifier is checked to prevent crashes if it has
* a wrong value
Expand All @@ -129,7 +137,7 @@ tpl_sc_handler:

/*-------------------------------------------------------------------------
* 1a - The service identifier is checked again for xxxInterrupt services
* that are callable by ISR1. If the service is callable by ISR1,
* that are callable by ISR1. If the service is callable by ISR1,
* interrupts are disabled before calling the service so that it
* can't be interrupted by an ISR1.
*/
Expand Down

0 comments on commit 72a6749

Please sign in to comment.