PIC24FJ1024GB610 + FeeRTOS

General discussion on mikroBasic PRO for dsPIC30/33 and PIC24.
Post Reply
Author
Message
ganleydt
Posts: 1
Joined: 13 Aug 2018 20:28

PIC24FJ1024GB610 + FeeRTOS

#1 Post by ganleydt » 13 Aug 2018 20:51

Hi
I would like to use FreeRTOS with the PIC24FJ1024GB610. I've downloaded the examples from Libstock and created a new project using this files. The project complies Ok but when I try to debug it there is some strange behaviour. When portRESTORE_CONTEXT() is called from xPortStartScheduler() both DSWPAG and DSRPAG are set to 0 so the processor resets and starts executing from the beginning again.

In order to get the code to compile I have had to modify the portRESTORE_CONTEXT maco so that for non EADS version as shown below.

Code: Select all

   #ifdef __HAS_EDS__
    asm POP DSWPAG;
    asm POP DSRPAG;
    #else
    //Modification as suggested in https://www.freertos.org/FreeRTOS_Support_Forum_Archive/November_2010/freertos_PSVPAG_error_PIC24FJ256DA210_3939736.html
    //asm POP PSVPAG;
    asm POP DSWPAG;
    asm POP DSRPAG;

    #endif /* __HAS_EDS__ */

I have assumed that mikroC does not support EDS, is this correct? and is there a solution to this problem ?


Looking at the device datasheet(p75) it seem the problem is that my code is trying to set a destination address above 8000h and hence generating an address error.


Many Thanks

User avatar
petar.suknjaja
mikroElektronika team
Posts: 683
Joined: 05 Mar 2018 09:44
Location: Belgrade

Re: PIC24FJ1024GB610 + FeeRTOS

#2 Post by petar.suknjaja » 21 Aug 2018 08:09

Hi,
Sorry for delayed response,
You are correct, the EDS is not supported,
and regarding the solution, I need to consult the documentation.
Kind regards,
Petar

Post Reply

Return to “mikroBasic PRO for dsPIC30/33 and PIC24 General”