Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
There are numerous RTOSs available ranging from free open source to commercial products with royalty fees per unit manufactured.
RTOSs basically fall into two main camps, cooperative and preemptive scheduling/multitasking, with each contains several variations and features within these two main classes.
An RTOS is NOT a "one size fits all" situation by any means, the choice of a proper RTOS depends largely on the specific application requirements and its required tasks to be performed.
A embedded programmer should learn both the advantages and disadvantages for each of the basic methods of RTOS implementation and a number of possible features they can offer, this is especially true of a novice programmer.
First a few questions:
What experience do you have designing and programming embedded systems, microcontroller based system, etc?
What specific microcontrollers do you have experience working with in your designs, AVR, PIC, ARM, etc?
What programming languages are you comfortable using while coding, C, assembly, etc?
How much experience have you had with the use of interrupts and their associated Interrupt Service Routines (ISR)?
Before you jump on a particular RTOS's bandwagon, I would strongly suggest learning to write your own basic schedulers and utilize them in a few applications.
Doing so, will help you fully understand some of the underlying principles of RTOS operation and function.
The two best textbooks which thoroughly cover the topic of RTOSs are the following:
Although, PTTES has been out-of-print for sometime, the author, Michael Pont has graciously made it available for free in PDF format and is considered one of the definitive reference texts concerning RTOS design.
David Simon does an excellent job, discussing and demonstrating the use of various RTOS features like, mutexes, semaphores, spinlocks, etc, as well as providing several examples using commercially available RTOSs, uC/OS for example.
Then assuming your are familiar with timers, timer interrupts and their associated ISRs, I would recommend downloading Pont's PTTES text and porting the basic schedulers discussed in the text to the PIC32. Once you've accomplished those tasks, study the purpose of mutexes, semaphores, spinlocks and other features found in most RTOSs, using Simon's text or another resource, and then try to implement them as additional features in the schedulers you've ported to the PIC32.
By then, you'll be ready to try out a full blown RTOS, like uC/OS-II/III or FreeRTOS, however learning the basics beforehand is very important, as these full blown packages can be quite complex and very difficult to debug. Besides, a particular application will often only require a basic scheduler with a few features, rather than those RTOS packages which require a large footprint and consume vital system resources.