How to run FreeRTOS via Arduino IDE on a Arduino Due Atmel SAM3X8E?

Hey guys, first of all, you rock, this forum has been helping me a lot (I’m a beginner).

However as many beginners, I might have done something stupid. My code on an Arduino Uno needed more stack/processing due to many simultaneous task I needed to run, so I bought the Arduino Due trying to fix it having less limitations as possible.

However, I ended up founding out that all examples of FreeRTOS(and STM32FreeRTOS) via Arduino IDE does not run on my Arduino Due Atmel SAM3X8E, and as far as I’ve read it’s recommended to use Atmel IDE/Studio in order to have an easy integration.

Buut I really would like to stick using Arduino IDE, I code from a MAC and this is just a prototyping, so the help I’d really appreciate to get is:

-> How can I run FreeRTOS on Arduino Due however via Arduino IDE(not Atmel IDE)?
All libraries(freeRTOS or STM32FreeRTOS) seems not to be designed for Due, only for Uno/Mega/Nano…

->What I need? Basically work with FreeRTOS via Arduino IDE, to work with simultaneous
tasks.

->What error am I getting?
From the moment I start adding the FreeRTOS include on my .ino project, I start getting the error: "Error compiling for board Arduino Due (Programming Port)."All other library includes work fine.

Eg: If I include:
#include <Arduino_FreeRTOS.h>

Or:
#include <STM32FreeRTOS.h>

I can’t compile…

Sorry If it’s too basic or not possible to do, I really read loot related topics prior to desperately open this one here.

Hope someone can help.

Tks.

Hi @andredangelo. I took a look at the Arduino Due and it looks like it’s got a Cortex M3 based MCU (SAM3X8E), so it should be able to run just fine since there’s 512 KB of flash. I also found a different thread that @rtel says to that: How to Port the RTOS on the SAM3X8E .

Doing a quick search I found a old port of FreeRTOS 9.0.0 on GitHub for SAM architecture Arduino boards: https://github.com/straccio/Arduino_Due_FreeRTOS

If you want to use the Uno instead, the ported FreeRTOS library (FreeRTOS 10.3!) can be downloaded and compiled easily using the Arduino IDE: https://github.com/feilipu/Arduino_FreeRTOS_Library

Hope that helps and welcome to the community! Let us know what you’re building if you can and any tips for other beginners :slight_smile:

Many thanks @rashed! You rock!

This GitHub might save me here, gonna test it right now.

1 Like

Guys just to update:
I found this another library called DueFreeRTOS in which made everything work =]

Do recommend this one.

1 Like