Pages: [1]   Go Down
Author Topic: ArdOS: The Arduino Operating System. Now for the Arduino IDE!  (Read 4313 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

A while back I released the original version of ArdOS that was really meant to be compiled using Atmel Studio 6. Today I am proud to introduce the latest version of ArdOS that was re-written for use within the Arduino IDE. smiley-grin

ArdOS is now available at https://bitbucket.org/ctank/ardos-ide. You can download the ZIP file (includes quick start guide and reference guide) directly from https://bitbucket.org/ctank/ardos-ide/downloads.

The following changes were made:

- 100% support for Arduino libraries. All the features that you love like Serial, attachInterrupt, etc are now accessible in ArdOS.
- You can now bring ArdOS into the Arduino IDE through Sketch->Import Library->Add Library (on Arduino 1.0.5 onwards) or by unzipping the ZIP file into the libraries directory.
- Examples accessible through File->Examples->ArdOS.
- Much better documentation.
- Greatly simplified configuration. By default all components of ArdOS will be compiled in, but you can edit the kernel.h file to exclude components.
- Simplified task creation. Task stacks are automatically created for you.
- Stack sizes for each task can now be set at run-time.
- The number of tasks can now also be set at run-time, albeit only when ArdOS is initialized. However this means no more fiddling with the ArdOS header files to set the number of tasks.
- Now supports boards based on the ATmega168, ATmega328, ATmega1280 and ATmega2560.
- Now supports analog output on all PWM pins.

ArdOS features:

- A compact and configurable kernel.
- Prioritized scheduling for hard real-time tasks.
- Binary and counting semaphores.
- Mutex locks and conditional variables.
- First-in-first out and prioritized message queues.

Do take ArdOS out for a spin and let me know your thoughts!

Best regards,
Colin.
Logged

Chile
Offline Offline
Edison Member
*
Karma: 35
Posts: 1251
Arduino rocks?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds pretty cool, you think I can monitor one analog pin with this while I report in low priority some values thru ethernet? Right now I have to stop the monitoring for few seconds every couple minutes (asking before testing anything, I tried some different similar approaches in the past, but ethernet never worked properly)
Logged

My website: http://ried.cl

Offline Offline
Newbie
*
Karma: 1
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds pretty cool, you think I can monitor one analog pin with this while I report in low priority some values thru ethernet? Right now I have to stop the monitoring for few seconds every couple minutes (asking before testing anything, I tried some different similar approaches in the past, but ethernet never worked properly)

Hi Eried,

Sorry for this late reply. For the moment I don't have Ethernet support, but that's definitely something good to add in once I get an Ethernet shield.

Thanks again for your input!
Colin.
Logged

Türkiye
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I downloaded and tried example.It works properly, I try to figure out codes (what is going on).Then I will try drive multiple (2 or more) servos simultaneosly.
Thanks for sharing
« Last Edit: June 27, 2013, 03:45:17 am by cengav4r » Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks cegav4r! Please do let me know how it turns out.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 117
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ctank - this is excellent and well-timed for me. At the moment, I am playing around (since last night) with NilRTOS (from author of ChibiOS/RT ported by Bill), and after downloading ArdOS and going thru it's quick-start and reference manual, I can see how easy it looks.

Do you have any figures on flash and RAM use of code using ArdOS using various features/combinations ?
Secondly, do you have any plans of supporting ArdOS on some of the ATtiny AVRs like tiny84/85/86x ? They do have some limitations (usually fewer peripherals, pins etc.) but still excellent for ultra low-cost projects.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 74
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello,
in the future do you support ' ATMEGA32U4 ' ?
cordially
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everybody. Thanks for your help and work. Greatly appreciated.

ArdOS mutlitasking is the way to do things but I guess there are limitations or there is something wrong with my code.

Still, I have tried a direct (loop) program and then convert it to a Task. So the logic is first tested, as much as possible, as a single serial program.

The problem is a single task routine that uses the standard OneWire and Dallas library.
Code:

void setup()
{
.
.
sensors.begin();
.
.
.
.
}

void temperature( void *p)
{
Serial.println("Start");

    while (true)
  {
    Serial.println("prereq");
       sensors.requestTemperatures();
       Serial.println("req");
    Serial.println(sensors.getTempCByIndex(0));
    OSSleep(300);
  }
}

As stated, when run in the loop() routine temperature is perfectly printed.

As a task, "prereq" and "req" are printed but not the temperature. The led in the 3p with a DS18B20 turns on when in loop() mode but not as a task. Also using the long OneWire method confirms the DS18B20

Anything i can do/try? Thanks.

Regards.
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 325
Posts: 22498
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@ctank:
I've tried to... try the RTOS but I wasn't able to compile any of the test sketches.
I always get this error:
Code:

/home/leo/sketchbook/libraries/ArdOS/kernel.cpp: In function 'void OSSwap()':
/home/leo/sketchbook/libraries/ArdOS/kernel.cpp:363:20: error: local frame unavailable (naked function?)
/home/leo/sketchbook/libraries/ArdOS/kernel.cpp:363: confused by earlier errors, bailing out
I'm using Arduino IDE 1.0.5 with Atmel toolchain 3.4.2 (not the original one that comes with Arduino). I compile on Linux.

EDIT:
if I use the toolchain provided by the IDE, it compiles correctly. So there's something in your kernel code that isn't compatible with the newer toolchains. You should look at this because, as you should know, the IDE toolchain is too old and has a bug for that it cannot compile working firmwares bigger than 128 kB.
« Last Edit: September 09, 2013, 03:52:52 am by leo72 » Logged


Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 325
Posts: 22498
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems that it doesn't want the inline function OSMakeAtomic.
But if I substitute all the calls to OSMakeAtomic with its code, the IDE compiles the examples but simply they don't work at all.... I am able to get a working example only if I use the old toolchain that comes with the Arduino IDE.
May during the time something in the naked ISR management has changed...
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry all for this horribly late reply! I've been monitoring the ardos-help account for questions but only recently looked at this forum. It's 1 am now but I will reply to all of you tomorrow.

Sorry again for his late response!

Colin.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for letting me know that ArdOS does not compile on the newer toolchains. It's probably because several of the functions are declared to be naked (to guarantee stack correctness). I'll need to look into this.

As for Serial shenanigans, try inserting a delay between calls to Serial.println. I'm having some issues with getting the ArdOS to play nice with Serial. ArdOS seems to sometimes cause the serial buffers to overrun. At the moment short of moderating traffic to the Serial libraries, I don't yet have a way to solve this problem.

Colin.
Logged

Pages: [1]   Go Up
Jump to: