LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-18-2012, 06:15 PM   #1
elico
Member
 
Registered: Dec 2011
Posts: 115

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
IF , SWITCH, WHILE etc .

Please clarify it for me .

Thanks
Elico

Last edited by TobiSGD; 09-19-2012 at 07:14 AM. Reason: Thread title
 
Old 09-18-2012, 06:39 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,176

Rep: Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785
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, 03:33 AM   #3
elico
Member
 
Registered: Dec 2011
Posts: 115

Original Poster
Rep: Reputation: Disabled
Thanks

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

Elico
 
Old 09-19-2012, 07:13 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
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, 09:39 AM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
 
  


Reply


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


All times are GMT -5. The time now is 08:59 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration