Archive for August, 2011
I recently got a ChipKIT Uno32 for a LED project that I’m working on. The ChipKit is basically compatible with most Arduino code, but has a 32 bit chip with a clock rate that is 5x the speed of my Arduino Uno, as well as much more Flash & SRAM space. I am really excited about it because we ran into performance issues with a slower 8-bit processor, and we are hoping that 32bit + 8x clock speed will put us back into the workable range.
They have a decent wiki page on how to run MPIDE which helped.
The article cited issues with 64 bit systems:
The binary packages for MPIDE are all built for 32bit Linux distributions, if you are running 64bit you need to have some additional libraries installed. You’ll need to have 32bit versions of libelf.so and libreadline.so to be able to program the chipKIT, these need to be in /usr/lib32. You may well need to sym-link these latest versions manually, installing these libs is a fairly advanced operation and will vary significantly between distributions.
So this is what I had to do to get it running on 64 bit Ubuntu (Maverick/10.10):
1) Download the Linux Version and unpack it somwehere.
2) Getting librxtx-java and other jni items loadable via the LD_LIBRARY_PATH or CLASSPATH, which I wrote a post about.
3) The next issue that I ran into was a permissions issue
Cannot run program “/home/username/mpide-0022-chipkit-linux32-20110619/hardware/pic32/compiler/pic32-tools/bin/pic32-g++”: java.io.IOException: error=13, Permission denied
I initially solved it by chmodding everything in that directory, but that resulted in:
pic32-g++: error trying to exec ‘cc1plus': execvp: No such file or directory
So I followed the advice in this forum post and executed
chmod +x -R ./hardware/pic32/compiler/ and that seemed to do it for me. I think I was able to compile/verify the blink example at this point.
4) Add 32bit versions of libelf and libreadline6 to /usr/lib32:
The first error I ran into was:
/home/username/mpide-0022-chipkit-linux32-20110619/hardware/pic32/compiler/pic32-tools/bin/../pic32mx/bin/gcc/pic32mx/4.5.1/cc1plus: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
I solved this by downloading the i386 deb from here, opening it with archive manager and copying
/usr/lib32/libelf-0.147.so. after this I creating the versioned symbolic link via
ln -s libelf-0.147.so libelf.so.1
Tried it again and was onto my next error:
/home/username/mpide-0022-chipkit-linux32-20110619/hardware/tools/avrdude: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory
Repeat the same process for libreadline6 (which contains another required lib too) And I was able to upload the and run the blink example.
Now on to making the TLC Library work..