Go Down

Topic: Porting FreeRTOS from Atmel Studio to Arduino Due (Read 3049 times) previous topic - next topic

I was wondering if somebody here have tried to port freeRTOS to Arduino Due using Atmel Studio.
I have seen in Atmel Studio that they have an extension called FreeRTOS but I don't know how to use it.
Have anybody else tried it?



I just got freeRTOS running on my Due. I use the version that is included in Atmel Software Framework (in Atmel Studio).

What i have done so far using freeRTOS:
- Create two tasks. One that executes every x ms and one that executes as soon there is something in the queue.
- Create a queue to communicate between tasks.
- Use TWI and USART (no UART yet though, the freeRTOS port does not seem to support that)

A note on using Atmel Studio and the Arduino Due. The TWI implementation in Atmel Studio has a bug that causes it to always return successes when writing just one byte to the slave, even when there is no slave connected to the bus. This is no problem when using the freeRTOS implementation in ASF since it is using the PDC, but instead there is a different problem. The freeRTOS TWI implementation require that an internal address for the slave is used and will return an error message if it is not. Both of these problems are quite easy to fix, and if anyone is interested I will post my solutions.

Is your port able to work on the Mega 2560 and does it have Ethernet Support?

I am working on a port using the Mega and Wiznet 5100 support, have not yet worked out where/how to support the TCP/IP stack in it yet.

Sid Young


My setup would not work on the mega, and it does not have Ethernet support. FreeRTOS does have a TCP/IP library, but it is unfortunately not free.


I ported FreeRTOS to AVR boards, Due, and Teensy 3.0.  The current version is FreeRTOS20130208.zip http://code.google.com/p/rtoslibs/downloads/list.

I ported FreeRTOS as an Arduino library so the Arduino IDE is used.

I will be updating the various RTOS libraries when Arduino 1.05/1.53 is released since yet another fix for malloc will break the AVR versions of the RTOS libraries.

Go Up