Update XMOS xcore.ai port to be compatible with v11.x (#1096)

* Fix kexcept function

* Create dummy pxCurrentTCBs for xcore.ai port

* Additional commentary

* Add a layer of indirection to cope with singlecore

* Clarify use of _DoException
This commit is contained in:
Angel Cascarino 2024-06-27 23:49:53 +01:00 committed by GitHub
parent 9e838293c2
commit 17dfd0f808
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 36 additions and 8 deletions

View file

@ -14,11 +14,8 @@ rest of the ISR callback functions. */
.issue_mode dual
.cc_top kexcept.function, kexcept
kexcept:
ldc r11, 0x0008
shl r11, r11, 16
ldc r9, 0x0080
or r11, r11, r9
bau r11 //_TrapHandler is at 0x00080080. TODO: Is it always? Why can't I access the symbol _TrapHandler?
bu _DoException /* This symbol is generated by the toolchain and */
/* provides graceful exception handling */
_yield:
{set sp, r4 /* Restore the task's SP to save the rest of its context. */
@ -123,7 +120,7 @@ _yield_continue:
ldaw r11, sp[37]}
vstc r11[0]
#endif
ldaw r5, dp[pxCurrentTCBs] /* Get the current TCB array into r5. */
ldw r5, dp[xcorePvtTCBContainer]
ldw r1, r5[r0] /* Get this core's current TCB pointer into r1. */
stw r4, r1[0x0] /* Save the current task's SP to the first */
/* word (top of stack) in the current TCB. */