mikroc does not have a tool like microchip code configurator so I use mcc to create initialization code.
It's been working for 8 bit but I got stuck with DSC
is there anyone can port this to mikroC?
Code: Select all
inline static void use_failsafe_stack(void)
{
static uint8_t failsafe_stack[32];
asm volatile (
" mov %[pstack], W15\n"
:
: [pstack]"r"(failsafe_stack)
);
/* Controls where the stack pointer limit is, relative to the end of the
* failsafe stack
*/
SPLIM = (uint16_t)(((uint8_t *)failsafe_stack) + sizeof(failsafe_stack)
- FAILSAFE_STACK_GUARDSIZE);
}