EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

contiiki for LPC

Started by "Ake Hedman, eurosource" March 27, 2006
Hi All,

I am planning to start to port Contiki
(http://www.sics.se/~adam/contiki/) for use on this LPC2129 based board
http://www.vscp.org/wiki/doku.php?id=roma_-_ethenet_based_2_x_can_interface_for_vscp
that is part of the VSCP project (http://www.vscp.org) and also for
the Olimex E2129 board.

The question is if someone know if this has been done for the LPC,
partially or complete. This to prevent me from inventing the wheel
again. I know about the uip port done by Rowley Associates.

Best Regards
/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

An Engineer's Guide to the LPC2100 Series

Hi Ake,

> I am planning to start to port Contiki
> (http://www.sics.se/~adam/contiki/) for use on this LPC2129 based board
> http://www.vscp.org/wiki/doku.php?id=roma_-
> _ethenet_based_2_x_can_interface_for_vscp
> that is part of the VSCP project (http://www.vscp.org) and also for
> the Olimex E2129 board.
>
> The question is if someone know if this has been done for the LPC,
> partially or complete. This to prevent me from inventing the wheel
> again. I know about the uip port done by Rowley Associates.

I ported uIP from Contiki to IAR without much trouble.

Which compiler are you targeting?

Joel

Yahoo! Groups Links
Joel Winarske wrote:
> Hi Ake,
>
> > I am planning to start to port Contiki
> > (http://www.sics.se/~adam/contiki/) for use on this LPC2129 based board
> > http://www.vscp.org/wiki/doku.php?id=roma_-
> > _ethenet_based_2_x_can_interface_for_vscp
> > that is part of the VSCP project (http://www.vscp.org) and also for
> > the Olimex E2129 board.
> >
> > The question is if someone know if this has been done for the LPC,
> > partially or complete. This to prevent me from inventing the wheel
> > again. I know about the uip port done by Rowley Associates.
>
> I ported uIP from Contiki to IAR without much trouble.
>
> Which compiler are you targeting?
>
> Joel

GCC

A little reluctant at the moment if I should go for Contiki or FreeRTOS.
But it will probably be Contiki.

/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
> A little reluctant at the moment if I should go for Contiki or FreeRTOS.
> But it will probably be Contiki.

Yes I would also go for Contiki.

Joel

Yahoo! Groups Links
Why contiki over something like freeRTOS or uCLinux? No intention of
derailing the thread, just curious.

Gary

--- In l..., "Ake Hedman, eurosource" wrote:
>
> Joel Winarske wrote:
> > Hi Ake,
> >
> > > I am planning to start to port Contiki
> > > (http://www.sics.se/~adam/contiki/) for use on this LPC2129
based board
> > > http://www.vscp.org/wiki/doku.php?id=roma_-
> > > _ethenet_based_2_x_can_interface_for_vscp
> > > that is part of the VSCP project (http://www.vscp.org) and
also for
> > > the Olimex E2129 board.
> > >
> > > The question is if someone know if this has been done for the LPC,
> > > partially or complete. This to prevent me from inventing the wheel
> > > again. I know about the uip port done by Rowley Associates.
> >
> > I ported uIP from Contiki to IAR without much trouble.
> >
> > Which compiler are you targeting?
> >
> > Joel
>
> GCC
>
> A little reluctant at the moment if I should go for Contiki or
FreeRTOS.
> But it will probably be Contiki.
>
> /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
> Why contiki over something like freeRTOS or uCLinux? No intention of
> derailing the thread, just curious.

You've identified two excercises:
1. Port an IP stack - Contiki has the most current uIP source.
2. Port an RTOS - There's currently a port of FreeRTOS for LPC2129 in the
FreeRTOS code base.
Joel

Yahoo! Groups Links
On Mar 27, 2006, at 7:11 AM, Ake Hedman, eurosource wrote:

> The question is if someone know if this has been done for the LPC,
> partially or complete. This to prevent me from inventing the wheel
> again. I know about the uip port done by Rowley Associates.
>

On the Contiki OS webpage, you can find the port for the GBA (GameBoy
Advance). The GBA is powered by an ARM7TDMI-based System-On-Chip. It
seems that very few modifications were needed, apart from a proper
Makefile calling the ARM GBA GCC compiler and some of the configuration
headers modified to reflect the different drivers that the GBA can use.
I would thus think it rather easy to reuse most of that port to make a
generic LPC-based port. Perhaps a CAN, SPI or I2C driver would be a
nice addition. Please keep up informed about your developments. The
contiki OS seems interesting for some of my applications.

Best Regards,

Tennessee Carmel-Veilleux

Yahoo! Groups Links
Joel Winarske wrote:
> > Why contiki over something like freeRTOS or uCLinux? No intention of
> > derailing the thread, just curious.
>
> You've identified two excercises:
> 1. Port an IP stack - Contiki has the most current uIP source.
> 2. Port an RTOS - There's currently a port of FreeRTOS for LPC2129 in the
> FreeRTOS code base.
> Joel
>

Sorry for not responding right away but a flue caught me. :-(

For most of my work I don't like to add the complexity of a RT-kernel.
Something like cooperation multitasking is OK for most situations. But
if you want to have several of the RFC's handled in a module things
always get a bit messy. Also it is hard to write the code in a nice
modular fashion.

Of course both FreeRTOS and Contiki solve this problem. Also when I look
at them they appear to provide much the same services apart from the GUI
functionality in Contiki which I probably will not use anyway. I can't
find anything about the footprint for the FreeRTOS but know it can be
very low for Contiki and that services are easy to modularizes.

What are the differences between them?

Cheers
/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
>I can't
> find anything about the footprint for the FreeRTOS but know it can be
> very low for Contiki and that services are easy to modularizes.

Below are two figures obtained from the linker file using the IAR compiler.
The first has all optional components removed, the second has all optional
components included, full optimisation:

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

May be of interest to some that the minimal build on CORTEX M3 using RVDS
(ARM, Keil, ...) compiler and maximum optimisation is coming out at 2284
bytes. Different compiler though so not an apples for apples comparison.
> What are the differences between them?

Contiki as far as I'm aware (note I have not used it so info may be
inaccurate, please check before making decisions) is a cooperative only
kernel and includes the graphical interface. It uses protothreads so uses
much less RAM than a traditional pre-emptive kernel as each 'thread' uses
the same stack. It has low RAM and ROM usage.

FreeRTOS up until V4.0.0 was a more traditional kernel that could be used in
cooperative of fully pre-emptive mode. V4.0.0 introduces co-routines which
are similar to Contiki threads so can reduce the RAM usage accordingly. You
therefore have the choice of using traditional tasks (with a stack each),
co-routines, or a combination of both.

Regards,
Richard.
http://www.FreeRTOS.org
*Now for ARM CORTEX M3!*
----- Original Message -----
From: "Ake Hedman, eurosource"
To:
Sent: Wednesday, March 29, 2006 8:17 AM
Subject: Re: [lpc2000] Re: contiiki for LPC
> Joel Winarske wrote:
>> > Why contiki over something like freeRTOS or uCLinux? No intention of
>> > derailing the thread, just curious.
>>
>> You've identified two excercises:
>> 1. Port an IP stack - Contiki has the most current uIP source.
>> 2. Port an RTOS - There's currently a port of FreeRTOS for LPC2129 in
>> the
>> FreeRTOS code base.
>> Joel
>> Sorry for not responding right away but a flue caught me. :-(
>
> For most of my work I don't like to add the complexity of a RT-kernel.
> Something like cooperation multitasking is OK for most situations. But
> if you want to have several of the RFC's handled in a module things
> always get a bit messy. Also it is hard to write the code in a nice
> modular fashion.
>
> Of course both FreeRTOS and Contiki solve this problem. Also when I look
> at them they appear to provide much the same services apart from the GUI
> functionality in Contiki which I probably will not use anyway. I can't
> find anything about the footprint for the FreeRTOS but know it can be
> very low for Contiki and that services are easy to modularizes.
>
> What are the differences between them?
>
> Cheers
> /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
>
> a..
> --------

Yahoo! Groups Links
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

Yahoo! Groups Links

The 2024 Embedded Online Conference