Bash scripts for using gcbasic and gcboot with a Linux GUI...

gcb_compile   compiles a source file using the internal assembler
gcb_extasm    compiles a source file using an external assembler
gcassembler   run by gcb_compile_extasm, set to use gpasm
sendhex       sends a hex file to the gcboot bootloader

NOTE - gcb_compile and gcb_extasm must be edited before use!
change /path/to to the full directory containing the files.
If the file is in a path directory then remove /path/to/
Directories and filenames must not contain spaces.

The scripts can be put in a convenient directory, or if desired
a path directory such as /usr/local/bin or in the same directory
as gcbasic with the directory gcbasic is in added to the path.
The scripts must be given execute permissions.

The scripts use the xterm command terminal, usually installed
but if not either install it or edit gcb_compile and gcb_extasm
to use something besides xterm. The xterm terminal is simple and
most likely to work without issues (Gnome terminal, Konsole, etc
often require extra command line options that vary between distros).

The gcassembler script requires gcasm from the gputils package,
available from: http://gputils.sourceforge.net/
The gputils source needs to be compiled (./configure then make)
and installed (sudo make install).

In a Linux GUI such as KDE Gnome etc, associate .gcb source files
(or text, or whatever extension is used for gcbasic source files)
to the gcb_compile and to the gcb_extasm scripts. Associate .hex
files (or text) to the sendhex script. Likely you'll also need
a text editor associated to these files and made the default.
Most Linux systems do not associate specifically by extension
and may consider both file types as plain text. To separate the
associations a mime editor such as Assogiate can be used to
create separate mime types.

To compile a gcbasic source file, right click it and select
either gcb_compile or gcb_extasm depending on if you want to
use the internal assembler or the gpasm assembler. The resulting
.asm .lst and .hex files should appear in the same directory as
the source being compiled.

The sendhex script is designed to copy a .hex file to the serial
port to load it into the gcboot bootloader, a slight delay is
added after each line to allow for programming delays. At the
end of the hex file, a "x" (and a linefeed) is sent to tell
the bootloader to run the app, avoiding to have to unhook the
serial port to test, edit the script if this is not desired.
A 9600 baud terminal emulator can be running at the same time
to monitor progress, or watch the LED (gcboot uses pin B.0 as
a status LED). To use, right click a .hex file and select sendhex.

In addition to these scripts, I also use the pk2cmd program to
program PIC chips using the Pickit 2 programmer. The following
command line programs a hex file into the PIC...

pk2cmd -T -R -M -P -F program.hex

...the PIC remains powered and is given a MCLR reset after programming.
To power and reset the PIC without programming use the command...

pk2cmd -P -T -R

I have not been able to get the pk2cmd program to work from a
right-click GUI option, have to use the actual command line.
The pk2cmd program is available from the Microchip web site
(http://www.microchip.com), search for DV164120.

-----------------------------------------------------------------------

This software is public domain and provided as-is without warranty
of any kind. Under no circumstances shall the author(s) of the software
be held liable for any damages of any kind. The user assumes all
responsibility for determining fitness for a particular purpose or
system, inspect the software carefully before using.

-----------------------------------------------------------------------
