GPICP Users Manual
Linux Graphical User Interface to PICSTART Plus, Warp-13 and JuPic Programmers
Copyright 2004-2005 by Jeffery L. Post
j_post <AT> pacbell <DOT> net
Version 0.1.0 - April, 2005
GNU General Public License
TABLE OF CONTENTS
Back to top
Introduction
Gpicp is a GUI wrapper for Andrew Pines'
Linux command-line program picp and for
gpdasm by Craig Franklin. Gpicp provides an easy to use GUI environment that
allows you to perform multiple operations, such as program several chips with
the same or different programs, read programs from PIC processors and save them
to hex files, and other functions with the
Microchip PICSTART Plus,
Newfound Electronics Warp-13, and JuPic
programmers. The graphics library used in gpicp is
SDL by Sam Lantinga.
Picp is now maintained by Jeff Post, and the latest versions of picp and gpicp
can be downloaded from
http://home.pacbell.net/theposts/picmicro.
Many thanks to Andrew Pines, Craig Franklin, and Sam Lantinga for producing
great free software upon which I could build gpicp.
Thanks also to Jim Robertson of
Newfound Electronics, who generously donated a Warp-13a programmer and
technical advice so that picp and gpicp would work with both the Warp-13 and
PICSTART Plus programmers. And a special thanks to Wayne Patterson who has
gone above and beyond the call of duty beta testing the code with the Warp-13
programmer.
Many thanks to Adam Jurkiewicz, who donated a
JuPic programmer. JuPic has turned out to be an excellent replacement for
the no-longer-available Warp-13 programmer. I highly recommend the JuPic.
Screenshot:
Gpicp user interface with X11 (appearance may vary somewhat with other
window managers)
The gpicp screen is divided into four regions. The main menu is the
topmost two yellow lines. Some buttons in the main menu bring up sub-menus
when you click on them. For example: clicking on the Serial Port button will
bring up a list of available serial ports to which the programmer may be
connected. The user must have read/write permissions for the selected
serial port. It is not recommended to run gpicp as root, rather set
the port permissions using chmod.
The next three dark gray lines are status outputs. They show the firmware
version of the programmer, the file selected (if one has been selected),
the serial port to which the programmer is connected, and the particular
PIC device currently selected.
The light gray line following the status outputs shows the current values of
the configuration bits and the ID locations. To modify either the configuration
bits or the ID locations, just click a mouse button on the displayed values,
and a dialog box will pop up in which you can enter new hexadecimal values.
The fourth and last region is the Program Memory Window. This window displays
the program memory contents in hexadecimal and ascii. You can move through the
PIC program space with the scroll bar to the right of the display. The data
displayed may have been loaded either from a hex file, or by reading the
program contents of a device in the programmer.
System requirements
Gpicp requires Linux, Simple DirectMedia Layer (SDL), and of course, picp and
(optionally) gpdasm. If you don't already have SDL, you will need to obtain it
from http://www.libsdl.org and compile or
install the runtime libraries for your system.
Gpicp, picp, and gpdasm are licensed with the GNU General Public License. SDL
is licensed with the GNU Library General Public License.
Back to top
The Main Menu
File Button
The main menu File button will bring up a file submenu:

Open - Brings up a file selector from which you can navigate directories and
select a hex file to read into the program buffer.
Reload - Reloads the currently selected program or data file.
Save - This button will write the program memory to a hex file. Any existing
file with the same name will be overwritten.
Save as - Same as the Save button, but you specify the filename (without
the hex extension--it will be added automatically).
Save configuration - Saves the currently selected Serial Port and PIC Device
in the file 'gpicp.cfg'. This file will be read whenever gpicp is run, and
will configure gpicp to use the specified port and PIC device. If you specify
an argument to gpicp, gpicp will interpret it as a directory name from which
to fetch the configuration file, otherwise the configuration file is read from
the current directory. The configuration file also contains information on the
current state of the 'byte addressing mode', the 'ascii word mode', and the
program and data files in use at the time the save configuration button was
clicked. These files will automatically be loaded into program and/or data
memory.
Exit - Quits GPICP. You can also quit by pressing ALT-X.
Close menu - Closes the file submenu. The submenu can also be closed by
clicking the main menu File button a second time.
File->Open file selector: click on a filename to select, then click the Ok button.
The selected file will be loaded into program memory. Clicking on a directory entry
will display all hex files in that directory. A file may also be loaded by
double-clicking or right-clicking on an entry in the file list without having to
click the Ok button.

