Difference between revisions of "ChipKit"

From ArchWiki
Jump to: navigation, search
m (Requirements (64 bit versions))
(8 intermediate revisions by 6 users not shown)
Line 1: Line 1:
[[Category:Development (English)]]
+
[[Category:Development]]
 +
[[Category:Mathematics and science]]
 
ChipKit is a Microprocessor platform produced by Digilent Inc. which provides an [[Arduino]] like environment and a physically compatible board, but runs the much quicker and more powerful PIC32 series of Processors.  
 
ChipKit is a Microprocessor platform produced by Digilent Inc. which provides an [[Arduino]] like environment and a physically compatible board, but runs the much quicker and more powerful PIC32 series of Processors.  
  
Line 11: Line 12:
  
 
===Requirements (all architectures) ===
 
===Requirements (all architectures) ===
 +
{{Out of date|The required package {{AUR|rxtx}} is no longer maintained or found in the [[AUR]]. {{AUR|java-rxtx}} replaces it.}}
  
Install rxtx from the [[AUR]].
+
Install rxtx from the [[AUR]].
  
 
At the time of writing, it is necessary to edit the PKGBUILD which refers to kernel26-headers so it refers to linux-headers.
 
At the time of writing, it is necessary to edit the PKGBUILD which refers to kernel26-headers so it refers to linux-headers.
Line 25: Line 27:
  
 
====Requirements (64 bit versions)====
 
====Requirements (64 bit versions)====
 +
{{Out of date|Editor's comment: this block is saved for posterity. Change made 08 December 2013.
  
 
The software expects 32 bit libraries, so some extra installations are required.
 
The software expects 32 bit libraries, so some extra installations are required.
Line 31: Line 34:
  
 
Install lib32-elfutils from the [[AUR]]. If you just have the standard gcc package, this will require replacing it with gcc-multilib
 
Install lib32-elfutils from the [[AUR]]. If you just have the standard gcc package, this will require replacing it with gcc-multilib
 +
 +
The required package {{AUR|rxtx}} is no longer maintained or found in the [[AUR]]. {{AUR|java-rxtx}} replaces it.}}
 +
 +
For mpide to communicate with the microprocessor board via USB, install the required USB packages.
 +
 +
$ sudo pacman -S libusb-compat libusbx
 +
 +
Then install the packages required by {{AUR|mpide}}:
 +
 +
$ sudo pacman -S java-rxtx avrdude avr-binutils avr-gcc avr-gdb avr-lib
  
 
===Software Install===
 
===Software Install===
Line 36: Line 49:
 
