Show Posts
Pages: [1]
1  Development / Suggestions for the Arduino Project / Re: Does Arduino need a real-time scheduler? on: December 31, 2013, 09:09:26 pm
Happy New Year everyone!

I would like to weigh into the debate on this one... with a resounding YES we need an RTOS, however I recognize that the majority of users will not know how to implement it due to a procedural mindset and thats not a bad thing but for the rest of us, the ability to have tasks running and doing stuff is perfectly natural.

To date the CHibios port looks great, FreeRTOS might have too much over head, but one thing we will need in it from day 0 is a fully working Ethernet Library and all the existing libraries will need to be task/thread safe.

I'm old school, started coding back in 1976 but I also can readily adapt to change when change is good, I do a lot of work in message queuing systems at present and write a lot of C++ code. To me kicking off jobs across 100's of queues so tasks are decoupled and running in various states of parallelism is perfectly logical, but for the majority of programmers they just dont get it... so the RTOS would need to be so well integrated you dont have to think about it. Then when the skill level of the coder rises he/she will start to use tasks and think in terms of lots of stuff happening at once.

I have had a lot of exposure to hardware and software for just about every industry and spent many years doing battle in the embedded space...
I think for the Arduino to jump into the commercial world it needs an RTOS. and it is a commercial product if you look at just how much stuff is available for it... my other bug bear is the mounting holes... if you design an board, please make the holes line up! (Rant over).

Sid
2  Development / Other Software Development / Re: Updated versions of ChibiOS/RT, NilRTOS, and FreeRTOS on: December 31, 2013, 08:40:47 pm
G'day,

Is there likely to be a working Ethernet Library for Chibios by any chance? What would be required to get one working. I think the next evolution for Arduino is multitasking.... it can then find a good commercial footing and an OS like CHibios might be the key as opposed to using FreeRTOS with its overheads...

Sid



I don't recall a post about the Ethernet library. 

Many Arduino libraries are not RTOS friendly but that doesn't mean you can't use them.

Here is an example from the Ethernet library:
Code:
    // Wait for a response packet
    while(iUdp.parsePacket() <= 0)
    {
        if((millis() - startTime) > aTimeout)
            return TIMED_OUT;
        delay(50);
    }

This loop has a delay(50) call that will block lower priority threads.  If the delay were replaced by a chThdSleep(50) call, lower priority threads could use the CPU time.

I think a web server is an ideal candidate for RTOS use.  I would love to have a well designed web server as an example.

I hope to write a "How To" for making minimal changes to libraries that will improve their performance with an RTOS.
3  Products / Arduino Due / Ethernet support for Due on: June 21, 2013, 08:32:34 am
Do the standard ethernet shields work on the Due or is there a voltage issue to deal with.

Sid
4  Development / Other Software Development / Re: ChibiOS port will not compile on v1.0.4 - now working? on: May 04, 2013, 04:31:48 am
OK - so I am puzzled, I loaded up again and now it works fine? no change to library but I did go into the preferences and turned everything on and no compiler errors????

I'll see how it goes.

Thanks

Sid
5  Development / Other Software Development / Re: ChibiOS port will not compile on v1.0.4 on: May 03, 2013, 11:53:41 pm

Thanks for the reply! I downloaded chibiOS20130208.zip as well as NiRTOS20130201.zip and the FreeRTOS20130208.zip files at the same time so I could try all three. The v1.04 and v1.5.2 installs are fresh default installs. I followed the manual and place the file in the libraries folder and went from there.

is it possible the older codebase was released with a new file name?

Sid
6  Development / Other Software Development / Re: ChibiOS port will not compile on v1.0.4 on: May 03, 2013, 12:51:41 am
Further to my last post... I tested this on v1.5.2 and get the same errors

c:/projects/arduino-1.5.2/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr5\libc.a(malloc.o): In function `malloc':
(.text+0x0): multiple definition of `malloc'
C:\Users\SIDNEY~1.WEB\AppData\Local\Temp\build5525742243320212875.tmp/core.a(malloc.c.o):C:\Projects\arduino-1.5.2\hardware\arduino\avr\cores\arduino/malloc.c:82: first defined here
c:/projects/arduino-1.5.2/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr5\libc.a(malloc.o): In function `free':
(.text+0x154): multiple definition of `free'
C:\Users\SIDNEY~1.WEB\AppData\Local\Temp\build5525742243320212875.tmp/core.a(malloc.c.o):C:\Projects\arduino-1.5.2\hardware\arduino\avr\cores\arduino/malloc.c:194: first defined here

7  Development / Other Software Development / ChibiOS port will not compile on v1.0.4 on: May 03, 2013, 12:35:52 am
I downloaded the ChibiOS port and attempted to compile the AVR blink example and I get the following error:

c:/projects/arduino-1.0.4/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr5\libc.a(malloc.o): In function `malloc':
(.text+0x0): multiple definition of `malloc'
core.a(malloc.c.o):C:\Projects\arduino-1.0.4\hardware\arduino\cores\arduino/malloc.c:82: first defined here
c:/projects/arduino-1.0.4/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr5\libc.a(malloc.o): In function `free':
(.text+0x154): multiple definition of `free'
core.a(malloc.c.o):C:\Projects\arduino-1.0.4\hardware\arduino\cores\arduino/malloc.c:194: first defined here

I reread the README and I'm positive Ive put the Chibios_AVR in the libraries folder, and selected the correct board.

Other sketches compile and load fine.

Any pointers?


Sid
8  Products / Arduino Due / Re: Porting FreeRTOS from Atmel Studio to Arduino Due on: April 29, 2013, 06:20:22 am


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
9  Using Arduino / Networking, Protocols, and Devices / Re: UDP receiving packets inside TImer Routine on: August 28, 2012, 06:23:20 pm
More info....
  • IDE is v1.0
  • board is standard Duemilanova
  • code is NTP demo code which works fine outside of timer routine
  • Timer library is MSTimer2 from Aduino web site
  • Enternet board is off the shelf Wiznet with NO SD fitted
Update:

I left the code running overnight with the UDP code commented out and a 1second timer tick, lots of serial debugging, code is ticking over every second. To reduce SRAM usage comments are using the Serial.println(F("comment")); so I cant see a RAM issue. Timer code works with no perceived issues.

NTP code works fine outside of timer routine as per NTP example, but I'm trying to schedule stuff to do based on fixed time quantums so running full speed in a loop is not ideal for the task at hand, I might change the logic to use the timer solely as a counter and then simple state logic to send UDP requests and monitor receives outside of the timer ISR and inside loop().

Any thoughts on issues that might arise are welcome, I'll Keep you updated.

10  Using Arduino / Networking, Protocols, and Devices / UDP receiving packets inside TImer Routine on: August 27, 2012, 11:37:38 pm
G'Day all,

I am trying to use a 10second timer routine to issue an NTP request and then check 10seconds later for a received packet and process it.

I want to sned the request and check in the same timer routine which I will expand out later. If the packet has been received I then flag for a resend on the next timer function call.

However the code hangs after the first tx of the NTP packet! Does UDP calls work inside a simple timer routine?

Sid
Pages: [1]