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
Filter by
Sorted by
Tagged with
27 votes
3 answers
27k views

Which variable types/sizes are atomic on STM32 microcontrollers?

Here are the data types on STM32 microcontrollers: http://www.keil.com/support/man/docs/armcc/armcc_chr1359125009502.htm. These microcontrollers use 32-bit ARM core processors. Which data types have ...
Gabriel Staples's user avatar
26 votes
8 answers
14k views

Small libc for embedded systems [closed]

I am looking for a small libc for embedded use with freertos on a ARM7 microcontroller. I have looked at newlib, but it is a bit too complex for my needs. Newlib calls malloc() in a number of ...
GT.'s user avatar
  • 901
22 votes
2 answers
7k views

what is v and x means in freeRTOS task creating or used in it?

what does mean x and v in task creating or managing of free RTOS? xTaskcreate or vTaskcreate?
shadab's user avatar
  • 411
20 votes
4 answers
8k views

Strategy for feeding a watchdog in a multitask environment

Having moved some embedded code to FreeRTOS, I'm left with an interesting dilemma about the watchdog. The watchdog timer is a must for our application. Using FreeRTOS has been a huge boon for us too. ...
Travis Griggs's user avatar
16 votes
3 answers
12k views

FreeRTOS Task should not return - ESP32

I'm using multi-threading on my ESP32. I have created two tasks and pinned them to core 1. With one of them, I get the following error: E (20426) FreeRTOS: FreeRTOS Task "MeasurementTask" ...
Lithimlin's user avatar
  • 561
16 votes
3 answers
2k views

Is self increment in C thread safe?

