Improving the configuration of eclipse, Advanced features of eclipse – Pololu Wixel User Manual
Page 57
11. Navigate to the
apps/example_blink_led
folder and double-click on
example_blink_led.c
. This will
open the file in the center pane.
12. Make a small change to
example_blink_led.c
, such as removing a blank line or adding a comment. Save
the file by pressing Ctrl+S or by selecting File > Save.
13. Press Ctrl+B or select Project > Build All to rebuild the project. When you do this, Eclipse runs
make
in
the
wixel-sdk
folder, which builds all of the apps and the libraries they depend on. Once again, you can see the
build output by selecting the Console tab at the bottom or by going to Window > Show View > Console. The
Wixel SDK’s Makefile should detect that
example_blink_led.c
has changed, so it should rebuild the app. The
output in the Console view should look something like this:
14. Congratulations! You have made your first change to an app and recompiled it using the Eclipse IDE.
15. When you are ready to load the app onto a Wixel, open up a Command Prompt, navigate to the
wixel-
sdk
directory, and run
make load_APPNAME
where APPNAME is the name of the app. We do not have a way of
loading apps onto the Wixel that is integrated into Eclipse.
Improving the configuration of Eclipse
1. In the Project menu, select Properties. Under C/C++ General > Paths and Symbols > Includes, click
the Add… button. Enter the full path to SDCC’s include directory. If you are on a 64-bit machine and SDCC
is installed in the default location, this will be “C:\Program Files (x86)\SDCC\include”. Check the “Add to all
languages” box and click OK. This will allow Eclipse to find the headers provided by the compiler, such as
stdio.h
, which will reduce the number of warnings you see from Eclipse while developing apps.
2. In the Window menu, select Preferences. Under C/C++ > Code Analysis, uncheck the boxes for “Type
cannot be resolved” and “Field cannot be resolved”. We found that these two errors were not working correctly
under Eclipse Indigo Service Release 1, and they will be caught by the compiler regardless of how you configure
Eclipse.
3. In the Window menu, select Preferences. Under General > Workspace, check Save automatically before
build. This makes Eclipse save your code automatically before building, so you do not have to remember to do
that.
Advanced Features of Eclipse
The attraction of using Eclipse is the large number of advanced C/C++ editing features it provides. Here are just a
few of these features:
• Eclipse supports C syntax highlighting.
• If an error occurs during the build, you can double-click on the error from the Console or Problems view in
order to jump directly to the line of code that has the problem.
Pololu Wixel User's Guide
© 2001–2014 Pololu Corporation
10. Writing Your Own Wixel App
Page 57 of 64