CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

help regarding using uC-OS-II on PIC18 uC with CCS c Compile

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
bh.ravi



Joined: 09 Apr 2007
Posts: 1

View user's profile Send private message

help regarding using uC-OS-II on PIC18 uC with CCS c Compile
PostPosted: Mon Apr 09, 2007 12:31 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Apr 09, 2007 4:12 pm     Reply with quote

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 Wink 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







PostPosted: Wed Aug 06, 2008 7:57 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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