gpsim

Screen Shots

Download

SVN

Install

Processors

Documentation

Support

Modules

Links

gpsim

gpsim is a full-featured software simulator for Microchip PIC microcontrollers distributed under the GNU General Public License, Version 2 or higher, and some of it's libraries under GNU Lesser General Public License, Version 2 or higher.

gpsim has been designed to be as accurate as possible. Accuracy includes the entire PIC - from the core to the I/O pins and including ALL of the internal peripherals. Thus it's possible to create stimuli and tie them to the I/O pins and test the PIC the same PIC the same way you would in the real world.

gpsim has been designed to be as fast as possible. Real time simulation speeds of 20Mhz pics are possible. ( A 'goto $' program runs at the same speed as a 25Mhz pic when simulated on my 400Mhz PII Linux Box. Of course, as you add stimuli and begin interacting with peripherals, the performance drops. But it's still fast!)

gpsim has been designed to be as useful as possible. (At least that's the intent - honest.) The standard simulation paradigm including breakpoints, single stepping, disassembling, memory inspect & change, and so on has been implemented. In addition, gpsim supports many debugging features that are only available with in-circuit emulators. For example, a continuous trace buffer tracks every action of the simulator (whether you want it or not). Also, it's possible to set read and write break points on values (e.g. break if a specific value is read from or written to a register).

gpsim is not fancy, but it's improving. It supports a good ol' fashioned CLI like gdb and a gui based on gtk.

Screen Shots

Register viewer

Source browser

Bread board viewer.

Scope viewer 1. Scope viewer 2.

Downloading

Linux

To build gpsim from the latest released source, download the source tarball .

If your distribution does not have a current or patched version of gtk+extra, then you should download gtk+extra, build it, and install it prior to building gpsim.

Windows

Borut Ra┼żem has ported gpsim to Windows and called the package "gpsimWin32". In addition, he's created a slick installer and makes regular snap shots.

SVN

The current gpsim SVN source can be browsed using the gpsim SourceForge SVN browser.

To get the gpsim SVN source tree for local build, follow the instructions for getting gpsim from SVN which provides a step-by-step description on how you can get the code.

Installing

Download the gpsim tar ball and type

tar -xvzf gpsim-0.x.y.tar.gz

Where 'x.y' is the version number. This will create a subdirectory called gpsim-0.x.y . All of gpsim's source code will be untarred to here. From there, you can read the README and INSTALL.gpsim files for more info. But they basically tell you to

cd gpsim-0.x.y
./configure This will create the Makefile
make <--- This will create the executable
su root if you have root privileges
make install places a copy of the executable in /usr/local/bin

Oh, don't forget to check the gpsim-0.x.y/examples subdirectory for some example asm and stimulus files...

Supported Processors
As processors are being added all the time, the best way to determine currently supported processors is to run the command "processor list" in the Command line of Gpsim

PIC10F200 PIC10F202 PIC10F204
PIC10F220 PIC10F222
PIC12C508 PIC12C509 PIC12CE518 PIC12CE519
PIC12F508 PIC12F509 PIC12F510
PIC12F629 PIC12F675 PIC12F683
PIC16C54 PIC16C55 PIC16C56
PIC16C61 PIC16C62 PIC16C62A PIC16CR62
PIC16C63 PIC16C64 PIC16C65 PIC16C65A
PIC16C71 PIC16C72 PIC16C73 PIC16C74
PIC16C84 PIC16CR83 PIC16CR84
PIC16C712 PIC16C716
PIC16F73 PIC16F74 PIC16F83 PIC16F84
PIC16F87 PIC16F88
PIC16F627 PIC16F627A PIC16F628 PIC16F628A
PIC16F631 PIC16F648 PIC16F648A PIC16F677
PIC16F685 PIC16F687 PIC16F689 PIC16F690
PIC16F818 PIC16F819 PIC16F871 PIC16F873
PIC16F874 PIC16F876 PIC16F877 PIC16F873A
PIC16F874A PIC16F876A PIC16F877A PIC16F882
PIC16F883 PIC16F884 PIC16F886 PIC16F887
PIC18C242 PIC18C252 PIC18C442 PIC18C452
PIC18F242 PIC18F248 PIC18F252 PIC18F442
PIC18F448 PIC18F452 PIC18F1220 PIC18F1320
PIC18F2221 PIC18F2321 PIC18F2420 PIC18F2455*
PIC18F2520 PIC18F4221 PIC18F4321 PIC18F4420
PIC18F4455* PIC18F4520 PIC18F4620 PIC18F6520

* USB functionality not supported (yet).

Documentation

Here's the current gpsim documantation gpsim.ps , gpsim.pdf, or gpsim.html.

Or if you prefer, here's the Lyx source gpsim.lyx.

Support

The gpsim-devel mailing list is devoted to gpsim specific issues. While primarily intended for gpsim development, this list may also be used as a user resource to ask any question.

In addition to the mailing list, bug reports and feature requests can be filed at the gpsim SourceForge tracker.

Modules

gpsim supports loadable modules. This means that it is is possible to add devices to gpsim that are totally separate from gpsim. They reside in their own libraries and are distributed separately. The goal, of course, is to provide the simulation infrastructure for users to easily construct a custom simulation environment.

gpsim provides a basic module library with the following components:

  • Pullup/Pulldown resistors
  • USART
  • switch
  • AND, OR, XOR, and NOT Logic Gates
  • Single or 7-segment LEDs
  • PAL Video emulator
  • Rotary Encoder
  • I2C EEPROM

The gpsim LCD module provides support for character LCD displays.

Related Links

gpasm - The GNUPIC assembler that is compatible with MPASM.

gpsim Source Forge Project page contains the SVN source for gpsim.

gpsim Native Win32 port.

Byte Craft is the creator of the .cod symbol file format.

The gnupic webpage has links to other pic tools. Paul Vollebregt has another gnupic webpage with links to tools for other microcontrollers as well.


This page is maintained by the gpsim administrators gpsim-devel
Last modified on $Date: 2013-04-02 22:04:37 +0200 (Tue, 02 Apr 2013) $.

This site is hosted by

SourceForge.net Logo

Valid XHTML 1.0!
Valid CSS!