Go Down

Topic: Mark3 - New RTOS for AVR, ported to mega328p Arduinos! (Read 13399 times) previous topic - next topic


This sounds to me like big-computer-think.

I just can't get my head around the idea that there could be so much going on in an Atmega 328 with 2k of SRAM.

It's all good.  Like I said, most projects probably don't get that complex.  But don't underestimate what you can do with 2K of RAM!

On one product I worked on, we had to interface with external flash, a 2.4GHz wireless networking transciever, a 120-segment LCD, EL-backlight, several pushbuttons, and various analog sensors, and a precise realtime clock.  At the end of the day, we had all of the drivers and application code fitting under 60K of code space and 2K of RAM. 

Doing that project without an RTOS was a nightmare-- and is what made we jump into the world of kernel development in the first place ;)


Hello Moslevin !

Congratulation for Mark3 ! Many thank's to provide it to public community this appears to be a wonderfull work.
I want try it ! So i download the last from Mark3 website.
I have Put the example you put on this threads forum put it in ardu editor build and send to arduino and this work at first run ! Very good surprise to have an rtos run at first try.
After that i look in source code because you says in Mark3 docu you have put example in source but i don't found example for the arduino. I just see example for arm ??
Could you provide more example for the arduino platform than just for arm ? Or i have bad look in mark3 website ?

About timers  ! wich of the 3 Timers of the arduino do you use ?  I want Mark3 generate a square wave of 30Khz from timer 2 or 3 do you have done function for this ?

Thank's a lot.
Have a nice days.


You may find the example code in the first post of this thread. Copy it to sketch, also copy Mark3 lib into /libraries/Mark3, restart IDE, and do compile. I've got this as a result today (IDE 1.0.6, Mark3 rev 197)):
Code: [Select]
Binary sketch size: 5,212 bytes (of a 32,256 byte maximum)


Hi !

I have ever done this !   ;)  and says in my post.
But i want more example of others funtion of mark3 with arduino.



I downloaded the last version available today of mark 3, I copied the example above at the beginning of this post and when tried to compile with arduino I received the following errors:

mark3_example:6: error: 'Thread' does not name a type
mark3_example:7: error: 'Thread' does not name a type
mark3_example.ino: In function 'int main()':
mark3_example:17: error: 'Kernel' has not been declared
mark3_example:19: error: 'app_thread' was not declared in this scope
mark3_example:20: error: 'idle_thread' was not declared in this scope
mark3_example:25: error: 'Kernel' has not been declared
mark3_example.ino: In function 'void app_func(void*)':
mark3_example:37: error: 'Thread' has not been declared
mark3_example:39: error: 'Thread' has not been declared

Please, could somebody help me?
Thanks in advance.



Please, could somebody help me?
Use something else ?

Why do you need any RTOS on an Arduino ?

Two or three hours spent thinking and reading documentation solves most programming problems.



related to the question:
      Use something else ?
I'm using arduino uno with the arduino IDE only. If the question appoints to another answer, please let me know. I don;t know what I'm doing wrong.

Related to the second question:
     Why do you need any RTOS on an Arduino ?
I'm doing an arduino course for learning only, and I want to make my project with mark 3, because is an opportunity for me to learn about embedded RTOS.

Thanks again.


If the question appoints to another answer, please let me know.
Maybe several things at a time and planning and implementing a program

IMHO the main attraction of an Arduino is that it does NOT have a Operating System. If you want to study operating systems use a RaspberryPi or Beaglebone which have the necessary resources - CPU speed and memory.

Two or three hours spent thinking and reading documentation solves most programming problems.


Hi again

Several things at a time I did and I know how to do it.

The issue challenge is to do something different as project for the course.

I understand that the Mark 3 is ported to mega328p arduino that is the controller found in arduino uno. This is the reason I thought to do something different with the board.

I return to my original question:
Is there any example for mark 3 running in arduino uno using the arduino IDE environment or Mark 3 is not suitable for it?

If there is an example, please could you tell me where to find and how to compile it?

Thanks again for your anwer.


Install Arduino IDE (mine is 1.0.6).

The example is here:

Copy it to a new sketch, for example mark3demo.ino

Download Mark3 rtos library and put it into your arduino libraries, for example /libraries/Mark3

Restart arduino IDE.

Open the sketch and compile/upload it to Uno.

Go Up