RTOS/multitasking support

Post your requests and ideas on the future development of mikroPascal.
Post Reply
Author
Message
LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

RTOS/multitasking support

#1 Post by LGR » 14 Jan 2005 17:40

Some rudimentary basic RTOS executive built into the system would be useful in some situations. I came across a free (GNU) 18F RTOS written in C here http://www.freertos.org/, which may be able to form the basis for a multitasking executive. I haven't evaluated it, I just noticed it. Some of the BASICs for PIC18 have cooperative multitasking, which would probably be adequate. :roll:

I hope that the languages for the dsPIC will eventually (someday) have rigorous multitasking support. :P

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

#2 Post by jpc » 22 Jan 2006 17:09

Bonjour LGR ,

i did take a look at this freertos , gave some thought and now would like to know what we realy would like to have. This FreeRtos seems to me a ( hardly donscaled) implementation , creating substantial overhead in you want preemptive taskswitching. Cooperative already is less demanding but switching tasks always takes time , the bigger the context , the more time ( and RAM !) needed. Cooperative switching has a few advantages : you know that you switch task not in the middle of something delicate ( e.g. halfway complex math ) Therefore saving/restoring of the context will be easyer/faster. It also is a good answer to the problem of reentrancy because it no longer exists. Communication between tasks is straightforward because there is no risk of accessing incomplete messages.In many applications there are many processorcycles to be found in delay's , the first free power is using those cycles instead of wating them. Then it is essential to know how many cycles are needed for all sub's as this determines the task-switching latency. Sub's taking to much time should possibly be rewritten in such a way that they allow taskswitches inside . A good candidate might be the delay's-unit. Whe might have to distinguish between critical and non-critical delay's. Anyway , critical-delay's ( those that should be precise ) are always at risk of lasting longer as interrupt-cycles add to software-delays.
If we are looking for almost independant tasks running in parallel we might be interested in using som stack if PIC's , providing equal power to each task . All we would need is some elegant commprotocol to network them. This approach i have in mind for a multi-axis servocontroller.

JPC

joseLB
Posts: 444
Joined: 02 Apr 2006 05:56
Location: Riode Janeiro, Brasil

RTOS - MicroChip & Concurrent Pascal

#3 Post by joseLB » 27 Apr 2006 15:32

At http://www.microchip.com/stellent/idcpl ... lterID=388
there are 2 RTOS solutions presented. The second one could be a basis for a RTOS from mikroeletronika, soemthing like one include file at the begining of the pascal program, and some sort of declaration of the concurrent modules (procedures), like in concurrent pascal, semaphores, monitors, etc.

The second RTOS PDF with source code for PIC: http://ww1.microchip.com/downloads/en/A ... 00585b.pdf

A long time ago I heard about "concurrent Pascal", Per Brinch Hansen, IEEE Trans Soft Eng 1(2):199-207 (Jun 1975)]. That can be found at google -> concurrent Pascal
That could not be the basis for mikroeletronica's rtos? that would do a lot of uniqueness. embebed in the pascal language....

UofM-EShop
Posts: 6
Joined: 15 Nov 2006 16:54

#4 Post by UofM-EShop » 07 Dec 2006 20:01

Multi-Task Developmentsystem for Atmel's AVR© RISC CPU's 90S2313..mega256

"
Processes and Tasks :
Pascal-scm includes a multitasking system, which is supported by an amount of functions and procedures. Up to 15 processes and tasks can be defined, which are periodically invoced by the scheduler, dependent on their priority and status. Jobs can be done in background without intervention of the main program. The processes can communicate via
pipes and semaphores.
"

http://www.elab-pascal.de/AVRco/index_en.html

GVHecke
Posts: 77
Joined: 28 May 2005 09:42
Location: Belgium

#5 Post by GVHecke » 06 Jan 2007 09:48

I agree that mutitasking would be a very nice thing to have, it would really help some more complex developments.

In my 8051 (8751 days I already had multitasking with TinyOS), so it is not new and alreadyexists for this scale of controllers and I would really like to see it in ME development environments as well.

Already I have some experience with FreeRTOS (on an hilips ARM7). So something like this would be good for the developers and ME as well. Because if you will start ARM development (which they are making a development board for), you will need more. Not only will you need a RTOS, but people will also start asking for things like embedded webserver, e-mail, ftp, protocol stacks (like Modbus ASCII, RTU, Ethernet, CANOpen, ...), ...

