aboutsummaryrefslogtreecommitdiffstats
path: root/src/gos/gos_x_threads_cortexm47fp.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2016-12-23 08:56:16 +1000
committerinmarket <andrewh@inmarket.com.au>2016-12-23 08:56:16 +1000
commit06de6f193132a61dbb5e9b8f9a37e56929f7643b (patch)
tree5bf4fcd55f6d175857b017a051e36cb4393905d3 /src/gos/gos_x_threads_cortexm47fp.h
parentbaa20c4e60f542ec70b554fadec3be7fea74fe7e (diff)
downloaduGFX-06de6f193132a61dbb5e9b8f9a37e56929f7643b.tar.gz
uGFX-06de6f193132a61dbb5e9b8f9a37e56929f7643b.tar.bz2
uGFX-06de6f193132a61dbb5e9b8f9a37e56929f7643b.zip
Updates to Keil RAW32 CPU specific scheduler.
Tested working on CortexM7 and CortexM7 with FP.
Diffstat (limited to 'src/gos/gos_x_threads_cortexm47fp.h')
-rw-r--r--src/gos/gos_x_threads_cortexm47fp.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gos/gos_x_threads_cortexm47fp.h b/src/gos/gos_x_threads_cortexm47fp.h
index 62812c2e..8134a05d 100644
--- a/src/gos/gos_x_threads_cortexm47fp.h
+++ b/src/gos/gos_x_threads_cortexm47fp.h
@@ -47,8 +47,12 @@
}
#elif GFX_COMPILER == GFX_COMPILER_KEIL || GFX_COMPILER == GFX_COMPILER_ARMCC
+ #define GFX_THREADS_DONE
+ #define _gfxThreadsInit()
static __asm void _gfxTaskSwitch(thread *oldt, thread *newt) {
+ PRESERVE8
+
// Save the old context
push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
vpush {s16-s31}
@@ -61,6 +65,8 @@
}
static __asm void _gfxStartThread(thread *oldt, thread *newt) {
+ PRESERVE8
+
// Calculate where to generate the new context
// newt->cxt = (char *)newt + newt->size;
ldr r2,[r1,#__cpp(offsetof(thread,size))]
@@ -77,13 +83,15 @@
// Run the users function - we save some code because gfxThreadExit() never returns
// gfxThreadExit(_gfxCurrentThread->fn(_gfxCurrentThread->param));
- ldr r2,__cpp(&_gfxCurrentThread)
+ ldr r2,=__cpp(&_gfxCurrentThread)
ldr r2,[r2,#0]
ldr r0,[r2,#__cpp(offsetof(thread,param))]
ldr r1,[r2,#__cpp(offsetof(thread,fn))]
blx r1
mov r4,r0
bl __cpp(gfxThreadExit)
+
+ ALIGN
}
#else