EmbeddedRelated.com
Forums

contiiki for LPC

Started by "Ake Hedman, eurosource" March 27, 2006
> Richard:
> Can you mix co-routines and tasks?
> Can you assign co-routines to a specific stack, say have two stacks, both
> hosting a different set of co-routines?

Take a look here: http://www.freertos.org/taskandcr.html, and
here: http://www.freertos.org/croutine.html. I think this covers your
questions.

My worry with adding co-routines was that having too many options would add
to complexity, and one of the aims of FreeRTOS is to be simple. I therefore
tried to keep V4.0.0 backward compatible with V3.x.x - the use of
co-routines being completely optional in an application
(http://www.freertos.org/newforv3.html ignore the v3 in the url).

There is nothing to stop you mixing co-routines and tasks, but co-routines
all run with the same stack, it is not alocatable. You also cannot set a
co-routine to pre-empt a task, only the other way around. Co-routines
basically run in the idle task.

This is the first version with co-routines - if they are popular then the
implementation will be extended to include more features and be more
flexible.

Regards,
Richard.

http://www.FreeRTOS.org
*Now for ARM CORTEX M3!*

Yahoo! Groups Links

An Engineer's Guide to the LPC2100 Series

> I was just typing response when Richard replied. My point was stack
> consumption was the biggest difference. Although I was under the
> incorrect
> assumption you were solely looking at Contiki for an IP stack. Given
> Richards input on co-routine support, I would take a closer look at
> FreeRTOS. There's even an uIP port, so you're nearly halfway there.
>

One other point, you can achieve cleaner event driven code using an RTOS.

Some RTOS's leave FIQ untouched for user independent code, so it can be used
to drop the absolute RTOS priority.

Joel

Yahoo! Groups Links
FreeRTOS Info wrote:

> Minimal configuration kernel build = 3040 bytes.
> Max configuration kernel build = 4060 bytes (all features)

Tha sound very similar to Contiki and very good to me. Can you say
anything about RAM usage?

/Ake
--
---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavagen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 0533 146
Company home: http://www.eurosource.se
Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

Yahoo! Groups Links
Joel Winarske wrote:
> Hi Ake,
>
> I was just typing response when Richard replied. My point was stack
> consumption was the biggest difference. Although I was under the incorrect
> assumption you were solely looking at Contiki for an IP stack. Given
> Richards input on co-routine support, I would take a closer look at
> FreeRTOS. There's even an uIP port, so you're nearly halfway there.
>
> Richard:
> Can you mix co-routines and tasks?
> Can you assign co-routines to a specific stack, say have two stacks, both
> hosting a different set of co-routines?
> Joel

You are not making this a lot easier for me guys? ;-)

/Ake

--
---
Ake Hedman (YAP - Yet Another Programmer)
eurosource, Brattbergavagen 17, 820 50 LOS, Sweden
Phone: (46) 657 413430 Cellular: (46) 73 0533 146
Company home: http://www.eurosource.se
Kryddor/Te/Kaffe: http://www.brattberg.com
Personal homepage: http://www.eurosource.se/akhe
Automated home: http://www.vscp.org

Yahoo! Groups Links