Linux - Embedded & Single-board computerThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 .
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.
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.
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.
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 ?
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.
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 .
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):
Bootloader (uboot, redboot, etc)
Kernel
RFS
You'll need a toolchain to cross-compile the three items listed above.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.