port code from xc to mikroc

Post Reply
Author
Message
nusret3
Posts: 2
Joined: 22 May 2018 13:45

port code from xc to mikroc

#1 Post by nusret3 » 22 May 2018 13:48

hi there

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);
}

Post Reply

Return to “dsPIC Compilers General”