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.

  1. Open Visual Studio. Start the VisualGDB Linux Project Wizard: 01-wizard
  2. Select “Create a new project”:02-newapp
  3. 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:03-gettoolchain
  4. Once the toolchain is installed, press Finish. VisualGDB will test the toolchain and setup IntelliSense:04-test
  5. Build your project by pressing Ctrl-Shift-B:05-buildYou will notice that the build happens much faster compared to building on the board.
  6. Set a breakpoint inside your main() function and start debugging by pressing F5:06-debugThe debugging experience will be similar to normal Visual Studio debugging.
  7. Right-click on the project and select “VisualGDB Project Properties”. Then go to the Makefile Settings page:07-settingsEach 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.