PLEASE BE AWARE THAT ALL THE CODE IN THIS WEB SITE IS EXPERIMENTAL, USE IT AT YOUR OWN RISK!
The following tutorials show how to compile and run native programs written in C for the Lego Mindstorms EV3 kit. It is important to master all the steps shown in this section for for compiling, uploading and running programs described here, as it will be used in all the subsequent sections.
Cross Compiler Installation
Open the Terminal to use this program. The ARM cross compiler program can be downloaded from this link or using the command:
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
Create a directory that will contain the program:
Uncompress the compiler installation file using:
tar -jxvf ~/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C ~/CodeSourcery/
Add the compiler path using:
echo export PATH=~/CodeSourcery/arm-2009q1/bin/:$PATH >> ~/.bashrc && . ~/.bashrc
The instructions shown in this readme_1st.txt file show how to install and configure the CrossCompiler for Windows. Users that are familiar with the use of command instructions in a Windows terminal, only need to follow the first three instructions. For those not familiar with Windows path manipulation, I found this useful tutorial. You will also need to install telnet/ssh and scp clients. I have tested PuTTy, and PSCP. Place these executable files in a c:\tools directory and add this path to the PATH environment variable.
Users requiring an Integrated Development Environment (IDE), may install Bricxcc for compiling and downloading programs to the EV3 brick. At the moment, support for the EV3 brick is only available in the test versions. Keep in mind that the zip file contains only part of the software needed for EV3 programing. Follow the instructions in the readme_1st.txt file, at least up to step 21.
Writing the First Program for the EV3
In order to start programing and testing for the EV3, users will need the following hardware:
– NetGear WNA1100 USB WiFi dongle
– MicroSD card (2GB is plenty)
Next, we need to establish a network connection. This will be used to transfer and run programs remotely in the EV3 brick. Once this is done, you can write and run a “Hello World!” program. You can now move to the next section that shows how interact with the EV3 hardware .