Forums

Porting linux( or others OS like FreeRTOS) to microcontroller

Started by "mostafa.pourgharib" November 30, 2011
I want to port linux to microcontroller. The microcontroller i have chosen is LPC2368. I have done basic programming on LPC2368 previously. But i don't have any idea of how to port linux( OR FreeRTOS).

Can any body explain me?

An Engineer's Guide to the LPC2100 Series

On 30/11/2011 20:02, mostafa.pourgharib wrote:
>
>
> I want to port linux to microcontroller. The microcontroller i have
> chosen is LPC2368.

You cannot port Linux to an LPC2368 because Linux requires an MMU. Try
uCLinux.

> I have done basic programming on LPC2368 previously.
> But i don't have any idea of how to port linux( OR FreeRTOS).

FreeRTOS is already ported. Please don't think FreeRTOS and Linux are
in any way related. FreeRTOS is a tiny simply kernel designed for
microcontrollers. Linux is a large general purpose OS..
> Can any body explain me?

Wow, that would take a long time so any offers you receive from this
request would be very generous indeed, unless you have funding for
training. There is a mass of information around on the web and in books
on Linux, if you are lucky, maybe somebody will offer to read it to you.

Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.
More than 7000 downloads per month.
Hi,

Linux and FreeRTOS are worlds apart. But porting any of them would require proper understanding of the kernel components and your specific architecture.

You can find good amount of documentation on the freeRTOS website and some porting papers on the internet. But as Richard has pointed out it has already been ported on your chip. If you want to learn porting then select some other chip on which freeRTOS hasn't been ported. I have tried and ported FreeRTOS on a TI DSC. It involved re-writing the hardware abstraction layer files (only 2) and a config file. But to do that and get it running required deep study of the kernel and the DSC core.

If you want to port linux then you'll require a processor with an MMU. ARM9,11 etc, and a very deep study of the linux kernel. But if you don't want to change your chip then go with uCLinux.

Regards,
Mayuresh M

--- In l..., "mostafa.pourgharib" wrote:
>
> I want to port linux to microcontroller. The microcontroller i have chosen is LPC2368. I have done basic programming on LPC2368 previously. But i don't have any idea of how to port linux( OR FreeRTOS).
>
> Can any body explain me?
>

uCos also has a port to the LPC2XXX series, and we have had a good experience with Micrium. The kernel is
incredibly well documented, and comes in source code form. It is not free, however. What application
are you trying to develop that leads you to Linux?

Regards;
== Rick

________________________________________
From: l... [l...] On Behalf Of FreeRTOS Info [n...@FreeRTOS.org]
Sent: Wednesday, November 30, 2011 7:17 PM
To: l...
Subject: Re: [lpc2000] Porting linux( or others OS like FreeRTOS) to microcontroller

On 30/11/2011 20:02, mostafa.pourgharib wrote:
> I want to port linux to microcontroller. The microcontroller i have
> chosen is LPC2368.

You cannot port Linux to an LPC2368 because Linux requires an MMU. Try
uCLinux.

> I have done basic programming on LPC2368 previously.
> But i don't have any idea of how to port linux( OR FreeRTOS).

FreeRTOS is already ported. Please don't think FreeRTOS and Linux are
in any way related. FreeRTOS is a tiny simply kernel designed for
microcontrollers. Linux is a large general purpose OS..

> Can any body explain me?

Wow, that would take a long time so any offers you receive from this
request would be very generous indeed, unless you have funding for
training. There is a mass of information around on the web and in books
on Linux, if you are lucky, maybe somebody will offer to read it to you.

Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.
More than 7000 downloads per month.

was helpful , but another question : what about RTX Operating System ?

i think this OS must be easier to port .

because i see in Keil uVision some option for this OS .

thanks.

On 01/12/2011 07:04, mostafa.pourgharib wrote:
>
>
> was helpful , but another question : what about RTX Operating System ?
>
> i think this OS must be easier to port .
>
> because i see in Keil uVision some option for this OS .

It doesn't matter which OS you choose, the answer will be the same,
porting an OS requires some time investment in understanding the OS and
understanding the chip onto which you wish to port it. So far you have
mentioned two OSs that are already ported to your chip, and one that is
impossible to port to your chip. It is very unclear what it is you are
trying to do. If you just want an OS to run on your chip, then use an
existing port of either that are already ported. If you want to learn
how to port an OS, then why are you asking people to do it for you?
Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.
More than 7000 downloads per month.

--- In l..., FreeRTOS Info wrote:
> On 01/12/2011 07:04, mostafa.pourgharib wrote:
> >
> >
> > was helpful , but another question : what about RTX Operating System ?
> >
> > i think this OS must be easier to port .
> >
> > because i see in Keil uVision some option for this OS .
>
> It doesn't matter which OS you choose, the answer will be the same,
> porting an OS requires some time investment in understanding the OS and
> understanding the chip onto which you wish to port it. So far you have
> mentioned two OSs that are already ported to your chip, and one that is
> impossible to port to your chip. It is very unclear what it is you are
> trying to do. If you just want an OS to run on your chip, then use an
> existing port of either that are already ported. If you want to learn
> how to port an OS, then why are you asking people to do it for you?
> Regards,
> Richard.
>
> + http://www.FreeRTOS.org
> Designed for Microcontrollers.
> More than 7000 downloads per month.
>
Thanks Richard , i want to understand, not asking people to do it for me. i just don't know witch one is better and in my limited time is easier to port . i am trying RTX in simulation mode in keil and i'm getting it. But i think maybe other OS are better than RTX. becuse i am new to porting OS to Micro.

now my problem is "Stack OverFlow" on idle task .

Thanks, Mosi

1. FreeRTOS is already ported. Just use it.
2. FreeRTOS is already ported. Just use it.
3. FreeRTOS is already ported. Just use it.

I want to port linux to microcontroller. The microcontroller i have chosen is LPC2368. I have done basic programming on LPC2368 previously. But i don't have any idea of how to port linux( OR FreeRTOS).
>
>Can any body explain me?
>
>
Linux requires a lot more memory that the LPC2368 has, and without a memory
bus, you can't add anymore. If you want to run Linux, choose a processor
that already has Linux ported to it. The number of people in the world who
can make a new port of Linux are very few.

If you're doing this as an educational project, start with an existing code
base that is much, much smaller and once you've followed the cookbook to
get it installed and running, study it from all angles.

Have fun!

DaveS

On Thu, Dec 1, 2011 at 11:33 PM, wrote:

> **
> 1. FreeRTOS is already ported. Just use it.
> 2. FreeRTOS is already ported. Just use it.
> 3. FreeRTOS is already ported. Just use it.
>
> I want to port linux to microcontroller. The microcontroller i have chosen
> is LPC2368. I have done basic programming on LPC2368 previously. But i
> don't have any idea of how to port linux( OR FreeRTOS).
> >
> >Can any body explain me?
> >
> >
> >
> >
>
>


--- In l..., childresss@... wrote:
>
> 1. FreeRTOS is already ported. Just use it.
> 2. FreeRTOS is already ported. Just use it.
> 3. FreeRTOS is already ported. Just use it.
>
1 . Thanks
2 . Thanks
3 . Thanks

Why are you angry ? i am using RTX . I don't know what are the Configurations of FreeRTOS for LPC2368 to use it !!!

> I want to port linux to microcontroller. The microcontroller i have chosen is LPC2368. I have done basic programming on LPC2368 previously. But i don't have any idea of how to port linux( OR FreeRTOS).
> >
> >Can any body explain me?
> >
> >
> >
>