-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
122 lines (96 loc) · 8.46 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>c4ev3</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
</head>
<body>
<section class="page-header">
<h1 class="project-name">c4ev3</h1>
<h2 class="project-tagline">Native C/C++ Programming for the LEGO® EV3</h2>
<a href="https://github.com/c4ev3/Windows-Installer/releases" class="btn">
Windows Installer
<br>
<img align="middle" alt="Windown" height="20" width="20" src="img/win32.png"></img>
</a>
<a href="#manual-install" class="btn">
Build from source
<br>
<img align="middle" alt="Linux" height="20" width="20" src="img/linux.png"></img>
<img align="middle" alt="macOS" height="20" width="20" src="img/osx.png"></img>
<img align="middle" alt="Windown" height="20" width="20" src="img/win32.png"></img>
</a>
<a href="https://github.com/c4ev3/EV3-API/blob/master/commands.pdf" class="btn">
API documentation
<br>
<img align="middle" alt="PDF" height="20" width="20" src="img/pdf.png"></img>
</a>
</section>
<a href="https://github.com/c4ev3"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<section class="main-content">
<p>c4ev3 is a software package for programming stock-firmware LEGO® Mindstorms® EV3 in C/C++. The package contains a <a href="https://github.com/c4ev3/EV3-API">C API</a> that exposes the hardware capabilities of the device, an <a href="https://github.com/c4ev3/ev3duder">uploader</a> able to transmit the compiled binaries over WiFi/Bluetooth/USB and an <a href="https://github.com/c4ev3/EV3-Eclipse-Plugin">Eclipse Plugin</a> that integrates the two components into an easy-to-use development environment.<br> Binaries only provided for Windows. Source build works on Windows (MinGW), Linux and Mac OS X.</p>
<h3>
<a id="how-to-use" class="anchor" href="#howtouse" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>How to use</h3>
<p>
<ul>
<li>Just run the c4ev3 installer. It includes the ARM GCC toolchain, Eclipse plugin and all the needed library headers and files.</li>
<li>In Eclipse, <i>File → New → Project</i>.</li>
<li>Choose Project type as <i>"Hello World EV3 Project"</i> and <i>"Cross ARM/EV3 GCC"</i> as the toolchain.</li>
<li>Project can be run via the <i>EV3 → Upload and run</i> menu entry.</li>
<li>If you want to run the executable later again, you can find it on the EV3 under <i>SD_Card/myapps/</i></li>
<li>...</li>
<li>Happy programming! </li>
</ul>
</p>
<hr>
<h3>
<a id="manual-install" class="anchor" href="#manual-install" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Manual Installation</h3>
<h4>The Toolchain</h4>
<p>In order to compile C/C++ applications you will need the <code>arm-none-linux-gnueabi</code> or <code>arm-linux-gnueabi</code> GCC (Both are the same thing). The <i>symlink_cross.sh</i> script with the ev3duder can be used to symlink the latter to the former.</p>
<ul>
<li>Windows users can get it via the <a href="https://sourcery.mentor.com/GNUToolchain/package4574/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi.exe ">CodeSourcery Lite package</a>.</li>
<li>Debian/Ubuntu's repositories offer the Linaro toolchain, but I couldn't get that to work. CodeSourcery to the rescue again: <br>
<pre>$ wget -c http://www.codesourcery.com/sgpp/lite/arm/portal/package4571/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
$ mkdir CodeSourcery $ tar -jxvf ~/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C ~/CodeSourcery/
$ echo export PATH=~/CodeSourcery/arm-2009q1/bin/:$PATH >> ~/.bashrc && . ~/.bashrc </pre></li>
<li>Carlson-Minot Inc. provides binary builds of <a href="http://www.carlson-minot.com/available-arm-gnu-linux-g-lite-builds-for-mac-os-x">CodeSourcery's GNU/ARM toolchain for OS X</a>.</li>
</ul>
<p>If not done by the installer, you will additionally need to add the compiler to the <i>PATH</i>.</p>
To write somewhat useful programs, you'll want to link against the <a href="https://github.com/c4ev3/EV3-API">Sensor/Actor API</a>, which can be built by a simple <code>$ make</code>.
<h4>The Uploader</h4>
<p>
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.
</p>
<p>You can get the source with <a href="http://git-scm.com">git</a>:
<pre>$ git clone --recursive https://github.com/c4ev3/ev3duder</pre>
If you haven't got git, you will have to download these seperately: <code>https://github.com/c4ev3/ev3duder/archive/master.zip</code> and <code>https://github.com/signal11/hidapi/archive/master.zip</code> then unpack the hidapi archive into the hidapi directory of the ev3duder extraction path.</p>
<p>Building is an easy
<pre>$ make</pre>
On Linux, you additionally need <i>libudev-dev</i> and <i>pkg-config</i> to be installed. On Ubuntu and other Debian-based system this can be done via <code>$ sudo apt-get install libudev-dev pkg-config</code>. Also to allow access to the ev3 over USB without requiring root, appropriate udev rules must be created. This can be easily done with <code>$ make install</code>.</p>
<p>The <i>test/</i> directory contains some sample projects that do stuff on the EV3. <code>perl flash.pl Test_Motors</code> uploads and executes the <i>Test_Motors</i> project.
<h4>The Eclipse Plugin</h4>
<p>The plugin is packaged as a <a href="https://github.com/c4ev3/EV3-Eclipse-Plugin/releases">single <i>.jar</i> file</a>, which just needs to be dropped into the <i>Eclipse/Dropins</i> directory.</p>
<p>Alternatively, change Eclipse's Workspace to the Plugin's source directory and build it yourself.</p>
<hr>
<h3>
<a id="acknowledgement" class="anchor" href="#acknowledgement" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Acknowledgements</h3>
<p> This project was originally written for use in the teaching of Informatics at the <a href="http://h-ab.de">Hochschule Aschaffenburg</a>.</p>
<p>The work is part of the <a href="http://www.evelinprojekt.de/en/">EVELIN</a> project, which is funded by the German Federal Ministry of Education and Research (Bundesministerium für Bildung und Forschung) under grant number 01PL12022B.
</p>
<p>The authors are solely responsible for the content of this publication.</p>
<p> In agreement with the University, The project's components are released under their respective open source licenses.<p>
<h3>
<a id="contrib-or-support" class="anchor" href="contrib-or-support" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Contribution or Contact</h3>
<p>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! :-)
<a href="https://gitter.im/c4ev3/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge" rel="nofollow"><img src="https://camo.githubusercontent.com/da2edb525cde1455a622c58c0effc3a90b9a181c/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667" alt="Gitter Chat" data-canonical-src="https://badges.gitter.im/Join%20Chat.svg" style="max-width:100%;"></a></p>
<footer class="site-footer">
<span class="site-footer-credits">This page uses the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
</footer>
</section>
</body>
</html>