Free rtos project including many source file

Thread Starter

rt694157

Joined Dec 15, 2019
78
Hi

I am new boy here Is there any RTOS programmer who can help. I have read it about free rtos porting on many links as well as I have looked so many sample codes But i don't understand anything

let's take one example of free rtos

Free RTOS Project contain following source file
Task.c
List.c
Queue.c
Main.c

I do not know what is inside these files My understanding Let say Task file contains 100 tasks We would arrange all 100 tasks in a list. We would arrange all 100 tasks in a queue.
 

Papabravo

Joined Feb 24, 2006
21,094
Hi

I am new boy here Is there any RTOS programmer who can help. I have read it about free rtos porting on many links as well as I have looked so many sample codes But i don't understand anything

let's take one example of free rtos

Free RTOS Project contain following source file
Task.c
List.c
Queue.c
Main.c

I do not know what is inside these files My understanding Let say Task file contains 100 tasks We would arrange all 100 tasks in a list. We would arrange all 100 tasks in a queue.
No, that is not what is going on. What is going on inside those files are definitions for data structures that are used to define tasks, and queues; and methods to create and manage them. They are text files and you should examine their contents to gain some rudimentary understanding. You should also look for documentation that comes with the free software. It may not be user friendly, but it is worth looking for and at.
 

Thread Starter

rt694157

Joined Dec 15, 2019
78
No, that is not what is going on. What is going on inside those files are definitions for data structures that are used to define tasks, and queues; and methods to create and manage them. They are text files and you should examine their contents to gain some rudimentary understanding. You should also look for documentation that comes with the free software. It may not be user friendly, but it is worth looking for and at.
Thank you Papabravo, For example assume There are the five task and they are running on the priority based. High priority task will be run first.

Rtos project file
Task.c
List.c
Queue.c
Main.c

Can you tell me what is the use of these four files in a rtos project ?

I am not going deep I understand what is the queue list task in simple language I just want to understand what's the use of these file in one rtos project. What is role of these files in rtos.
 

Papabravo

Joined Feb 24, 2006
21,094
Go back to what I said in my first post. Those files do not contain the data and code for specific tasks. What they contain are data definitions and functions that you can use to create the application specific tasks that you need. They are like a software toolbox. A house is not contained in a toolbox, but you can use the tools in the toolbox along with some raw materials to build a house. Do you get the idea?
 

Thread Starter

rt694157

Joined Dec 15, 2019
78
Do you get the idea?
No, I do not get any idea ? I simplify it a little more

A linked list is a simple way to store some unknown number of elements. I can add, remove any number in list

Basically I understand what is list but I don't understand What is the use of List in rtos Project?

Do we use a list to execute a task in a specific order? What is use of list in rtos ?

Do you get my point ?
 

Papabravo

Joined Feb 24, 2006
21,094
No, I do not get any idea ? I simplify it a little more

A linked list is a simple way to store some unknown number of elements. I can add, remove any number in list

Basically I understand what is list but I don't understand What is the use of List in rtos Project?

Do we use a list to execute a task in a specific order? What is use of list in rtos ?

Do you get my point ?
I'm sorry you don't get the point. It seems like you are trying to be difficult on purpose; just as any troll would do.

We use list for tasks in various states. The states might include: RUNNING, READY_TO_RUN, SUSPENDED, and WAITING. When the current task suspends (either voluntarily or not) it is placed on the end of list of suspended tasks. The next task which is on the ready to run list is given the CPU and deleted from the ready to run list. This method of learning is going to take a lone time. Forums are just not the appropriate place. I recommend one of a large number of suitable texts.

Jean J. Labrosse has several texts that are very accessible on this subject.
https://www.amazon.com/MicroC-OS-II...ywords=Labrosse&qid=1576448654&s=books&sr=1-4
or the more recent
https://www.amazon.com/uC-OS-III-Re...ywords=Labrosse&qid=1576448695&s=books&sr=1-3
 
Last edited:

Thread Starter

rt694157

Joined Dec 15, 2019
78
We use list for tasks in various states. The states might include: RUNNING, READY_TO_RUN, SUSPENDED, and WAITING. When the current task suspends (either voluntarily or not) it is placed on the end of list of suspended tasks. The next task which is on the ready to run list is given the CPU and deleted from the ready to run list. This method of learning is going to take a lone time.
This is answer of my question for list. thank you so much for clarification

queue is an abstract data type that generalizes a queue, for which elements can be added to or removed from either the front (head) or back (tail).

My last question What is the use of queue in rtos Project?
 

Papabravo

Joined Feb 24, 2006
21,094
Queues are used to sort tasks into priority groups, and they are used for scheduling events. Let us say that we have 5 events. they are placed on a queue in the order in which they are to occur. This also implies that item may be inserted in the middle of a queue or the queue may be reordered or sorted. At each tick of the clock, the counter on the task at the top of the event is decremented and the event gets "signaled" when the counter gets to 0. When this event is removed, the next item on the list will have its counter set to the number of ticks to elapse until it is ready to signal.
 
Top