|
|
View previous topic :: View next topic |
Author |
Message |
bh.ravi
Joined: 09 Apr 2007 Posts: 1
|
help regarding using uC-OS-II on PIC18 uC with CCS c Compile |
Posted: Mon Apr 09, 2007 12:31 am |
|
|
hi,
i am working on PIC18F4580 microcontroller. i have CCS C compiler and MPLAB 7.5 with me. I want to know whether i can directly use the uC RTOS along with my CCS C compiler for generating the code. If not, what changes i have to make to the RTOS to enable me to use it on CCS C compiler.
i have gone through this web site.
http://www.sputnickonline.com/projects/programs/micro/uCOS_for_PIC18/details.html
but, there they ae talking about using uC RTOS with C18 compiler.
i am confused.
please help me.
ravi kumar |
|
|
jma_1
Joined: 08 Feb 2005 Posts: 147 Location: Wisconsin
|
|
Posted: Mon Apr 09, 2007 4:12 pm |
|
|
Greetings,
C18 code will need modifications to compile with CCS. I have not used C18, but chances are the data types will need to be re-mapped (from C18 to INT16, INT8, INT32, etc). Also, CCS does not support function pointers and pointers to const.
Different individuals have ported code from C18 to CCS and have posted questions / solutions.
The windows version of CCS has built in support for an RTOS. See pages 49 & 50 of the compiler manual. Is there a special feature of the uC-II which you require or will the CCS RTOS work? You also might look at the Salvo RTOS. I'm not sure if it is intended for the C18 compiler or CCS.
I can understand choosing an RTOS for an application. If none of the RTOS are easy to use or modify, perhaps revisit the necessity or the RTOS. The PIC18 is an 8-bit micro Are all the features of an RTOS necesssary for the application? A simple scheduler can be written based uC (source code and books by Jean Labrosse) without much difficulty.
Cheers,
JMA
Cheers,
JMA |
|
|
Edstroyer Guest
|
|
Posted: Wed Aug 06, 2008 7:57 pm |
|
|
Also I'd like to add that CCS uses "BRA" instruction to jump to functions instead of "RCALL" instruction which pushes the PC address onto the stack. when calling functions (or tasks), you need the compiler to use "RCALL" so you can manage your stack. This is perhaps why many of the free RTOS out there have not been supported by CCS.
CCS would need to disable this feature when calling functions, and use RCALL instead to be able to get RTOS working. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|