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

Using CCS RTOS calls in a real application

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



Joined: 08 Jan 2006
Posts: 23
Location: Saratoga, CA USA

View user's profile Send private message

Using CCS RTOS calls in a real application
PostPosted: Mon Dec 03, 2007 10:06 pm     Reply with quote

I have an application I am working on that naturally falls into three subtasks: RS232 serial comm, USB CDC serial comm, and a hardware bit-banging interface. Using RTOS seemed a perfect fit until I actually tried some coding Sad

The problem is that RTOS calls can ONLY be made in the top level tasks (ie, the routines immediately following the #task pragmas). Subroutines called from these tasks cannot make RTOS calls (you get a compile time error). Looking at all the CCS RTOS demos this is now obvious, altho I could not find this restriction in any of the RTOS documentation (which is rather sketchy Mad).

This restriction (if you think about it hard enough) is a logical technical limitation in the very simple CCS RTOS implementation, but it makes using the RTOS very cumbersome at best. Has anyone used CCS RTOS in a real design that is reasonably complex in terms of code functionality? If so how did you structure the code?

If I have to promote all the 'significant' code that would make an RTOS call to the top level RTOS tasks, this turns those tasks into a really, really long blocks of inline code that makes very little use of subroutines, and a lot of use of switch(){} blocks.

Any comments from others on using RTOS and your program structure would be appreciated.

Don

FWIW I'm using 4.064 with a PIC18F4550

I just read the Salvo RTOS user guide, and it looks like it has the same restriction (RTOS calls only at the topmost task level) as does CCS RTOS.
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