Using a Cross-compiler for Cubieboard
This tutorial shows how to build Linux applications for Cubieboard using a cross-compiler. Cross-compiling is faster than a normal build, however requires some additional maintenance steps.
Before we begin, ensure that VisualGDB 4.3 or later is installed and try creating a direct project by following the Cubieboard tutorial.
- Open Visual Studio. Start the VisualGDB Linux Project Wizard:
- Select “Create a new project”:
- On the next page select “Build the project locally with a cross-compiler”. Then select the connection corresponding to your board in the “Deployment Computer” field and select “Cubieboard” toolchain. If you don’t have the toolchain yet, VisualGDB will download and install it automatically:
- Once the toolchain is installed, press Finish. VisualGDB will test the toolchain and setup IntelliSense:
- Build your project by pressing Ctrl-Shift-B:You will notice that the build happens much faster compared to building on the board.
- Set a breakpoint inside your main() function and start debugging by pressing F5:The debugging experience will be similar to normal Visual Studio debugging.
- Right-click on the project and select “VisualGDB Project Properties”. Then go to the Makefile Settings page:Each time you install new libraries on the device, you will need to re-synchronize the sysroot with your toolchain by pressing the corresponding button in the settings dialog. You can use other pages of the settings dialog to configure various aspects of building and debugging.