-
Notifications
You must be signed in to change notification settings - Fork 17
Tutorial : how to create a new Makefile C project using the Buildroot toolchain ?
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 a new C Project:
Set the project name and select in the Makefile
project type the Buildroot toolchain to use to build the project :
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 thatCC
points to the C cross-compiler andCXX
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 :
Create a new Makefile
file :
Build the project (Ctrl-b
):
As can be seen, the C cross-compiler has automatically been used.