What is best way to learn RTOS programming

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

I was studying RTOS , due to the lack of knowledge, so I began to wonder if I could port free rtos. No matter how hard it is and whether it can achieve my original intention or not, it pays off a lot if I learn how to develop Free RTOS 

 

I have selected atmel studio and avr 32 bit and I have downloaded free rtos program and I have also visited on free rtos forum and reading manual for free rtos 

 

How to learn free rtos proting by doing practice I can't set small tasks myself How to set tasks to achieve big target ?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

Atmel already have a port of FreeRTOS for AVR32 anyway don't they? It certainly used to be part of ASF (probably ASF3 in fact).

 

BTW if your goal is to "learn RTOS" I would suggest that porting an RTOS is an extraordinary way to go about doing so ! Learning RTOS means learning about the easy things like task creation priority, mutex, semaphores, queues, etc etc. You need to go about 10 levels deeper than this to actually be able to port an entire RTOS which is going to involve learning things like the code generation model and ABI of you compiler, the register banking of your CPU, the interrupt priority handling of your CPU etc etc, Grown men with 30 years experience will wince at the prospect of such a thing! A beginner would have little/no hope.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Quick check on  https://www.freertos.org/RTOS_ports.html shows " AVR32 UC3 " as already existing.

 

So there already is a port of FreeRTOS for AVR32-UC3 just as I thought.

 

In fact for GCC the relevant files are at:

 

https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/10bbbcf0b9bcab1869b3bac3987d32116f351718/portable/GCC/AVR32_UC3

 

For IAR they are at:

 

https://github.com/FreeRTOS/FreeRTOS-Kernel/tree/10bbbcf0b9bcab1869b3bac3987d32116f351718/portable/IAR/AVR32_UC3

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

 

BTW if your goal is to "learn RTOS" I would suggest that porting an RTOS is an extraordinary way to go about doing so ! Learning RTOS means learning about the easy things like task creation priority, mutex, semaphores, queues, etc etc. You need to go about 10 levels deeper than this to actually be able to port an entire RTOS which is going to involve learning things li

Thanks clawson for your excellent  guidelines  When I build a program of free rots on the compiler How do I know which function to call to create task priority 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you studied the FreeRTOS documentation ?

 

FreeRTOS is a very long-established and widely-used RTOS - so there is plenty of material about it available on the interwebs!

 

The obvious place to start would be  https://www.freertos.org/  - look in the 'Resources' and 'Support' sections.

 

Note that virtually nothing that's likely to be sensible on an 8-bit AVR is going to need - or, possibly, even benefit (much) from - an RTOS.

Since by far & away the main focus of this forum is 8-bit AVRs, this really isn't a great place to be talking about RTOSes

 

EDIT

 

In particular, note that there is a Windows-based simulatorhttps://www.freertos.org/FreeRTOS-Windows-Simulator-Emulator-for-Visual-Studio-and-Eclipse-MingW.html

 

That has to be the best place for learning - without all the added hassles, complications, and limitation of an embedded microcontroller target!

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Wed. Apr 1, 2020 - 04:11 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One place to start to learn about rtos is to first understand and learn about task scheduling, there is a tutorial on this site about multi-tasking you may find is easier to understand and impliment on one of the 8 bit AVR's.   Try it! https://www.avrfreaks.net/forum/...

 

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note that the OP is talking about 32-bit chips.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."