Download the current Linux install from [https://github.com/chipKIT32/chipKIT32-MAX/downloads here]. This was tested using file mpide-0022-chipkit-linux32-20110619.tgz
 
Download the current Linux install from [https://github.com/chipKIT32/chipKIT32-MAX/downloads here]. This was tested using file mpide-0022-chipkit-linux32-20110619.tgz
  
Untar the file in an appropriate location, I was using /aux. Note the use of the 'j' to preserve the flags for the file.
+
Untar the file in an appropriate location, I was using /aux. Note the use of the 'p' to preserve the flags for the file.
  
 
  cd /aux
 
  cd /aux
  tar xjvgp mpide-0022-chipkit-linux32-20110619.tgz
+
  tar xzvfp mpide-0022-chipkit-linux32-20110619.tgz
  
 
==Running the IDE==
 
==Running the IDE==
Line 49: Line 62:
  
 
This brings up the familiar Arduino IDE. You can set the Board Type to Uno32 or Max32 as you would when selecting a different Arduino board. The simplest way to test it is by using Example Blinky and changing the delay times so the LED is on for only 200ms (for example).
 
This brings up the familiar Arduino IDE. You can set the Board Type to Uno32 or Max32 as you would when selecting a different Arduino board. The simplest way to test it is by using Example Blinky and changing the delay times so the LED is on for only 200ms (for example).
 +
 +
==Troubleshooting==
 +
 +
Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier
 +
 +
MPIDE ships only with a 64 bit version of librxtxSerial.so, if you're on 32 bit, copy the librxtxSerial.so from the official arduino IDE into your lib/ folder, or obtain it from the rxtx website. Do not use the rxtx AUR packages, they are all utterly broken (require kernel 2.6) and even if you get them to work, mpide will not find the .so files installed by them.
 +
 +
  
 
==Links==
 
==Links==
  
[http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,719,896&Prod=CHIPKIT-UNO32 Uno32 page at Digilent]
+
* [http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,719,896&Prod=CHIPKIT-UNO32 Uno32 page at Digilent]
[http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,719,895&Prod=CHIPKIT-MAX32 Max32 page at Digilent]
+
* [http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,719,895&Prod=CHIPKIT-MAX32 Max32 page at Digilent]

Revision as of 23:31, 10 December 2013

ChipKit is a Microprocessor platform produced by Digilent Inc. which provides an Arduino like environment and a physically compatible board, but runs the much quicker and more powerful PIC32 series of Processors.

There are two boards, the Uno32 which has 128k of Flash and 16k of RAM, and the Max32 which has 512k of Flash and 128k of RAM. Both boards run at 80Mhz. Prices are $27 and $50 respectively, so comparable with standard and advanced Arduinos.

This install was for a 64-bit machine and an Uno32. I do not have a Max32 or a 32-bit machine, but the process should be identical for the hardware change, and simpler for the software change. However, the 32 bit install has not been verified.

At the time of installation I was running Java 7 and Kernel 3.0.1

Installation

Requirements (all architectures)

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: The required package rxtxAUR is no longer maintained or found in the AUR. java-rxtxAUR replaces it. (Discuss in Talk:ChipKit#)

Install rxtx from the AUR.

At the time of writing, it is necessary to edit the PKGBUILD which refers to kernel26-headers so it refers to linux-headers.

Install binutils-avr from the repositories.

This is required only because the ChipKit software needs the program avr-size. It comes with the rest of its own software. If you use Arduino on Arch you will know there is a nasty bug which means the current gcc-avr and binutils-avr do not work correctly. In that case do not install the new binutils-avr but use these PKGBUILDs here (untar them in /var/abs/local) which produce versions that do work correctly. You will need to add gcc-avr and binutils-avr to IgnorePkg = in /etc/pacman.conf to stop pacman upgrading them.

Requirements (32 bit versions)

libusb and libusb-compat are required, but may well be installed by default.

Requirements (64 bit versions)

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: Editor's comment: this block is saved for posterity. Change made 08 December 2013.

The software expects 32 bit libraries, so some extra installations are required.

Install lib32-libusb and lib32-libusb-compat so the software can communicate with the USB ports.

Install lib32-elfutils from the AUR. If you just have the standard gcc package, this will require replacing it with gcc-multilib

The required package rxtxAUR is no longer maintained or found in the AUR. java-rxtxAUR replaces it. (Discuss in Talk:ChipKit#)

For mpide to communicate with the microprocessor board via USB, install the required USB packages.

$ sudo pacman -S libusb-compat libusbx

Then install the packages required by mpideAUR:

$ sudo pacman -S java-rxtx avrdude avr-binutils avr-gcc avr-gdb avr-lib

Software Install

Download the current Linux install from here. This was tested using file mpide-0022-chipkit-linux32-20110619.tgz

Untar the file in an appropriate location, I was using /aux. Note the use of the 'p' to preserve the flags for the file.

cd /aux
tar xzvfp mpide-0022-chipkit-linux32-20110619.tgz

Running the IDE

You can run the ChipKit environment by changing to that directory and running mpide

cd /aux/mpide-0022-chipkit-linux32-20110619
./mpide

This brings up the familiar Arduino IDE. You can set the Board Type to Uno32 or Max32 as you would when selecting a different Arduino board. The simplest way to test it is by using Example Blinky and changing the delay times so the LED is on for only 200ms (for example).

Troubleshooting

Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/CommPortIdentifier

MPIDE ships only with a 64 bit version of librxtxSerial.so, if you're on 32 bit, copy the librxtxSerial.so from the official arduino IDE into your lib/ folder, or obtain it from the rxtx website. Do not use the rxtx AUR packages, they are all utterly broken (require kernel 2.6) and even if you get them to work, mpide will not find the .so files installed by them.


Links