-   Linux - Embedded & Single-board computer (
-   -   Need information about programming embedded Linux devices in C (

elico 09-18-2012 05:15 PM

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 .


michaelk 09-18-2012 05:39 PM

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.

elico 09-19-2012 02:33 AM


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


TobiSGD 09-19-2012 06:13 AM

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.

theNbomr 09-21-2012 08:39 AM

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.

All times are GMT -5. The time now is 11:49 AM.