LWN.net Logo

gputils, the GNU PIC Utilities

gputils is a set of open-source cross-platform tools for developing code for the Microchip PIC processors. PIC processors are inexpensive stand-alone micro-controller chips that feature a RISC architecture, several data path widths, and a variety of memory and I/O port configurations. Over 250 PIC processor types are supported by gputils. The project was started in 1997 by James Bowman as an effort to build a complete set of open-source replacements for the Microchip utilities. Numerous other developers have contributed to the project.

gputils consists of the following components:

  • gpal: An Ada-like high level language compiler.
  • gpasm: The PIC assembler.
  • gplink: The PIC linker for joining object files.
  • gplib: A tool for building and maintaining COFF library archives.
  • gpdasm: A dis-assembler for converting hex files into assembly instructions.
  • gpvc: A .cod symbol file viewer for analyzing the assembler output.
  • gpvo: A COFF object file viewer for analyzing object files.
Several companion projects are available for gputils, including the gpsim PIC software simulator, the xgpasm GUI front end for gpasm, and PiKdev, a PIC IDE. PikDev allows the developer to connect to the PIC processor, via a serial or parallel interface, and download the code.

Building gputils is very straightforward, it involves the standard configure, make, and make install steps. The code is run in the manner of typical UNIX command line utilities. The build worked the first time for your editor.

Version 0.12.3 of gputils was recently released, it adds support for more processors in the ever-expanding line of PICs, it also includes bug fixes. The code is available for download here. The Support section of the gputils site has all of the available documentation.

Apparently gputils does not yet support the new PIC10F chips, these are possibly the smallest micro-controller chips available, featuring a tiny 6 pin SOT-23 package. Hopefully PIC10F support is being considered for future releases of gputils.


(Log in to post comments)

gputils, the GNU PIC Utilities

Posted Aug 5, 2004 12:32 UTC (Thu) by forthy (guest, #1525) [Link]

Calling the PIC a "RISC" processor with "various data path width" is a bit too much listening to marketing. The PIC is a typical retarded accumulator-oriented 8 bit microcontroller, like most other 8 bit microcontrollers, too. It's incapable of doing almost anything (like indirect addressing), but that's not because the instruction set architecture was reduced. There was nothing to take away. The only data path that changes size over different PICs is the instruction bus. Since you can't read data out of the instruction memory, it's opaque to the programmer.

The "high end" PICs like PIC17 and PIC18 have such "advanced features" as indirect addressing of the data (on PIC16, too), and also allow to access the program space (one byte at a time, one pointer only).

Anyone who remotely considers to use a PIC should look at the MSP430 from Ti first. The price for this chip is competitive, it's a real orthogonal, modern 16 bit architecture, there's a GCC for it available (real C!), and that's excluding the abilities of the integrated peripherals (especially the ADCs), the ultra-low-power consumption and so on.

I can't understand why retarded architectures like PIC, 8051, or such have a snowball's chance in hell today. But apparently, there are ways too many people out there who think they can't learn a new thing.

gputils, the GNU PIC Utilities

Posted Aug 6, 2004 19:24 UTC (Fri) by dmag (subscriber, #17775) [Link]

1) Yes, RISC/CISC doesn't mean much today. But the PICs are definately more RISC (Reduced Instruction Set) than CISC (Complex Instruction Set). How can you complain that it's missing your favorite addressing modes, and not call it RISC?

2) The "various data path widths" are not opaque to the programmer. There are actual instruction-set differences between the 12-bit and 14-bit instruction sets. This radically changes code effeciency, among other things.

3) "look at the MSP430 from Ti first". I looked. They don't have anything less than 20 pins, and the one I looked at only went up to ~10MHz. My favorite PIC is the 20MHz 8-pin one. You can do interesting things with PICs.

4) "modern 16 bit architecture". Ha Ha. "16-bit" and "modern" in the same sentance. That's funny... Anyway, some people really don't need 16-bits. That's why they still make 8-bit micros. In fact, they sell more 8-bit micros than 16-bit micros, 32-bit micros and 64-bit micros COMBINED.

5) "I can't understand why retarded architectures like PIC, 8051, or such have a snowball's chance in hell today." Aha! now I see your problem. You've never been near a cost-sensitive application, have you? PICs are not for you, they are for the people who designed your TV remote, your mouse, your smartcard, your smart batteries, etc.. (In the future, please don't badmouth things you don't understand.)

Copyright © 2004, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds