Go Down

Topic: DuinOS: Small and Simple OS based on FreeRTOS (Read 6 times) previous topic - next topic

Bima

Hi There,

I am still working on getting the DuinOS working on the mega 2560. I have followed the codes available on:

http://code.google.com/p/duinos/source/detail?r=21

but with no success  :(


for some reason when I tested a simple serial print code, it will print the test when I place it in void setup()

but it does not work when I place it in void loop()

Any one has any idea on how to run duinOS on the 2560..

Thanks,

(Sorry I'm still really new with the duino  :smiley-sweat:)

Thanks for the help beforehand..

Brewal


Bima

I used a simple serial print and blink code

void setup() {

  Serial.begin(9600);
  Serial.println("TEST1");
  pinMode (52, OUTPUT);

}

void loop(){
  digitalWrite (52, HIGH);
  delay(300);
  digitalWrite (52, LOW);
  delay(300);
  Serial.println("TEST2");
}


it will print the serial  TEST1 but no blinking happens and no printing of TEST2

Brewal

#13
May 23, 2011, 10:22 am Last Edit: May 23, 2011, 10:39 am by Brewal Reason: 1
And when you remove the serial tests, it will blink ? If it does, it looks like you are facing my problem of stack size.
Try to create a new task without using loop() (empty but exist) and set a stack size bigger than the default one. I used 200...

Code: [Select]
taskLoop(task1)
{
         digitalWrite (52, HIGH);
         delay(300);
         digitalWrite (52, LOW);
         delay(300);
         Serial.println("TEST2");
}
void setup()
{
       Serial.begin(9600);
       Serial.println("TEST1");
       pinMode (52, OUTPUT);
       createTaskLoopWithStackSize(task1, LOW_PRIORITY, 200);
}
void loop()
{
}

Leonidas

Hey, i just started toying around with DuinOS. And i want to implement it into one of my projects...

I have an atmega328 with the optiboot boot loader (arduino uno) on a breadboard. I have that hooked up to an lcd and some buttons, ultimatley i want to hook it up to an mp3 decoder. I have a whole gui and a couple games built into one of the task loops, the other one is going to take care of talking to an sd card and sending the data to an mp3 decoder... The problem is when i try to load up the gui it doesn't come up.

Nothing happens... i think im getting a stack overflow but i am not sure... is there anyway to detect this? Or am i doing it wrong? I am leaving the loop empty and declaring a task loop that i start in the setup, should i start it with a stack and how big? thanks in advanced for the help.

Go Up