c4ev3 is a software package for programming stock-firmware LEGO® Mindstorms® EV3 in C/C++. The package contains a C API that exposes the hardware capabilities of the device, an uploader able to transmit the compiled binaries over WiFi/Bluetooth/USB and an Eclipse Plugin that integrates the two components into an easy-to-use development environment.
Binaries only provided for Windows. Source build works on Windows (MinGW), Linux and Mac OS X.

How to use


Manual Installation

The Toolchain

In order to compile C/C++ applications you will need the arm-none-linux-gnueabi or arm-linux-gnueabi GCC (Both are the same thing). The symlink_cross.sh script with the ev3duder can be used to symlink the latter to the former.

If not done by the installer, you will additionally need to add the compiler to the PATH.

To write somewhat useful programs, you'll want to link against the Sensor/Actor API, which can be built by a simple $ make.

The Uploader

The uploader requires a gnu99 compatible compiler, that is GCC 3.2 and above or compatible compilers. Any recent version of gcc, clang or icc should be able to compile it. MS Visual C++ isn't supported, due to the use of C99 features and GNU extensions. Also required is GNU Make.

You can get the source with git:

$ git clone --recursive https://github.com/c4ev3/ev3duder
If you haven't got git, you will have to download these seperately: https://github.com/c4ev3/ev3duder/archive/master.zip and https://github.com/signal11/hidapi/archive/master.zip then unpack the hidapi archive into the hidapi directory of the ev3duder extraction path.

Building is an easy

$ make
On Linux, you additionally need libudev-dev and pkg-config to be installed. On Ubuntu and other Debian-based system this can be done via $ sudo apt-get install libudev-dev pkg-config. Also to allow access to the ev3 over USB without requiring root, appropriate udev rules must be created. This can be easily done with $ make install.

The test/ directory contains some sample projects that do stuff on the EV3. perl flash.pl Test_Motors uploads and executes the Test_Motors project.

The Eclipse Plugin

The plugin is packaged as a single .jar file, which just needs to be dropped into the Eclipse/Dropins directory.

Alternatively, change Eclipse's Workspace to the Plugin's source directory and build it yourself.


Acknowledgements

This project was originally written for use in the teaching of Informatics at the Hochschule Aschaffenburg.

The work is part of the EVELIN project, which is funded by the German Federal Ministry of Education and Research (Bundesministerium für Bildung und Forschung) under grant number 01PL12022B.

The authors are solely responsible for the content of this publication.

In agreement with the University, The project's components are released under their respective open source licenses.

Contribution or Contact

Feel free to open a bug report or pull request. You can also drop by at our Gitter channel if you got questions or want to tell us what you're doing with c4ev3! :-) Gitter Chat