I am trying port freertos to the TC233 Controller on HighTec IDE, I am getting this error at TriCore__mtcr( TRICORE_CPU_ICR, ulICR );
/* Load the lower context, upper context is loaded through the return */
TriCore__rslcx(); in below function vPortStartFirstTask()
TRICORE_NOINLINE void vPortStartFirstTask()
{
unsigned long ** ppxTopOfStack;
unsigned long uxLowerCSA;
TriCore__dsync();
/* Load the new CSA id from the stack and update the stack pointer */
ppxTopOfStack = ( unsigned long ** ) pxCurrentTCB;
uxLowerCSA = **ppxTopOfStack;
( *ppxTopOfStack )++;
/* Update the link register */
TriCore__mtcr( TRICORE_CPU_PCXI, uxLowerCSA );
TriCore__isync();
/* Disable interrupts and reset the interrupt mask. IRQs will be enabled through context PCXI */
TriCore__disable();
unsigned long ulICR = TriCore__mfcr( TRICORE_CPU_ICR );
ulICR &= ~portCCPN_MASK;
**TriCore__mtcr( TRICORE_CPU_ICR, ulICR );**
/* Load the lower context, upper context is loaded through the return */
TriCore__rslcx();
}
while debugging I observed this error
IfxCpu_Trap_contextManagementError(
tin = ?)
trapWatch = (tAddr = 2147536118, tId = 5, tClass = 3, tCpu = 0)
exception
vPortStartFirstTask()
ppxTopOfStack = 0x700061A0
uxLowerCSA = 0
ulICR = 655360
...
unsigned __newval = (unsigned) (val); \
__asm__ volatile ("mtcr LO:" __STRINGIFY (regaddr) ", %0" \
:: "d" (__newval) : "memory"); \
} while (0)
static __inline__ __attribute__((__always_inline__))
void _mtcr (const unsigned __regaddr, const unsigned __val)
{
__asm__ volatile ("mtcr LO:%0, %1"
end of frame
Does anyone help me to resolve this issue.