Getting started with RTOS for Low End MCU
At my earlier stage, I started with RTOS application, that time I got so much confusion .Because of that time, I was hearing about the lot of RTOS names (Vxworks, FreeRTOS, RTLinux ,Windows Embedded and so on).So I got confusion. Because how I am going to start with, and which one is suitable for my microcontroller. I don’t know clearly.
Finally I got it the Salvo RTOS by thegoogle on the net and also great introduction about RTOS from my teacher Mr.Christy Mano Raj,Assistant Professor at Government College of Engineering, Salem. These RTOSsuitable for 8051 architecture based controller and also other lower end architecture microcontrollers. So I can easy to start my own RTOS application. But depend on the reliability, you can choose other RTOS. But the fundamental of the RTOS is common. So this RTOS very suitable for startup peoples. And another specialty is that, it can support 8051 MCU series and PIC 16F series BSP support. That means, if the guys who have knowledge on 8051 and PIC 16F series, they can able to start RTOS. So we don’t feel about 16 bit or 32 bit architecture controllers.
The following link redirected you to getting details about the list of the micro controllers those are supported by SALVO.
Here I am sharing one of my experience, when I started my RTOS development.
What is meant by RTOS and Kernel?
The operating system (OS) contains the kernel, the timer and the remaining software (called services) to handle tasks and events (e.g. task creation, signaling of an event). One chooses a real-time operating system (RTOS) when certain operations are critical and must be completed correctly and within a certain amount of time. An RTOS-enabled application or program is the end product of combining your tasks, ISRs, data structures, etc, with an RTOS to form single program.
Reference : Salvo User Manual
First of all you have to know the following details (RTOS fundamental tools),
1) Task states
2) Tasks
3) Multitasking
4) Scheduling and types of the scheduling
a) Round robin scheduling
b) Preemtive scheduling
5) Inter task communication tools
a) Message
b) Queues
c) Event flags
6) Deadlock
7) Priority inversion
Here I have added a web link. By the way, you can download the Salvo RTOS user manual.
It contains that full details about RTOS fundamentals (See Chapter 2, Page No:11). These fundamentals are common for the all kind of RTOS. All of them having same characteristics.But the declaration and structure only different .
For example,
The task declaration for Salvo is,
OSCreateTask(TaskA, OSTCBP(1), 10);
But the task declaration for FreeRTOS is,
// Create the task, storing the handle.
xTaskCreate( vTaskCode, "NAME", STACK_SIZE, &ucParameterToPass, tskIDLE_PRIORITY,&xHandle );
The above both statements are given as eligible(Salvo) or ready(FreeRTOS) to the corresponding task.So that kernel is able to running the corresponding task.
Salvo RTOS Task State
FreeRTOS Task State
you can download my code through my github account:
https://github.com/msuresh168
https://github.com/msuresh168
Recently i have attached the following codes,
1.Multitasking for 8051 MCU using Salvo RTOS
2.LEDBlinking_AtMega128 by using FreeRTOS (Same way Multitasking concept)
sooper gee
ReplyDelete