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

OSA - RTOS for PIC controllers
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    CCS Forum Index -> Code Library
View previous topic :: View next topic  
Author Message
tester



Joined: 29 Jun 2009
Posts: 40
Location: Russia, SPb

View user's profile Send private message Visit poster's website

Re: dear tester it is working fine in V4.023
PostPosted: Tue Aug 18, 2009 9:09 am     Reply with quote

mutthunaveen wrote:
it is working fine in V4.023
Excellent! Smile

mutthunaveen wrote:
Can you give me a study guide to add the functions into RTOS ?
What do you mean?
mutthunaveen



Joined: 08 Apr 2009
Posts: 100
Location: Chennai, India

View user's profile Send private message

thnaks
PostPosted: Wed Aug 19, 2009 2:27 am     Reply with quote

actually for programming in CCS we know C commands to write a program

but to write in the RTOS in ccs i have to know how to configure the tasks and run them..... some more simple and difficult example programs.................

Very Happy i studied the example program but i need some more example programs Smile
tester



Joined: 29 Jun 2009
Posts: 40
Location: Russia, SPb

View user's profile Send private message Visit poster's website

Re: thanks
PostPosted: Wed Aug 19, 2009 3:41 am     Reply with quote

Quote:

actually for programming in CCS we know C commands to write a program

but to write in the RTOS in ccs i have to know how to configure the tasks and run them..... some more simple and difficult example programs.................


Well, this is most often mistake: thinking that RTOS is like an another language, most high-level than C. Many beginners think like this, so they even try to do not use C-constructions (like while, for, ect.) But OSA is not an another language. OSA is a library, that allows to simplify writing programs.

Configuring and running tasks: see manual on Task States and Task Services

You configure a task when you create it:
- you set the task's priority;
- you make the task ready.

Task is configured now. Or did you mean something else?



