S
S
Sergey Semenov2020-05-14 07:27:08
Microcontrollers
Sergey Semenov, 2020-05-14 07:27:08

FreeRTOS: what are the rules of good form?

Hello! I want to dive into development based on the use of FreeRTOS. There are several "bydlokoderskih" projects in which I used this OS. I want to get closer to the professional level of development using this OS.
Questions:

  1. What are the rules of good manners when working with FreeRTOS?
  2. What are the features of this OS?
  3. Why would you tear off the hands of the developer and why do you bleed from the eyes at the sight of the code (the question should be skipped through the prism of using FreeRTOS)?
  4. Recommend a book/resource that will help me understand these issues.
  5. Share a link (if you know one) to a project in github (or somewhere else), in which, in your opinion, there is a competent use of the OS

Controllers with which I most often work: STM32 (Cortex M3 / M4 / M7) (I don’t know if this info is needed, let it be).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Buliterov, 2020-05-21
@Gerrero

First of all, look at RTOS (any) as a tool for solving your problem. Any tool has a description: Kurnits (quite relevant even now) and off-manual in pdf (in my opinion they give it for free).
Using the OS correctly means understanding:
1) the difference in synchronization primitives (queue, mutex, semaphore) when and where to use them
2) how to set the stack size and task priority
3) what to do in interrupts and what to do in tasks (including how correctly set interrupt priorities)
This is the first thing that came to mind.
Personally, after switching to the OS, I had to rethink my thinking a bit when writing code:
1) you never know when the code in one task will be executed compared to the next task.
2) the execution of a task can be interrupted by other tasks and interrupts
3) if a task writes somewhere and another reads, then they need to be synchronized
, etc.
Good luck!

A
Alexey, 2020-05-18
@Spider55

Read here
There and links to articles and recommendations.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question