Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
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.


  Search this Thread
Old 09-18-2012, 05:15 PM   #1
Registered: Dec 2011
Posts: 145

Rep: Reputation: Disabled
Need information about programming embedded Linux devices in C

Hi all

I am confused .

When one tries to write code for an LINUX based embedded board.

That code is aimed to control some leds .

How that code is wrien in C and then compiled
and installed as a program in the board memory ?

Or does LINUX offer regular C like commands like

Please clarify it for me .


Last edited by TobiSGD; 09-19-2012 at 06:14 AM. Reason: Thread title
Old 09-18-2012, 05:39 PM   #2
Registered: Aug 2002
Posts: 15,716

Rep: Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751Reputation: 1751
Typically embedded single board computers do not contain enough memory to hold all of the headers and libraries necessary to compile a program. So you would set up a development system on a regular PC that includes the aforementioned stuff plus a cross compiler as necessary. The cross compiler is c and all the regular syntax is the same.

Take for example an ARM based embedded board like the Pandaboard. When the embedded board already has a running linux system it might include a serial port that can be used as a console terminal. A terminal program such as minicom, cutecom, kermit etc is used to communicate with the SBC. You could upload your program via a terminal transfer program or maybe via a flash drive if capable.
Old 09-19-2012, 02:33 AM   #3
Registered: Dec 2011
Posts: 145

Original Poster
Rep: Reputation: Disabled

How do i include in that C code tasks and threads that are LINUX based ?
Do I include LINUX header files at design time ?

Old 09-19-2012, 06:13 AM   #4
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,133
Blog Entries: 2

Rep: Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836
Please use a descriptive title for your thread excluding words like 'urgent' or 'help'. Using a proper title makes it easier for members to help you. This thread has been reported for title modification. Please do not add replies that address the thread title.
Old 09-21-2012, 08:39 AM   #5
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
The C programming language is largely the same regardless of the build or target host architecture. Target-specific code would be determined by the presence or lack of an OS or by addressing (literally and figuratively) the target hardware. A good deal of code targeting Linux generically will build and run equally well on any Linux OS host.
--- rod.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Confused nay Very Confused chrystlenight SUSE / openSUSE 3 08-28-2007 05:57 PM
Please help, I'm so confused sdat1333 SUSE / openSUSE 4 12-11-2004 09:23 PM
Really confused jeep99899 Linux - Newbie 5 11-10-2004 03:58 PM
<<<PLEASE HELP!! I'M Confused>>> Glitch00709 Linux - Software 4 04-09-2004 03:02 AM
so confused... KeTrueno Linux - General 1 09-28-2003 01:45 PM

All times are GMT -5. The time now is 06:36 AM.

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