There is a tutorial on OSA, but only in russian (I haven't time to translate it in english). You can try to translate it from russian even in an interactive translator:

OSA basics
Simple task switching
Using local variables
Delays in tasks
Synchronizing tasks with binare semaphores

Simple examples are in folder "osa\tutor" (these examples are described in tutorial).

More difficult examples with source code you can find here (they written under HTPICC):
In english:
Dinamic lights on PIC10
4-channels music box on PIC16
8-channels polyphonic piano on PIC16 (video)
VGA video game on PIC18 (video)

In russian:
Running lights on PIC16("osa\example")
VGA video game on PIC18 (video)
mutthunaveen



Joined: 08 Apr 2009
Posts: 100
Location: Chennai, India

View user's profile Send private message

thnaks brother
PostPosted: Wed Aug 19, 2009 6:00 am     Reply with quote

I will try at my home and i will update to you soon.

My suggestion is to create in the same site where you posted the RTOS..... for different compilers so that many can go through them............ it will be good for beginners like me. Cool

I will update you soon brother.
tester



Joined: 29 Jun 2009
Posts: 40
Location: Russia, SPb

View user's profile Send private message Visit poster's website

Re: OSA - RTOS for PIC controllers
PostPosted: Tue Sep 29, 2009 8:45 am     Reply with quote

Bug fixed: waiting services with timeout checking did not check a timeout.

Download file http://www.pic24.ru/lib/exe/fetch.php/osa/history/osa_ccs.rar and unpack it into "osa\port" folder.
tester



Joined: 29 Jun 2009
Posts: 40
Location: Russia, SPb

View user's profile Send private message Visit poster's website

Re: OSA - RTOS for PIC controllers
PostPosted: Thu Oct 15, 2009 10:39 am     Reply with quote

Holger wrote:
Hello,

What is the advantage to use OSA instead of the built-in in RTOS from CCS?

thanx Holger


Actually, I did not work with CCS RTOS, so I can't compare these OSes rather competently. But in two word:

Advantages:
1. OSA requires less RAM and ROM.
2. In OSA task may have a priority. When there are several ready to work tasks, scheduler gives control to most priority task.
3. OSA have more services and system objects. The are:
- Binary semaphores
- Counting semaphores (present in CCS RTOS)
- Simple byte messages (present in CCS RTOS)
- Pointers to messages
- Queues of simple messages (present in CCS RTOS)
- Queues of message pointers
- User timers
- Flags
- Critical sections
4. In OSA task can wait an event with timeout breaking
5. OSA doesn't need any PIC's peripherals for itself purposes (CCS RTOS needs a timer)
6. OSA is rather well documented. (As I think Smile )

Disadvantages:
1. OSA doesn't support 12-bit and 16-bit controller under CCS compiler.
2. Firstly OSA was adapted for HTPICC compilers, so several solutions for CCS compiler are not optimal.
3. Too little people works with OSA, so I haven't enough bug reports to improve it (or to fix bugs if they are present)

(I did not test speed characteristics because these two OSes are rather different.)

I think you should try both RTOSes to choose your favorite.

Last version.
Documentation.

Good luck!
mickey231bhq



Joined: 06 Apr 2005
Posts: 19
Location: Formosa

View user's profile Send private message

PostPosted: Mon Jan 04, 2010 3:34 pm     Reply with quote

Hello tester
I am currently using CCS 4.104 version, OSA RTOS can not seem to work properly on this version.

In the osa_ccs18.c:
_OS_SET_FSR_CUR_TASK ();
_OS_SET_FSR_CUR_TASK_W (OS_CODE_POINTER_SIZE);
_OS_CurTask-> Timer = Delay;

ERROR: Previous identifier must be a pointer

In the osa.c:
if (! Task-> State.bEnable)
Task-> pTaskPointer = TaskAddr;
Task-> Timer = 0;
* ((OS_TASKS_BANK char *) & Task-> State) = priority;

ERROR: Previous identifier must be a pointer

other:
OS_Run ();

ERROR: Previous identifier must be a pointer

Able to solve the problem?
tester



Joined: 29 Jun 2009
Posts: 40
Location: Russia, SPb

View user's profile Send private message Visit poster's website

PostPosted: Tue Jan 05, 2010 2:16 am     Reply with quote

mickey231bhq wrote:
Hello tester
I am currently using CCS 4.104 version, OSA RTOS can not seem to work properly on this version.
...
Able to solve the problem?

Hello, Mickey! Thank's for the report, I'll try check it as soon as possible (within a couple of days) and give you a solution.
tester



Joined: 29 Jun 2009
Posts: 40
Location: Russia, SPb

View user's profile Send private message Visit poster's website

PostPosted: Tue Jan 05, 2010 11:03 am     Reply with quote

mickey231bhq wrote:
Able to solve the problem?


Hello again!

Just now I have installed demo version 4.102 (there is no 4.104 demo). It supports PIC18F458 only. The example from OSA\EXAMPLES\CCS\lights_cc18.mcp was compiled with no errors (I only changed chip include file to "#include <18F458.h>" at the begin of file).

What OSA version do you use?
What chip?
Did you create you project correctly?
If you did, then please describe a problem more detailed (show me a texts of program, content of osacfg.h file).
mickey231bhq



Joined: 06 Apr 2005
Posts: 19
Location: Formosa

View user's profile Send private message

PostPosted: Tue Jan 05, 2010 12:41 pm     Reply with quote

I use the example of you, lights_ccs18 project files, the same problem.
osa version: osa_91219.zip
ccs version: v4.104
chip: pic18f258


Are as follows:
Code:
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\PICC\Ccsc.exe" +FH "lights_ccs18.c" I+="C:\osa\example\ccs;c:\osa"  +DF +LN +T +A +M +Z +Y=9 +EA
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 86(27,28): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 109(49,50): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 212(49,50): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 419(27,28): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 428(28,33): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 432(31,32): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 673(31,32): Previous identifier must be a pointer
*** Error 66 "c:\osa\osa.c" Line 1076(24,29): Previous identifier must be a pointer
*** Error 66 "c:\osa\osa.c" Line 1081(36,48): Previous identifier must be a pointer
*** Error 66 "c:\osa\osa.c" Line 1085(33,38): Previous identifier must be a pointer
*** Error 66 "c:\osa\osa.c" Line 1092(47,52): Previous identifier must be a pointer
*** Error 66 "lights_ccs18.c" Line 182(13,14): Previous identifier must be a pointer
*** Error 66 "lights_ccs18.c" Line 182(13,14): Previous identifier must be a pointer     
13 Errors,  0 Warnings.
Halting build on first failure as requested.
BUILD FAILED: Wed Jan 06 02:16:29 2010


Last edited by mickey231bhq on Wed Jan 06, 2010 12:23 am; edited 1 time in total
future



Joined: 14 May 2004
Posts: 330

View user's profile Send private message

PostPosted: Tue Jan 05, 2010 4:58 pm     Reply with quote

compiler version?
tester



Joined: 29 Jun 2009
Posts: 40
Location: Russia, SPb

View user's profile Send private message Visit poster's website

PostPosted: Wed Jan 06, 2010 5:29 am     Reply with quote

mickey231bhq wrote:
I use the example of you, lights_ccs18 project files, the same problem.
osa version: osa_91219.zip
ccs version: v4.104
chip: pic18f258

Are as follows:
Code:
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\PICC\Ccsc.exe" +FH "lights_ccs18.c" I+="C:\osa\example\ccs;c:\osa"  +DF +LN +T +A +M +Z +Y=9 +EA
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 86(27,28): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 109(49,50): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 212(49,50): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 419(27,28): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 428(28,33): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 432(31,32): Previous identifier must be a pointer
*** Error 66 "c:\osa\port\osa_ccs18.c" Line 673(31,32): Previous identifier must be a pointer
*** Error 66 "c:\osa\osa.c" Line 1076(24,29): Previous identifier must be a pointer
*** Error 66 "c:\osa\osa.c" Line 1081(36,48): Previous identifier must be a pointer
*** Error 66 "c:\osa\osa.c" Line 1085(33,38): Previous identifier must be a pointer
*** Error 66 "c:\osa\osa.c" Line 1092(47,52): Previous identifier must be a pointer
*** Error 66 "lights_ccs18.c" Line 182(13,14): Previous identifier must be a pointer
*** Error 66 "lights_ccs18.c" Line 182(13,14): Previous identifier must be a pointer     
13 Errors,  0 Warnings.
Halting build on first failure as requested.
BUILD FAILED: Wed Jan 06 02:16:29 2010


Unfortunately, I can't check it at v4.104. But all pointed by the compiler lines are written by all C-rules, they contain no errors. Are you sure you did not modify OSA sources? Compiler gives errors on access to _OS_CurTask variable. It should be defined in osa.c:
Code:

        OST_TASK_POINTER    NEAR    _OS_CurTask         __osa30_near;   // Pointer to current task

Where type OST_TASK_POINTER is defined as:
Code:

typedef OS_TASKS_BANK OST_TCB *     OST_TASK_POINTER;

in osa.h file. Thus variable _OS_CurTask is defined as a pointer.
(definitions NEAR, __osa30_near, OS_TASK_BANK are empty for CCS compiler)

Try to download OSA again, or try some previous versions.
tester



Joined: 29 Jun 2009
Posts: 40
Location: Russia, SPb

View user's profile Send private message Visit poster's website

PostPosted: Wed Jan 06, 2010 6:12 am     Reply with quote

My friend just now checked OSA with new 4.104 version and he confirmed these errors. OSA really does not compile under 4.104. I will work on this problem and try to solve it as soon as possible.

Thank's for bug report again.
tester



Joined: 29 Jun 2009
Posts: 40
Location: Russia, SPb

View user's profile Send private message Visit poster's website

PostPosted: Wed Jan 06, 2010 1:55 pm     Reply with quote

Check here: http://www.ccsinfo.com/forum/viewtopic.php?t=41180
DerWolf



Joined: 30 Jan 2010
Posts: 8

View user's profile Send private message

Bug Fixed?
PostPosted: Sat Jan 30, 2010 1:52 pm     Reply with quote

Hello,

I just wanted to start trying OSA and have read about this problem. Is this bug fixed again, as I just bought the new ccs Compiler?

Thanx
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> Code Library All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 2 of 5

 
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