Running a C program on mini2440

Am creating a simple Hello World program in C.This is the program

int main(){
 printf("Hello World\n");

saved it as hello.c..Now compiling it for our target or mini2440.

open terminal and change directory to the folder where c program is presnt and issue this command

arm-linux-gcc hello.c -o hello

The arm-linux-gcc command was present bcoz we setup the toolchain early.Now a binary hello will be present in the folder.use file command to know the type of the binary it will suitable for ARM.

Move the bianry to mini2440 using pendrive or sdcard.To see the output execute the binary like this..


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s