I think for PIC's mutitasking would be great!!!!!!

For the ARM7, people will need more.

And I hope ME will start soon a development board for ARM9 as well (preferrably Atmel), where we would be able to use embedded web servers, ftp, ... as well.

But for sure Multitaskiung becomes more and more important, aslo for PICs.

LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

#6 Post by LGR » 06 Jan 2007 16:54

I started this thread two years ago, before I became aware of the PIC24. At this point, it seems to me that a reasonable and realistic goal may be to provide some sort of exectutive for the PIC24/dsPIC, and not bother with the PIC. If you have an application that's complicated enough to require a multitasking executive, it's probably not unreasonable to limit that to the PIC24 family.
If you know what you're doing, you're not learning anything.

sstronaldo
Posts: 12
Joined: 08 Dec 2005 22:07

#7 Post by sstronaldo » 07 Jan 2007 15:57

Fiz um programa/kernel para MultiTarefa-preemtivo, vejam no tópico abaixo, para baixar o programa use "click direito/salvar destino como", desculpem, mas sou péssimo em ingles, por isso estou escrevendo em portugues mesmo.

http://www.mikroe.com/forum/viewtopic.php?p=44160#44160

A propósito, não entendi muito bem o objetivo deste tópico, seria criar uma THREAD do mesmo jeito que se cria no Delphi?

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#8 Post by zristic » 08 Jan 2007 08:59

Once we finish pointers to procedures in mP you will have RTOS on the plate.
As for ARM we have HW support for Philips ARM 7, SW support is still in plans, not started yet.

Donald Shimoda
Posts: 553
Joined: 27 Feb 2006 17:00
Location: Argentina
Contact:

#9 Post by Donald Shimoda » 08 Jan 2007 13:26

zristic wrote:Once we finish pointers to procedures in mP you will have RTOS on the plate.
As for ARM we have HW support for Philips ARM 7, SW support is still in plans, not started yet.
When do you plan that? Estimated date? When will be the enxt MP version available?

TIA
Donald Shimoda.

joseLB
Posts: 444
Joined: 02 Apr 2006 05:56
Location: Riode Janeiro, Brasil

#10 Post by joseLB » 08 Jan 2007 21:20

sstronaldo wrote:Fiz um programa/kernel...
translating: I did a program/kernel mutitask-preemptive, see the topic. To download, right-click and save as... Sorry, but my english is terrible, so I'm writing in portuguese...
Jose
http://www.mikroe.com/forum/viewtopic.php?p=44160#44160

Donald Shimoda
Posts: 553
Joined: 27 Feb 2006 17:00
Location: Argentina
Contact:

#11 Post by Donald Shimoda » 08 Jan 2007 21:26

joseLB wrote:
sstronaldo wrote:Fiz um programa/kernel...
translating: I did a program/kernel mutitask-preemptive, see the topic. To download, right-click and save as... Sorry, but my english is terrible, so I'm writing in portuguese...
Jose
http://www.mikroe.com/forum/viewtopic.php?p=44160#44160
The downloaded file as invalid, can please recheck that?

TIA
Donald Shimoda.

joseLB
Posts: 444
Joined: 02 Apr 2006 05:56
Location: Riode Janeiro, Brasil

#12 Post by joseLB » 08 Jan 2007 23:42

The downloaded file as invalid, can please recheck that?
the link: (it just works IF you click with the right button and selec "save as" or "salvar como"
http://planeta.terra.com.br/compras/sst ... Tarefa.zip

Donald Shimoda
Posts: 553
Joined: 27 Feb 2006 17:00
Location: Argentina
Contact:

#13 Post by Donald Shimoda » 09 Jan 2007 00:06

joseLB wrote:
The downloaded file as invalid, can please recheck that?
the link: (it just works IF you click with the right button and selec "save as" or "salvar como"
http://planeta.terra.com.br/compras/sst ... Tarefa.zip
Is working now, thanks a lot.
Donald Shimoda.

sstronaldo
Posts: 12
Joined: 08 Dec 2005 22:07

#14 Post by sstronaldo » 09 Jan 2007 00:20

New link page for download.

http://paginas.terra.com.br/compras/sstinformatica

Ronaldo.

Post Reply

Return to “mikroPascal Wish List”