Back to top
Serial Port Button
The Serial Port button will bring down a menu from which you may select
/dev/ttys0 through /dev/ttys3 as the port to which the programmer is
connected. Users must have read/write permission for the selected port. As
root, use chmod to set read/write permission for the port. It is
not recommend that you run gpicp as root.
Enable Programmer
This button will initiate communication with the programmer. If successful,
the firmware version will appear on the first status line just below the
main menu. You cannot perform any operation with the programmer until it is
enabled.
Device Button
Device selection: Use the scroll bar to the right of the device list to move
through the list. Then click on the device you wish to use (which will be
highlighted when you click on it), then click the Ok button (or the Cancel
button to cancel the selection). As with the file selector, a device may be
selected by double-clicking or right-clicking on the device entry without
having to click the Ok button.
Back to top
Read Button
The Read button brings down a submenu from which you select what you want to
read:
-
program - read program data into
the program memory window.
-
ID locations - read ID locations and display
ID data in the status line just above the program memory window.
-
configuration bits - read config bits
from the PIC processor and display above program memory window.
-
data - read PIC device data memory (for
devices with data memory).
-
cancel - cancel the read operation.
Help Button
The Help button brings up a submenu with a list of help topics:

Click on one of the help topics to bring up a text box with a brief description of
the item and information on its use. To close the text box, click anywhere within
the text box, click on another help topic, or click the "Close help menu" button.
About Button
This button will pop up a window with some totally useless information :-). To
remove the window, either click the About button a second time, or click
anywhere within the About text window.
Logging debug info
The checkbox at the right end of the first menu is used to enable communications
protocol debugging. If you are using picp-0.6.2 or higher, clicking this checkbox
will enable/disable comm line debugging. When enabled, all communications to/from
the programmer will be logged in a file named 'picpcomm.log'. If you discover a
bug in picp that you believe is communications related, enable comm line debugging
in gpicp, perform the failing operation, zip the picpcomm.log file, and email it
to me at the address given in the source code. Comm line debugging can be enabled
in the command-line picp by using the -c option as the first parameter to
picp (eg: picp -c /dev/ttyS1 16f84 -rd).
Back to top
Write Button
The Write button brings down a submenu from which you select what part of the
PIC device you want to program:
-
program - program memory.
-
ID - ID locations.
-
configuration bits - configuration bits.
-
data - data memory.
-
cancel - cancel the programming operation.
Note that programming the program memory will not program configuration bits or
ID locations, even if those were part of the program data loaded from a hex file.
Loading a hex file containing data for ID or configuration will update the ID or
configuration bits displays, but then config and ID must be programmed as a
separate operation. This is to allow you to verify the program memory before
setting configuration bits that might code protect the chip.
Erase
The Erase button brings down a submenu from which you select what part of the
PIC device you want to erase:
-
program - program memory.
-
ID - ID locations.
-
configuration bits - configuration
bits.
-
data - data memory.
-
flash device - erase everything
(for flash devices).
-
cancel - cancel the erase operation.
Note that selecting flash device may be the only way to recover if code
protection has been enabled in the configuration bits for flash devices. Also see
the Known Issues note on erasing.
Verify
The Verify button brings down a submenu from which you select what part of the
PIC device you want to verify. The data read from the programmer will be compared
to the data buffered in gpicp and a pop-up box will tell you if they match.
Regions which may be verified are:
-
program - program memory.
-
ID - ID locations.
-
configuration bits - configuration bits
-
data - data memory.
-
cancel - cancel the verify operation.
Blank Check
The Blank Check button will test to see if the PIC device in the programmer
is blank and reports the results for program memory, configuration bits, ID
locations, and data memory. Click the close button in the results
display box.
Edit cfg bits
This button brings up an input box in which you may modify the configuration bits.
Enter the new data in hexadecimal and click on Ok to accept the changes,
or Cancel to discard any changes. You may also bring up the input box
by clicking the mouse on the status display for the configuration bits.
Edit Id
This button brings up an input box in which you may modify the ID locations.
Enter the new data in hexadecimal and click on Ok to accept the changes,
or Cancel to discard any changes. You may also bring up the input box
by clicking the mouse on the status display for the ID locations.
Disasm
This button will bring up a new window in which the output of gpdasm for the
current program data will be displayed. The scroll bar at the right side of the
window allows you to view any part of the disassembled program. Unlike the main
gpicp window, the disassembly window can be resized.
Screenshot of disassembly window:
ISP button
The ISP button is used to toggle between picp and picp-isp as the programmer
interface. Normally this checkbox should be off. When using a Warp-13
programmer, the interface is slightly different if In-Circuit Serial
Programming is being used. Enable this checkbox only if you are
programming a chip on a board connected to the Warp-13 via the 5-pin connector
on the lower right side of the Warp-13. Do not enable ISP if you are
using a Picstart Plus programmer.
Status display
Programmer: This status line displays
the programmer firmware version number after communication with the programmer
has been established by clicking on the Enable Programmer button in the main menu.
File: This line displays the current file
name, if any file has been selected by File->Open or File->Save As.
Port: Displays the currently selected serial
port (/dev/ttys0 - /dev/ttys3).
configuration bits: Displays the current
configuration bits in hexadecimal.
ID: Displays the current ID locations in hexadecimal.
Program Memory Window
The Program Memory Window displays a 256-byte slice of the pic program code in
hexadecimal and ASCII. A scroll bar to the right of the display allows you to
move the window to any 256 byte segment of the code address space for the
particular PIC device selected.
The data in the program memory window cannot be modified in gpicp except by
opening a new file or reading program data from the programmer. If the program
is modified externally (e.g. by editing the source file and re-assembling),
you must re-open the file. (If you attempt to program a PIC device with data
that has been modified externally, gpicp will note that the program has been
modified and ask you if you want to reload the file before programming the
device.)
Clicking on the left end of the title bar for the program memory window will
toggle between display of program memory or data memory (for those PIC devices
that have data memory).
Byte addressing: This checkbox toggles
between word/byte addressing in the program memory display. Currently, only
18xxx devices are known to use byte addressing.
Word ascii: This checkbox toggles between
displaying ascii text for only the lower byte, or for both bytes of each word
in program memory.
Known Issues
The only reliable way to erase anything is with the erase
flash button. The other erase buttons may or may not work with
particular PIC devices. Please don't send me bug reports about the other
options unless you know they should work with some particular device.
The editing windows for ID and configuration data still need work. They're
usable, but not very efficient.
No sanity check is done on data entered for the ID locations and configuration
bits. If you attempt to program invalid data, the verification check will fail.
Some data in picdev.c is known to be incorrect. Due to these incorrect entries,
erasing the configuration bits may fail to verify. If this happens, enter known
valid data in the config bits field and use the program config bits feature.
Alternatively, you can use the erase device feature. If you have this problem
with a particular PIC device, and you know the correct data for that device,
please notify the author at the email address given in the source code.
Support for 18Fxxx devices has been tested only with 18f458 and 18f252 chips.
Bug reports regarding 18f chips will be greatly appreciated. Please email a zip
or gz file with the picpcomm.log file and any other relevant information.
Many functions have still not been implemented. Work is continuing on these
issues. Future versions of gpicp will allow editing of program or data
memory in the display window. Please send bug reports and feature wish lists
to the author at the email address in the source code. Comments on this
documentation are also appreciated.
Back to top