I found some code in FreeRTOS (FreeRTOSV7.4.0\FreeRTOS\Source\tasks.c): void vTaskSuspendAll( void ) { /* A critical section is not required as the variable is of type portBASE_TYPE. */ ++...
user1603164's user avatar
15 votes
2 answers
5k views

SQLite VFS implementation guide lines with FOpen*

I am about to implement a custom VFS (virtual file system) for a Netburner embedded device (non windows) using FOpen, FRead, FWrite, FSeek, and FClose. I was surprised that i could not find a FOpen* ...
Steven Smethurst's user avatar
14 votes
5 answers
41k views

FreeRTOS: osDelay vs HAL_delay

While creating FreeRTOS application project with STM32CubeMx, there are two ways you can use to introduce delay, namely osDelay and HAL_Delay. What's the difference among them and which one should ...
ARK4579's user avatar
  • 673
14 votes
4 answers
6k views

GCC alias to function outside of translation unit -AKA- is this even the right tool for the job?

I'm working with FreeRTOS on an STM32 (Cortex-M3), and using the CMSIS library from ST to bootstrap everything. The CMSIS library defines the weak symbol SVC_Handler in the startup ".s" file. It ...
Brian McFarland's user avatar
13 votes
1 answer
8k views

zeromq on embedded cortexM3 platform

Does anyone have already implemented zeroMQ as reliable message solution on cortexM3 nodes? I'm trying to understand if it is possible and to have a memory footprint idea of this. I will have freeRTOS ...
user3162481's user avatar
12 votes
3 answers
4k views

C++ exception handler on gnu arm cortex m4 with freertos

Update 2016-12 There is now also a minimal example for this behavior: https://community.nxp.com/message/862676 I'm using a ARM Cortex M4 with freertos using freescales freedom Kinetis IDE (gnu arm ...
Superlokkus's user avatar
  • 4,875
11 votes
4 answers
4k views

Prevent GCC LTO from deleting function

I work with GCC-ARM-Embedded and FreeRTOS. FreeRTOS has the function vTaskSwitchContext() which is used only in some inline assembler code. The problem is: When I use LTO, GCC does not consider the ...
Jan Hieber's user avatar
11 votes
1 answer
15k views

Priority value in FreeRTOS xTaskCreate() method

I can not seem to find what a priority value passed to task creation functions of FreeRTOS mean. If I remember correctly ThreadX uses smaller values for higher priorities i.e task with priority value ...
binW's user avatar
  • 13.4k
11 votes
2 answers
10k views

FreeRTOS: Why to call taskYIELD_FROM_ISR() method within the isrHandler

I try to understand why the user has to call the taskYIELD_FROM_ISR() method and why it isn't automatically called by the RTOS within the xStreamBufferSendFromISR method. My question refers to the ...
PascalS's user avatar
  • 1,045
11 votes
4 answers
6k views

Are there any FreeRTOS interpreted language libraries available?

I work for a company that created firmware for several device using FreeRTOS. Lately our request for new features has surpassed how much work our firmware engineers are capable of, but we can't ...
Great Turtle's user avatar
  • 3,315
11 votes
2 answers
59k views

Issue regarding CMake Error: No source given to target

I am trying to add FreeRtos to a project of mine using cmake and eclipse but I am getting an error. I am running debian 10 and my cmake version is 3.13.4. The files for cmake can be found at this git ...
programmer25's user avatar
10 votes
1 answer
3k views

Purpose of mtCOVERAGE_TEST_MARKER macro in FreeRTOS

can anyone tell me what it the exact purpose of mtCOVERAGE_TEST_MARKER() macro in FreeRTOS sources? By default it expands to nothing. It is obviously used for some coverage test, but I can't really ...
Jędrzej Dudkiewicz's user avatar
8 votes
3 answers
8k views

What is the right RTOS for a humanoid robot? [closed]

We're students developing a mid-size (~ 4.5 feet tall) humanoid robot as a sponsored research project in college. The major tasks that the robot should be able to perform include: moving around (...
Vicky Chijwani's user avatar
8 votes
2 answers
6k views

How RTOS does task switching from interrupt

Suppose there is two task running TASK_A and TASK_B. While TASK_A is running an interrupt occurred and a context switch to TASK_B is needed. While inside ISR, TASK_B should not be directly jumped ...
0xAB1E's user avatar
  • 771
8 votes
1 answer
15k views

What are valid values of `HAL_NVIC_SetPriority()` when using STM32 and FreeRTOS?

After a rather difficult process of learning some things about interrupt priority, I am still a bit stuck trying to understand what values I am allowed to call for HAL_NVIC_SetPriority() on the ...
Gabriel Staples's user avatar
8 votes
1 answer
2k views

SPI transaction terminates early - ESP-IDF

An ESP32 app using ESP-IDF (ESP32 SDK) communicates with two SPI slaves on the same SPI bus (ILI9341 TFT driver, NRF24L01+ RF transceiver). Overall, it works great. However, some of the data received ...
Codo's user avatar
  • 77.2k
8 votes
1 answer
2k views

Shared pointers and queues in FreeRTOS

A C++ wapper around a FreeRTOS queue can be simplified into something like this: template<typename T> class Queue<T> { public: bool push(const T& item) { return ...
Per's user avatar
  • 1,084
7 votes
3 answers
20k views

Difference between FreeRTOS and CMSIS-RTX

What is the difference between FreeRTOS and CMSIS-RTOS? Can anyone explain how the two RTOSes are similar or different?
Bilal Qamar's user avatar
7 votes
2 answers
5k views

C++ freeRTOS Task, invalid use of non-static member function

Where is the Problem? void MyClass::task(void *pvParameter){ while(1){ this->update(); } } void MyClass::startTask(){ xTaskCreate(this->task, "Task", 2048, NULL, 5, NULL)...
NerdEngine's user avatar
7 votes
1 answer
5k views

Why Are Vtables Not Being Implemented Correctly On Embedded Platform?

I am developing code for an embedded system (specifically, the PSoC 5, using PSoC Creator), and writing in C++. While I've overcome most hurdles with using C++ , first off compiling in C++ using the ...
gbmhunter's user avatar
  • 1,801
7 votes
2 answers
6k views

Does ISR (Interrupt Service Routine) have a separate stack?

When using an RTOS (ex FreeRTOS), we have separate stack spaces for each thread. So what about ISR (Interrupt Service Routines), does they have a separate stack in the memory? Or is this configurable? ...
Ginu Jacob's user avatar
  • 1,688
7 votes
1 answer
11k views

LwIP - netconn API - Send a TCP packet while the process is blocked?

I am using FreeRTOS + LwIP to develop a Ethernet based bedside nurse call device. After reading some examples and document, I want to use the LwIP's netconn API to send and receive data under TCP, ...
eepty's user avatar
  • 746
7 votes
1 answer
14k views

How to install FreeRTOS on Raspberry Pi?

my goal is to run FreeRTOS from this site on a Raspberry Pi. I have build it using arm-none-eabi-gcc on a Linux machine. Now I have this files/folders: RaspberryPi-FreeRTOS/ ├── build │ ├── Demo │ ...
Alex44's user avatar
  • 3,737
7 votes
1 answer
8k views

FreeRTOS configMINIMAL_STACK_SIZE

In some of the demos for FreeRTOS on cortex M0 MCUs configMINIMAL_STACK_SIZE is set to 60 while on some others it set to 70. Using the STM32Cube software it's set to 128. My question is what is ...
evading's user avatar
  • 3,032
7 votes
1 answer
4k views

acquire a semaphore for the esp32 antenna (bluetooth/wifi dualmode)

I am trying to build a esp32 application, where I have bluetooth and wifi enabled at the same time. Bluetooth is used with the a2dp profile, where the esp is a sink. After receiving the data, it ...
Dimfred's user avatar
  • 192
6 votes
3 answers
12k views

Building FreeRTOS for x86

I read online that it was possible to build FreeRTOS on Windows for an external device. Can you build it for x86 on ubuntu? Thanks
Coder404's user avatar
  • 742
6 votes
2 answers
5k views

Using Java on FreeRTOS?

Can I use Java on FreeRTOS? If so, are there any good URLs to help me get started? What problems can I expect?
Mawg's user avatar
  • 39.3k
6 votes
2 answers
9k views

Running applications from freeRTOS

I am currently in the process of developing the OS for a consumer electronics product my company is developing. I have settled on freeRTOS as the backbone for our OS, and am working diligently to ...
DevenJ's user avatar
  • 125
6 votes
1 answer
5k views

STM32F407 memory layout

I am trying to use Percepio trace lib for FreeRTOS in Snapshot recorder mode. After compilation and running it on my discovery board I need to somehow dump entire RAM to file. I've started ST-LINK ...
user505160's user avatar
  • 1,206
6 votes
1 answer
4k views

freertos vTaskDelete(NULL) no free memory

I am starting to learn FreeRTOS. Just now I am trying to make a print task function with this code: static void vTaskPrint(void *pvParameters) { taskENTER_CRITICAL(); printf("%s", (char *)...
oscargomezf's user avatar
6 votes
1 answer
332 views

Deadlock of powerfail sequence during write to flash page

I'm currently working on an embedded project using an ARM Cortex M3 microcontroller with FreeRTOS as system OS. The code was written by a former colleague and sadly the project has some weird bugs ...
arge's user avatar
  • 635
6 votes
1 answer
1k views

use va_list from another thread

I am working with FreeRTOS (newlib) on a small embedded system and have found that printf and family waste a tremendous amount of stack space. I have many tasks, and I do not have enough ram to make ...
goertzenator's user avatar
  • 2,010
6 votes
1 answer
446 views

freeRTOS scheduling configurations for tasks

I have my freeRTOS currently working on my Microzed board. I am using the Xilinx SDK as the software platform and until now I have been able to create tasks and assign priority. I was just curious ...
Tarik's user avatar
  • 61
6 votes
2 answers
6k views

Running a program written for freeRTOS (RTOS) in virtualmachine as a binary

I got a simple program written for freeRTOS (implements a timer). I want to run this program in an empty virtual machine (VirtualBox, or QEMU, or something else). I need to make a binary file that ...
singa1994's user avatar
  • 777
6 votes
2 answers
4k views

How to retain a stacktrace when Cortex-M3 gone in hardfault?

Using the following setup: Cortex-M3 based µC gcc-arm cross toolchain using C and C++ FreeRtos 7.5.3 Eclipse Luna Segger Jlink with JLinkGDBServer Code Confidence FreeRtos debug plugin Using ...
Joe's user avatar
  • 3,120
6 votes
1 answer
445 views

Tasks behaving incorrectly in round-robin schedule

I have FreeRTOS running on a STM32F4DISCOVERY board, and I have this code: xTaskCreate( vTask1, "Task 1", 200, NULL, 1, NULL ); xTaskCreate( vTask2, "Task 2", 200, NULL, 1, NULL ); ...
0x5C91's user avatar
  • 3,429
6 votes
1 answer
518 views

blackfin bf561 FreeRTOS implementation fail at runtime when loading a task

I've implemented in Blackfin BF561 coreB FreeRTOS from the code: http://www.freertos.org/index.html?http://interactive.freertos.org/forums/79366-analog-devices I converted to bare metal as elf ...
william pagnon's user avatar
6 votes
0 answers
198 views

In GDB Python script, array indexing fails if frame’s language is Ada

I have a script to work out how much free stack space there is in each FreeRTOS task. GDB’s language is set to auto. The script works fine when the current language is c, but fails when the current ...
Simon Wright's user avatar
  • 25.6k
5 votes
1 answer
3k views

Why can't FreeRTOS software timer callback use blocking API

Quoting the documentation (emphasis theirs) Timer callback functions execute in the context of the timer service task. It is therefore essential that timer callback functions never attempt to block....
MightyPork's user avatar
  • 18.7k
5 votes
1 answer
6k views

How to cleanly tell a task to die in FreeRTOS

I'm making a light with an ESP32 and the HomeKit library I chose uses FreeRTOS and esp-idf, which I'm not familiar with. Currently, I have a function that's called whenever the colour of the light ...
Tugzrida's user avatar
  • 501
5 votes
1 answer
3k views

Create task with multiple queues in FreeRTOS?

I'm having trouble sending multiple queues to a task in FreeRTOS. I've tried creating a struct to hold them like this: typedef struct { xQueueHandle buttonQueue; xQueueHandle OLEDQueue; } ...
routeburn's user avatar
  • 1,166
5 votes
2 answers
3k views

Can FreeRTOS taskGetTickCount() not be polled?

I think I either have a) a misunderstanding of the way FreeRTOS taskGetTickCount() function works or b) something not quite right with our port. I have some debugging where I'm showing the output of ...
Travis Griggs's user avatar
5 votes
3 answers
3k views

FreeRTOS Error with High Speed UART Interrupt in PIC24H

I already used FreeRTOS for some embedded projects for some year time and It worked really perfectly until now. Currently i'm facing a difficult problem related to using High Speed Interrupt in ...
Nguyen Hoang Anh's user avatar
5 votes
2 answers
3k views

Many-to-one gatekeeper task synchronization

I'm working on a design that uses a gatekeeper task to access a shared resource. The basic design I have right now is a single queue that the gatekeeper task is receiving from and multiple tasks ...
rjp's user avatar
  • 1,800
5 votes
4 answers
3k views

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 ...
Bratw's user avatar
  • 191

1
2 3 4 5
23