Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

contiiki for LPC

contiiki for LPC

2006-03-27 by Ake Hedman, eurosource

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

LPC2214 I2C repeated start problem

2006-03-27 by George M. Gallant, Jr.

I have added a LPC2214 to and existing system that consists of 3
pic18f252's and an i2c compass. The LPC2214 is always the master
and basic communications are working. However, the PIC's are
detecting a STOP condition whenever the LPC issues a repeated
START command. I have a software work around which is to ignore
the STOP status after an expected START command.

The 2214 manual is quite light on I2C details. Any insight  would
be appreciated.

George


[Non-text portions of this message have been removed]

Re: LPC2214 I2C repeated start problem

2006-03-27 by ee_gary

The LPC2214 manual is really light on I2C details.  Check the LPC2138
manual for some good block diagrams, etc.

Gary

--- In lpc2000@yahoogroups.com, "George M. Gallant, Jr."
<ggallant571@...> wrote:
Show quoted textHide quoted text
>
> I have added a LPC2214 to and existing system that consists of 3
> pic18f252's and an i2c compass. The LPC2214 is always the master
> and basic communications are working. However, the PIC's are
> detecting a STOP condition whenever the LPC issues a repeated
> START command. I have a software work around which is to ignore
> the STOP status after an expected START command.
> 
> The 2214 manual is quite light on I2C details. Any insight  would
> be appreciated.
> 
> George
> 
> 
> [Non-text portions of this message have been removed]
>

RE: [lpc2000] contiiki for LPC

2006-03-27 by Joel Winarske

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

Re: [lpc2000] contiiki for LPC

2006-03-27 by Ake Hedman, eurosource

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

RE: [lpc2000] contiiki for LPC

2006-03-27 by Joel Winarske

> 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

Re: contiiki for LPC

2006-03-27 by ee_gary

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

Gary

--- In lpc2000@yahoogroups.com, "Ake Hedman, eurosource" <akhe@...> 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. 
Show quoted textHide quoted text
> 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
>

RE: [lpc2000] Re: contiiki for LPC

2006-03-28 by Joel Winarske

> 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

Re: [lpc2000] contiiki for LPC

2006-03-28 by Tennessee Carmel-Veilleux

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

Re: [lpc2000] Re: contiiki for LPC

2006-03-29 by Ake Hedman, eurosource

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

Re: [lpc2000] Re: contiiki for LPC

2006-03-29 by FreeRTOS Info

>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 ----- 
Show quoted textHide quoted text
From: "Ake Hedman, eurosource" <akhe@...>
To: <lpc2000@yahoogroups.com>
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..  Visit your group "lpc2000" on the web.
>
>  b..  To unsubscribe from this group, send an email to:
>   lpc2000-unsubscribe@yahoogroups.com
>
>  c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
> --------------------------------------------------------------------------------
>
>

RE: [lpc2000] Re: contiiki for LPC

2006-03-29 by Joel Winarske

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

Re: [lpc2000] Re: contiiki for LPC

2006-03-29 by FreeRTOS Info

> 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!*

RE: [lpc2000] Re: contiiki for LPC

2006-03-29 by Joel Winarske

> 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

Re: [lpc2000] Re: contiiki for LPC

2006-03-29 by Ake Hedman, eurosource

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

Re: [lpc2000] Re: contiiki for LPC

2006-03-29 by Ake Hedman, eurosource

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

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.