Build your first Hello World! program
Now the cross-compiler and the Eclipse IDE for BeagleBoard have been set up on Windows 7 and we are going to write our first program, a classic Hello World!
, on the Eclipse IDE, build it to get an executable program, and then run it on the BeagleBoard.
Creating your first project in Eclipse
Before we start typing code, we need to create a project so that we can easily manage the source files and configure the compilation options. Follow the steps to create your first C project:
Switch the Eclipse IDE into C/C++ perspective.
Create a C project. From the menu bar, select File | New | C Project. In the C project window, type in a project name (for example,
helloworld
). On the left panel of Project Type, select Empty Project under ARM Cross Target Application. On the right panel of Toolchains, select ARM Windows GCC (Sourcery G++ Lite), and click on the Finish button. Then a project is created and a new folderhelloworld
, named after the project name, is created...