Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Tutorial : how to create a new Makefile C project using the Buildroot toolchain ?

tpetazzoni edited this page · 2 revisions

The purpose is to create a new Makefile C project that will use a toolchain generated by Buildroot. The Makefile has to be written by the developer. This allows the project to be built outside of Eclipse if needed.

Create Makefile C project in Eclipse

Create a new C Project: New C Project

Set the project name and select in the Makefile project type the Buildroot toolchain to use to build the project : Select Makefile Buildroot toolchain

Click on Finish.

If you can't find the expected toolchain in the list check that you compiled your Buildroot toolchain with the option Register the Eclipse toolchain activated (see How to activate and install the Buildroot Eclipse plugin ? for details).

When the user selects a toolchain for its project :

  • The environment variable PATH, CC, CXX are set automatically. Therefore, the Makefile can simply assume that CC points to the C cross-compiler and CXX points to the C++ cross-compiler. In the future, we may define additional environment variables if needed (do not hesitate to report missing environment variables),
  • The integration with the scanner information was done in order to allow CDT to find automatically the header files,
  • The plugin provides the possibility to create Remote Launch configurations to execute the application on the target,
  • And to create Remote Debug configurations which point automatically on the correct cross-debugger.

Create a new C file : New C file

Create a new Makefile file : New Makefile

Build the project (Ctrl-b): Build the makefile project

As can be seen, the C cross-compiler has automatically been used.

Something went wrong with that request. Please try again.