Questions tagged [freertos]

FreeRTOS is a portable, open source, real-time operating systems for microcontrollers. It also has some support for microprocessors with memory protection units.

FreeRTOS is a portable, open source, real-time operating systems for microcontrollers. It also has some support for microprocessors with memory protection units. It is designed to be small and simple and consists of only 5 C files and a small portability layer per each unique controller/compiler.

Features

  • Portable - supports 18 toolchains
  • Supports many of the commonly used CPU/MCU architectures including x86, ARM, AVR, AVR32, PIC (PIC24, PIC32, dsPIC), 8051, Z80, PowerPC and more

See also

1097 questions
3
votes
1 answer

How to check the value of a macro with parenthesis and typecasts during compilation?

I'm running C on an embedded system and I want to make sure that the value of a certain #define is equal to a specific value. If not, I want the compiler to fail and not proceed. My code currently looks like this: typedef uint32_t TickType_t; //I…
3
votes
1 answer

How to boot 2 operating systems in a single QEMU instance?

I try to model a multicore CPU with a service core using QEMU. eg. A 3-core CPU where Linux runs on 2 cores, and an RTOS runs on the 3rd core. The communication should be based on shared memory. Currently I'm able to boot each OS separately.
segfault
  • 489
  • 4
  • 16
3
votes
3 answers

PendSV and SVCall in RTOS

Both PendSV and SVCall are called from the software - SVCall by calling svc instruction, PendSV by setting particural register of Cortex-M. PendSV is intended for context switching and SVCall is intended to access OS kernel functions and device…
Bratw
  • 141
  • 8
3
votes
1 answer

Can't resolve snprintf warning in C

Facing a warning which I am not able to resolve. I am using stm32 MCU and STM32CubeIDE with a standard C11 compiler. I can easily get rid of the warning by increasing size of the array gStr but would like to know what is the issue here. Current size…
EmbeddedManiac
  • 189
  • 1
  • 12
3
votes
0 answers

xQueueReceive blocks the execution of other tasks

I am developing a FreeRTOS application on a Cortex-M4 (NXP i.MX8MM) that creates 4 tasks. The first task is waiting to receive a character on a UART. As soon as a buffer is received, it is sent to task 3 with xQueueSend. The second task is the…
Martin Denion
  • 352
  • 1
  • 3
  • 22
3
votes
0 answers

freeRTOS: question about the behavior of API "vTaskPrioritySet"

In API vTaskPrioritySet: #if ( configUSE_MUTEXES == 1 ) { /* Only change the priority being used if the task is not currently using an inherited priority. */ if(…
lenny
  • 31
  • 2
3
votes
2 answers

FreeRTOS creating a task within a C++ class

I am writing a C++ code to handle my temperature controller. I have decided to learn more object oriented programming and learn more about classes therefore I have chose C++ this time ( I usually code in C ). I have created a simple Controller class…
TheBestPlayer
  • 324
  • 2
  • 13
3
votes
2 answers

How to handle changes to settings during runtime of a embedded c project?

I'm playing around with an esp32 (c with esp-idf, not with arduino) for a hobby project of mine. I'm currently programming a little drone that I can control with my smartphone. All works well. But now I need to create system for persistent settings…
NikLeberg
  • 65
  • 1
  • 5
3
votes
2 answers

FreeRTOS, Eclipse IDE, and Syntax Errors

I have a slight annoyance when dealing with FreeRTOS code in Eclipse and I'm not sure if it's just me or if other people have this issue too but I see a lot of syntax errors highlighted in my code but it compiles/executes fine. The syntax errors…
MSumulong
  • 1,061
  • 2
  • 12
  • 22
3
votes
1 answer

How to route TCP ports/sockets internal to QEMU?

I am attempting to run the FreeRTOS+TCP demo (release 10.1.1): The code is written for the Windows Simulator, but I am attempting to target the Xilinx Zynq, emulated by QEMU (version 4.2.0). The host machine is Ubuntu 16.04. There exists a Network…
thatjames
  • 438
  • 1
  • 5
  • 10
3
votes
2 answers

Creating new task in FreeRTOS for USART reception

I am using EVK1105 development board with AVR Studio 5 as development IDE for my AVR project. I am using FreeRTOS in it. I have 3 USART ports on this board. One external module is connected to my AVR32 board via USART-RS232 mode. It sends me…
Surjya Narayana Padhi
  • 7,741
  • 25
  • 81
  • 130
3
votes
4 answers

Two Task Synchronisation With Mutex In FreeRTOS

I am trying to turn on and off a led using FreeRTOS on STM32 F401RE MCU in IAR Workbench IDE. The led belongs the STM32 nucleo board. There are two task one turn on the Led, the other task turn off the same Led. Here is the code: The main…
Nazim
  • 406
  • 1
  • 6
  • 20
3
votes
2 answers

How to simulate stack overflow on FreeRTOS

I configured CubeMX STM32 to use FreeRTOS stack overflow monitoring. Now I want to test that it in fact works. I tried some simple stuff like executing below function in one of the threads `// C program to demonstrate stack overflow // by creating…
3
votes
2 answers

Embedded device -> std::thread -> FreeRTOS?

so currently i am investigating the possibility in using a pure C++17 Project for an embedded device (Cortex m4). But based on the fact that it is an embedded device we have port and use an RTOS Such as FreeRTOS or uc-OS and i would highly prefer in…
3
votes
1 answer

_Unwind_Backtrace for different context on FreeRTOS

Hello I am trying to implement error handling in FreeRTOS project. The handler is triggered by WatchDog interrupt, prior to WatchDog reset. The idea is to log task name + call stack of the failed task. I have managed to backtrace a call stack but in…
Krasi.Jord
  • 31
  • 1
  • 5