Introduction: GCBASIC maintenance covers the key processes that the developers use to maintain and build the solution.
These insights are not distribution-specific.
Solution Architecture: These components are key for a complete solution:
- GCBASIC installer
- GCBASIC chip-specific .DAT files
- GCBASIC Help
- GCBASIC IDE
GCBASIC installers:
The Windows GCBASIC installer uses the InnoSetup installer, with packaging completed using R2Build.
The process uses a Gold build structure. The R2Build software creates four packages for Windows and one package for the Linux distribution. The process is automated with automatic versioning and configuration.
The macOS GCBASIC installer uses the Packages installer (Packages) with packaging completed using the Bourne shell script pkg2dmg.sh to create a compressed disk image file containing the installer.
GCBASIC chip-specific .DAT files:
What are the .DAT files?
The DAT files are the GCBASIC representation of the capabilities of a specific microcontroller. The DAT is based upon a number
of vendor sources, and corrections/omissions added by the GCBASIC development team. The DAT file is exposed to the user program
as a set of registers and register bits that can be used to configure the program in terms of the microcontroller specifics.
The process to create the .DAT file for microcontrollers is as follows:
| Step | Description |
|---|---|
|
1 |
Obtain the MPASM *.INC or the AVR *.XML files to be used. These files determine the scope of registers and register bits. |
|
2 |
For Microchip only. Place the source INC files in Process the file using This preprocessing will examine all the INC files in the |
|
3 |
Update the database of supported microcontrollers. This database contains the microcontroller configuration that GCBASIC requires as the core information for the DAT files. The database is called The database fields are controlled by the GCBASIC development team, and the specification of the database may change between releases to support new capabilities. Database fields will have the suffix |
|
4 |
Update the The format of each line is Each line is comma delimited, and spaces are NOT critical. Essentially, the processing will find a partial line and replace or append the whole line. example: |
|
5 |
If required. This is not normally edited. Update the |
|
6 |
Maintain the conversion program. The conversion program may require maintenance. The programs are written in FreeBASIC and therefore require compilation. An example of maintenance is when a new variant field is required. The source program will need to be updated to support the new variant - simply edit the source, compile, and publish. Another example is the addition of a new interrupt - follow the same process to edit, compile, and publish. |
|
7 |
Execute the program to convert the source files to the DAT files for Microchip or AVR. There are two programs, one for each architecture. Executing the conversion program without a parameter will process ALL the entries in the database (the csv file); passing a single parameter to the conversion program will only convert that single microcontroller. The conversion program will process as follows: a) Read the database for the chip specifics. b) If a .DEV file or .INFO file is not present, a routine called GuessDefaultConfig is invoked. This method sets the bit(s). In all cases, the default mask is sometimes specified for a particular config option, and that is used for ASMConfig. See the section below for the processing of a .DEV file. c) For all microcontrollers, read the d) For 18F microcontrollers, read the e) Create the output DAT file. |
|
8 |
Test and publish the DAT file(s) to the distribution as required. |
An example of the processing of a .DEV.
This is the 18F25K20 example. For this microcontroller, Disabled is default:
Where the default is selected from the Info_Type.
Prog =. An explanation of the parameter.
The Prog value is measured in words. It is the same in the device-specific .dat files.
Microchip have used words in the past, but then started using bytes on the website instead, to make their chips appear to
have larger capacity.
An example: if a device has 8192 words, which is 8192 * 14 = 114688 bits, or 14336 bytes. It is an odd measurement, because
dividing 14336 by 14/8 to see how many instructions you can use is extra maths work within the compiler.
GCBASIC’s PROGram memory analysis is in words.
See Also:
- Development Guide — coding, testing, and documentation contribution guidelines

