Creating a new Makefile project for an ARM Linux target

To create a new C or C++ Project for an ARM Linux target:

  1. Select File → New → Project... from the main menu.

  2. Expand the C/C++ group.

  3. Select either C Project or C++ Project.

  4. Click on Next.

  5. Enter a project name.

  6. Leave the Use default location option selected so that the project is created in the default folder shown. Alternatively, deselect this option and browse to your preferred project folder.

  7. Expand the Makefile project group.

  8. Select Empty project in the Project type panel.

  9. Select the toolchain that you want to use when building your project.

  10. Click on Finish to create your new project. The project is visible in the Project Explorer view.

  11. Before you can build the project, a Makefile, containing all the compilation tool settings, is required. The easiest way to create one is to copy the Makefile from the example project, hello and paste it into your new project. The hello project can be found in the Linux examples provided with DS-5.

  12. Edit the Makefile as follows:

    1. Locate the line that contains OBJS = hello.o.

    2. Replace hello.o with the names of the object files corresponding to your source files.

    3. Locate the line that contains TARGET = hello.

    4. Replace hello with the name of the target image file corresponding to your source files.

    5. Save the file.

  13. Add your C/C++ files to the project.

You can now build the new project:

  1. In the Project Explorer view, select the project that you want to build.

  2. Select Project → Build Project from the main menu.

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0480L
Non-ConfidentialID100912