LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 04-11-2012, 01:56 AM   #1
elico
Member
 
Registered: Dec 2011
Posts: 145

Rep: Reputation: Disabled
Linux on the micro


Hi all

There is something basic issue that I am confused on it .

In case I want to build an embedded system around some ARM
microcontroller, and I want the compiled C code to run on it
include threads, how this is done ?

Do I have to put LINUX in the microcontrloller FLASH ?
Or I compile the C code on ECLIPSE with linux libraries
and transfer the compiled C code to the flash .

I am confused .

Thanks in advance .

Elico
 
Old 04-11-2012, 02:22 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,853

Rep: Reputation: 161Reputation: 161
Normally, the code should be saved in flash and execute it later. But you can use FTP to download the code into memory and execute it if your memory is big enough.
 
Old 04-12-2012, 01:14 AM   #3
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
What type of micro controller are we talking about. The smallest I'm aware about are the NXP LPC12xx and LPC17xx and most of them are not really meant to run a full-blown OS.
 
Old 04-12-2012, 03:08 AM   #4
elico
Member
 
Registered: Dec 2011
Posts: 145

Original Poster
Rep: Reputation: Disabled
Any ARM micro controller , I am asking at the principal level.
Just want to know how this is done basically .

Elico
 
Old 04-12-2012, 06:29 PM   #5
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
If we are talking about the larger ARM processors like the TI OMAP types(mostly refered to as microprocessor) which can address enough memory, then yes you can run linux on it with all its advantages. There are a lot of sites which have descriptions how to build linux for it.

If we are talking about ARM processors like the NXP LPC17xx types (mostly refered to as microcontrollers), then no those systems have not enough memory to run linux. The best LPC 17xx has a max of 512Kbyte of flash and 96Kbyte of RAM. If you want to use one of these, you need something else. There are also lots of sites that concentrate on those type of controllers.
 
Old 04-15-2012, 07:04 AM   #6
elico
Member
 
Registered: Dec 2011
Posts: 145

Original Poster
Rep: Reputation: Disabled
What I am asking is this :

Do i have to load the LINUX kernel on that ARM flash together with the compiled C code or just the compiled C code
that contains threads and processes ?

Thanks
Elico
 
Old 04-15-2012, 10:07 AM   #7
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
If you want to use threads or multiple processes. You need an OS kernel that supports them. If you want to use the Linux kernel for this then Yes, you need to load the Linux kernel together with the code you write.
 
Old 04-15-2012, 12:30 PM   #8
elico
Member
 
Registered: Dec 2011
Posts: 145

Original Poster
Rep: Reputation: Disabled
Thanks
How exactly i load the LINUX kernel on the ARM flash ?
How the kernel is translated to target machine code ?
The kernel is a collection of C functions if i understand well .


Elico
 
Old 04-17-2012, 03:31 AM   #9
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
I wrote about Linux for MCU some time ago, have a look at http://www.cnx-software.com/2011/12/...rocontrollers/.
 
Old 04-17-2012, 03:40 AM   #10
elico
Member
 
Registered: Dec 2011
Posts: 145

Original Poster
Rep: Reputation: Disabled
Lets say i am using some ARM bases board that offer enough RAM and FLASH memory.
How this is done ?

Elico
 
Old 04-17-2012, 09:28 PM   #11
engr04
LQ Newbie
 
Registered: Mar 2012
Posts: 21

Rep: Reputation: Disabled
Please be more specific.

Read cnxsoft's article. If you use a Cortex M3 or some other microcontroller without a MMU, uClinux is the way to go. http://www.uclinux.org/ has getting started guides that walk you through the process.

If you used an arm based board, for example the at91sam9m10-g45-ek, you have more options.

Most arm based dev boards will have documentation on getting started with linux. Linux4sam has documentation for Atmel's Arm line.

At a minimum, you'll need to put the following in some type of bootable storage (Nand, Nor, SD Card, USB, etc):
  1. Bootloader (uboot, redboot, etc)
  2. Kernel
  3. RFS

You'll need a toolchain to cross-compile the three items listed above.
 
Old 04-18-2012, 02:57 AM   #12
elico
Member
 
Registered: Dec 2011
Posts: 145

Original Poster
Rep: Reputation: Disabled
Thanks
What is RFS ? I sit Remote File System ?

How RFS is compiled exactly ?

Elico
 
Old 04-18-2012, 03:10 AM   #13
elico
Member
 
Registered: Dec 2011
Posts: 145

Original Poster
Rep: Reputation: Disabled
Many thanks to all
You gave me the direction .

Elico
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Micro controller Linux mustansar Linux - Embedded & Single-board computer 1 09-19-2010 03:40 PM
People who call it M$ or Micro$oft or Micro$loth lowpro2k3 General 48 12-24-2007 12:19 AM
LXer: Imation 4GB Micro Hard Drive: Still Micro on the Outside, More Giga on the Inside LXer Syndicated Linux News 0 12-28-2005 06:16 PM
Micro$oft and Linux..... XavierP General 11 04-27-2003 07:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration