Difference between revisions of "Install the toolchain"

From IridiaWiki
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
There is an already compiled toolchain for the e-puck in the repositories.
 
There is an already compiled toolchain for the e-puck in the repositories.
You just need to download the file [todo, put name] and untar it in your root dir. All the libs and includes will be in /usr/local/
+
In the svn you will find ''e-puck_toolchain_i686-20110909.tar.bz2''. Untar this file in your root dir. That's it! All the libs and includes will be in /usr/local/
  +
  +
Up to now we only have a 32bit toolchain that works under ubuntu and slackware (tested). We are still in the process of making a 64bit version.
  +
  +
On Ubuntu you need to add the files to the path. The best way to do this is to add these lines in your .bashrc
  +
  +
export PATH=/usr/local/pic30-elf/bin:$PATH
  +
export COMPILER_PATH=/usr/bin
  +
  +
 
Note that GioReina worked with the e-pucks under mac os. Check out his directory in the examples file.
  +
  +
===== Testing =====
  +
  +
In the file ''e-puck_various_and_examples.tar.gz'' you will find a directory called ''testing''. In this directory there is a very simple program called ''testing.c'', basically a while(1). If you manage to compile this you should be good to go.
  +
  +
cd testing
  +
mkdir build
  +
cd build
  +
cmake ..
  +
  +
everything should be fine and created
  +
  +
make
  +
pic30-elf-bin2hex testing
  +
  +
if everything goes fine you should have a ''testing'' that is the compiled binary (obtained by doing ''make'', not usable by the e-puck) and a ''testing.hex'' (obtained with the ''pic30-elf-bin2hex'') that can be uploaded on the e-puck.
  +
  +
  +
===== Examples =====
  +
  +
In the svn you will find also a file called ''e-puck_various_and_examples.tar.gz''. This files contains all the examples, original libraries and software that I found around. Many things have never been tested, many are old, many are undocumented. Still it's full of useful examples that you can use for your programs. Have a look.
   
This works with 32bit computer. We are still in the process of making it work with a 64bit computer.
 
   
GioReina worked with the e-pucks under mac os. Ask him if you want to do the same.
 
   
   

Latest revision as of 09:23, 20 October 2011

There is an already compiled toolchain for the e-puck in the repositories. In the svn you will find e-puck_toolchain_i686-20110909.tar.bz2. Untar this file in your root dir. That's it! All the libs and includes will be in /usr/local/

Up to now we only have a 32bit toolchain that works under ubuntu and slackware (tested). We are still in the process of making a 64bit version.

On Ubuntu you need to add the files to the path. The best way to do this is to add these lines in your .bashrc

export PATH=/usr/local/pic30-elf/bin:$PATH
export COMPILER_PATH=/usr/bin


Note that GioReina worked with the e-pucks under mac os. Check out his directory in the examples file.

Testing

In the file e-puck_various_and_examples.tar.gz you will find a directory called testing. In this directory there is a very simple program called testing.c, basically a while(1). If you manage to compile this you should be good to go.

cd testing
mkdir build
cd build
cmake ..

everything should be fine and created

make 
pic30-elf-bin2hex testing

if everything goes fine you should have a testing that is the compiled binary (obtained by doing make, not usable by the e-puck) and a testing.hex (obtained with the pic30-elf-bin2hex) that can be uploaded on the e-puck.


Examples

In the svn you will find also a file called e-puck_various_and_examples.tar.gz. This files contains all the examples, original libraries and software that I found around. Many things have never been tested, many are old, many are undocumented. Still it's full of useful examples that you can use for your programs. Have a look.



More technical information

How to compile the pic30-gcc v3.20