View previous topic :: View next topic |
Author |
Message |
haxan7
Joined: 27 Jul 2013 Posts: 79
|
RTOS for CCS |
Posted: Wed May 21, 2014 1:11 am |
|
|
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: 9229 Location: Greensville,Ontario
|
|
Posted: Wed May 21, 2014 4:54 am |
|
|
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
|
|
Posted: Wed May 21, 2014 5:46 am |
|
|
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
|
|
Posted: Wed May 21, 2014 6:00 am |
|
|
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
|
|
Posted: Wed May 21, 2014 10:46 am |
|
|
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: 19520
|
|
Posted: Wed May 21, 2014 11:02 am |
|
|
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 |
|
|
|