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

RTOS for CCS

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



Joined: 27 Jul 2013
Posts: 79

View user's profile Send private message

RTOS for CCS
PostPosted: Wed May 21, 2014 1:11 am     Reply with quote

I am looking for RTOS that supports PIC24 and/or PIC32 on CCS compiler.
OSA has been ported for CCS but only works for PIC16 and PIC18.
Any suggestions?

Edit:
One major reason I want to use RTOS is to establish user interface.


Last edited by haxan7 on Wed May 21, 2014 5:54 am; edited 1 time in total
temtronic



Joined: 01 Jul 2010
Posts: 9202
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed May 21, 2014 4:54 am     Reply with quote

Option #1 .Write your own. Really it's not that hard to do,depending on WHAT you expect an RTOS is and the features you will be using.

RTOS is really a meaningless term to me.You need to detail the features and functions necessary for your application.

If this is a 'one off' project cutting RTOS code isn't viable, but if for a product of 1,000s then spend the time and cut code.

I'll lay odds 99.9% of the PIC projects and products developed using CCS C in this forum do not use the RTOS.

Option #2. Rethink your project code.CCS provides great functions to timers,bit functions,I/O, etc. making coding 'fun'.

hth
jay
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Wed May 21, 2014 5:46 am     Reply with quote

Of course there is the RTOS supplied together with the CCS compiler...
Then there are several other OS-es out there for use on the PIC24 PIC32 but I don't know if these are supported by the CCS compiler. Problem is that most implementations require compiler support for re-entrant functions and that is something CCS doesn't have (advantage is that many CCS programs can be smaller).

Then, why do you want an RTOS? What problems do you think it will solve for you?
My understanding is that many people say they want an RTOS but have no idea of the limitations of most RTOS-es. Often the problem can be tackled without RTOS; use a timer interrupt and a separate state machine for each 'task' and you are up and running in no time without the hidden RTOS problems.
haxan7



Joined: 27 Jul 2013
Posts: 79

View user's profile Send private message

PostPosted: Wed May 21, 2014 6:00 am     Reply with quote

ckielstra wrote:
Then, why do you want an RTOS? What problems do you think it will solve for you?

Reason why I am opting for an RTOS, is because the application includes a lot interaction with the user. I think scrolling messages would be best handled by an RTOS.
Jerson



Joined: 31 Jul 2009
Posts: 125
Location: Bombay, India

View user's profile Send private message Visit poster's website

PostPosted: Wed May 21, 2014 10:46 am     Reply with quote

ckielstra wrote:
Often the problem can be tackled without RTOS; use a timer interrupt and a separate state machine for each 'task' and you are up and running in no time without the hidden RTOS problems.

@ckielstra :
I'm just wondering if you could elaborate a little on your concept with a simple pseudo code example of LCD and keyboard.

Over the years, I've had mixed success with protothreads, own rolled rt OSs and state machines. Perhaps there may be something I could learn here especially when thinking tiny embedded like PIC12/16 with their limited RAM.

Thank you
Ttelmah



Joined: 11 Mar 2010
Posts: 19447

View user's profile Send private message

PostPosted: Wed May 21, 2014 11:02 am     Reply with quote

Key thing to remember is that whatever approach you use, the individual tasks, have to be short. You can't have 'main routine' code, interrupting other 'main routine' code. The CCS supplied RTOS, or any other approach, functions like the old W95 multi-tasking, with new things only being scheduled when a routine exits. Provided you keep this in mind, the supplied RTOS can do what you want, but a simple tick interrupt , can do it just as well, and gives you more precise control over the timing, together with more flexibility.

Best Wishes
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