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.
A time sliced, round robin multitasking kernel for the Pic 16-bit family micros.
Supports event flags, semaphores, and messages.
Fast context switching.
Full source code and documentation.
It's a self extracting rar file which will create the correct directory structure.
There is a pdf that details the implementation.
There are example programs that show how to use the functions.
It uses Mplab sim so no hardware is required to try it out.
There are no limits except how much memory you have for stack space.
It supports events, messages and semaphores.
It is time sliced round robin scheduling, not all programs need task priorities.
A simple scheduler is a fast context switcher.
The kernel is small, ~520 Rom ~26 bytes Ram.
No, I wrote it.
But it is fairly straightforward and hopefully, simple to use.
Try out the examples, any questions you have, I will try to answer them.
Everything is going fine but when i run the "example_1.c"
i get the following response:
----------------------------------------------------------------------
Debug build of project `C:\Users\Kamal's\Desktop\from Project room\New folder\PicRtos\Code\Example_1.mcp' started.
Language tool versions: pic30-as.exe v3.25, pic30-gcc.exe v3.25, pic30-ld.exe v3.25, pic30-ar.exe v3.25
Preprocessor symbol `__DEBUG' is defined.
Sun May 29 16:40:01 2011
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\PicRtos\Code\Object\multitask.o".
Clean: Deleted file "C:\Users\Kamal's\Desktop\from Project room\New folder\PicRtos\Code\Example_1.mcs".
Clean: Done.
Executing: "C:\Program Files (x86)\Microchip\mplabc30\v3.25\bin\pic30-gcc.exe" -mcpu=30F6011A -c -I"C:\Microchip\MPLAB C30\support\h" -I"C:\Microchip\MPLAB C30\include" -I"C:\PicRtos\Code\Include" -D__DEBUG "multitask.s" -o"C:\PicRtos\Code\Object\multitask.o" -Wa,-I"C:\Microchip\MPLAB C30\support\inc",--defsym=__DEBUG=1,-g
Executing: "C:\Program Files (x86)\Microchip\mplabc30\v3.25\bin\pic30-gcc.exe" -mcpu=30F6011A -x c -c "Example_1.c" -o"C:\PicRtos\Code\Object\Example_1.o" -I"C:\Microchip\MPLAB C30\support\h" -I"C:\Microchip\MPLAB C30\include" -I"C:\PicRtos\Code\Include" -D__DEBUG -g -Wall
Example_1.c:11:24: error: multitask.h: No such file or directory
Example_1.c:22: error: syntax error before 'UsedStack'
Example_1.c:22: warning: type defaults to 'int' in declaration of 'UsedStack'
Example_1.c:22: warning: data definition has no type or storage class
Example_1.c:36: error: syntax error before 'delay'
Example_1.c:40: error: syntax error before 'var0'
Example_1.c:40: warning: type defaults to 'int' in declaration of 'var0'
Example_1.c:40: warning: data definition has no type or storage class
Example_1.c:41: error: syntax error before 'var1'
Example_1.c:41: warning: type defaults to 'int' in declaration of 'var1'
Example_1.c:41: warning: data definition has no type or storage class
Example_1.c:42: error: syntax error before 'var2'
Example_1.c:42: warning: type defaults to 'int' in declaration of 'var2'
Example_1.c:42: warning: data definition has no type or storage class
Example_1.c:43: error: syntax error before 'var3'
Example_1.c:43: warning: type defaults to 'int' in declaration of 'var3'
Example_1.c:43: warning: data definition has no type or storage class
Example_1.c:44: error: syntax error before 'var4'
Example_1.c:44: warning: type defaults to 'int' in declaration of 'var4'
Example_1.c:44: warning: data definition has no type or storage class
Example_1.c: In function 'main':
Example_1.c:52: warning: implicit declaration of function 'CreateTask'
Example_1.c:59: warning: implicit declaration of function 'TraceStack'
Example_1.c:60: warning: implicit declaration of function 'TraceTask'
Example_1.c:67: warning: implicit declaration of function 'Multitask'
Example_1.c:67: error: 'TMR_PERIOD' undeclared (first use in this function)
Example_1.c:67: error: (Each undeclared identifier is reported only once
Example_1.c:67: error: for each function it appears in.)
Example_1.c:67: error: 'TIME_SLICE' undeclared (first use in this function)
Example_1.c: In function 'task_1':
Example_1.c:89: warning: implicit declaration of function 'TaskSleep'
Example_1.c: At top level:
Example_1.c:129: error: syntax error before 'delay'
Example_1.c: In function 'Delay':
Example_1.c:131: error: 'uint16_t' undeclared (first use in this function)
Example_1.c:131: error: syntax error before 'timer'
Example_1.c:133: error: 'delay' undeclared (first use in this function)
Example_1.c:135: error: 'timer' undeclared (first use in this function)
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\Users\Kamal's\Desktop\from Project room\New folder\PicRtos\Code\Example_1.mcp' failed.
Language tool versions: pic30-as.exe v3.25, pic30-gcc.exe v3.25, pic30-ld.exe v3.25, pic30-ar.exe v3.25
Preprocessor symbol `__DEBUG' is defined.
Sun May 29 16:40:06 2011
----------------------------------------------------------------------
BUILD FAILED
please tell me what's wrong??
P.S: Infact i have just checked, all these examples are having similar errors
lol...i mean thankyou so much, i spent my whole weekend in the lab scratching my head for this idiot job
no doubt, little knowledge is always dangerous
For code size, you could write a test program, compile it and then in mplab use 'View/Memory Usage Gauge', to get the code and ram sizes.
For context switching time, when using mplab sim, use the debugger 'Stopwatch', and place breakpoints just before and after a task switch.
As my Rtos is fairly simple and targeted at the Pic 16-bit micros, I think you will find it is smaller and faster than most others.
region address maximum length (dec)
------ ------- ---------------------
heap 0 0 (0)
stack 0x832 0x17ce (6094)
Maximum dynamic memory (bytes): 0x17ce (6094)
c:\program files (x86)\microchip\mplabc30\v3.30b\bin\bin\..\bin/pic30-coff-ld.exe: Warning: linker script did not specify CRT0_STARTUP file, default for this device: crt0_standard.o
c:\program files (x86)\microchip\mplabc30\v3.30b\bin\bin\..\bin/pic30-coff-ld.exe: Warning: linker script did not specify CRT1_STARTUP file, default for this device: crt1_standard.o
Executing: "C:\Program Files (x86)\Microchip\mplabc30\v3.30b\bin\pic30-bin2hex.exe" "C:\Users\kamal's\Desktop\kamal\Code\Output\Example_1.cof"
Loaded C:\Users\kamal's\Desktop\kamal\Code\Output\Example_1.cof.
----------------------------------------------------------------------
Debug build of project `C:\Users\kamal's\Desktop\kamal\Code\Example_1.mcp' succeeded.
Language tool versions: pic30-as.exe v3.30, pic30-gcc.exe v3.30, pic30-ld.exe v3.30, pic30-ar.exe v3.30
Preprocessor symbol `__DEBUG' is defined.
Mon Aug 15 08:23:23 2011
----------------------------------------------------------------------
BUILD SUCCEEDED
isn't the blue potion already showing the code size? and how could you make this code size appear in this output window???
does it appear automatically or we have to make some settings??
Thank you so much for your time
I love playing with RTOS
and i just got an idea, why not get the context switch time directly from example one, zooming it out and finding the number of instruction cycles used in context switch??
not a bad idea...right???
If you change from DEBUG build to RELEASE build you will find the code and data size smaller and the context switch faster.
With release build, it does not set the I/O line high for the logic analyser and it doesn't save the stack depth.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.