The scripts provided are intended to assist in the creation of the ASM file (from a GCBASIC source file), creation of the HEX file (also from a GCBASIC source file), and to support programming operations (often called `FLASH`ing the microcontroller).
| Script | Usage | Example |
|---|---|---|
|
|
To compile the GCBASIC source program to create the ASM. |
|
|
|
To compile and assemble the GCBASIC source program to create the ASM and a microcontroller-specific HEX file. |
|
|
|
To compile, assemble the GCBASIC source program to create the ASM and a microcontroller-specific HEX file, and then to program the microcontroller |
|
Examples
There are multiple constructs to run multiple programs on a single command line. The most common are ; and &&.
To run another command immediately after running makehex.sh, use the following:
makehex.sh sourcefile.gcb; anothercommand
To run another command only if makehex.sh does not exit with an error, such as a compiler error, use the following:
makehex.sh sourcefile.gcb && anothercommand ' <<< running a follow-on command only if compilation succeeded
Key line: makehex.sh sourcefile.gcb && anothercommand — the shell && operator only runs anothercommand if makehex.sh exits with a success status; a compiler error causes makehex.sh to exit with a failure status, which skips anothercommand entirely, unlike the ; form above it, which always runs the second command regardless.
See Also:
- Overview - Apple macOS GCBASIC — the equivalent instructions for macOS
- Overview - FreeBSD GCBASIC — the equivalent instructions for FreeBSD

