The GCC4TI Integrated Environment

The GCC4TI IDE is a freely distributable Integrated Environment for GCC4TI, written by Sebastian Reichelt (retired years ago from TI-68k programming). It is easy to use, even for unexperienced programmers. This part of the documentation was written by Sebastian.

Note: If you want to use the command-line compiler to compile .tpr files produced by the IDE, you can use the tprbuilder utility. It takes the name of a .tpr file as a single parameter. You may have to tweak your source files a little, as the IDE uses a different compilation scheme.


Configuring the IDE

Click on 'File/Preferences'. In the 'Preferences' dialog box, you can customize the IDE with various options. Some options are very important, others are simply user interface settings.

If you want to be able to cancel compiling operations more quickly, you can choose to force-quit the application used for the process. This is not recommended, however, and can make your system unstable. If you do not choose this option, the IDE compilation window remains on the screen until process is finished. If you click on 'Stop' again, the process will finally be terminated. If you choose this option, you should also activate the 'Auto-Save' option.

If you want to be able to react to compilation errors more quickly, you can choose to stop compilation when the first file was not compiled successfully. Otherwise, the IDE compiles all files, displaying all errors in the error list.

When a program is compiled, usually assembly as well as object files are produced and stored in the project folder. You can have them deleted automatically after the program was linked successfully.

There is one extremely important option: the automatic splitting of source files into more lines. This is done in order to accurately find the position of errors in your code. It might, however, result in an error being reported when there is nothing wrong with the code. This is unlikely, though, since this option has been tested very thoroughly.

Another important option is the Template Wizard. It helps you to get started with a project when you add your first file. If you disable it, default options will automatically be used.

To be able to run your program directly from the IDE, you need to specify either to run on VTI, on TIEmu, or you need to select your link port and cable type. Do this in the 'Transfer' tab. You can switch between the two very quickly by pressing Shift+Ctrl+Alt+F9.

In the 'Syntax Highlighting' tab, you can set your own settings for both ASM and C files. If syntax highlighting takes up too much time when opening a project, you may want to disable it.

To customize syntax highlighting, you can specify your own colors and styles for different types of characters using the buttons provided. To set colors and styles for comments, strings, and compiler directives, use the tree at the bottom of the dialog. To edit such a 'custom style', double-click on it. You can also specify the exact beginning and end, using '#13' as substitute for the end of the line.

In this tree, you can also create your own custom set of words that are supposed to be highlighted some way. Only a list of reserved words is included by default, but you can add lists of your own if you want to.


Starting a New C Project

Click on 'File/New/Project'. If the project you had opened before has been modified, you are informed about it, and you have the choice to save your project first.

When you create a new project, it is best to save it first in order to give it a file name. Click on 'File/Save Project As...' and save your project. Note that the executable files (*.89z; *.9xz; *.v2z) are saved with the same name as your project file, even if it is a long file name. To specify the name your program gets when it is transferred to the calculator, click on the top item in the project tree twice in a row in order to rename it (optionally including a folder name). Of course, the same restrictions apply as to calculator variable names. For other options, look under 'Project/Options...', especially 'Program Options...' in the 'Compilation' tab.

After you did that, you need to create a new C file to start with. Click on 'File/New/C Source File'. A file template is displayed, where you can simply add your code at the position where it says:

// Place your code here.

Click on 'Help/Index' for a complete documentation of functions supported by the GCC4TI Library, and you can start programming.


Starting a New Assembly Project

To start a new Assembly project, you have to perform the same steps as for a C project; the only difference is that you have to click on 'New/GNU Assembly Source File' or 'New/A68k Assembly Source File' instead. Note that you can also have a mixed project with both file types. Assembly projects are not supported and tested as well as C projects.


Adding Existing Files

To add an existing file, click on 'Project/Add Files...' and select the files you want to add. These can be C or Assembly source files, header files, or object files. Generally you can include any file that belongs to your project, even text files, in order to edit them and to keep them together. Source files always have to be added to the project in order to be found.


Using Header Files

Header files can be either C or Assembly files. If you know enough about C, you can create C-style header files, create C source files implementing the functions defined in the header files, and export functions from them. Note that you always have to add the header and either the source or object files if you want to use them in another project. There is also a common include folder for general-purpose header files.

When you create a C-style header file, you can only include it in C source files. Similarly, if you create an Assembly-style header file, you can only use it in Assembly source files.

For tab width and syntax highlighting, it is necessary that you indicate what type of header file you are creating by using a comment at the beginning. If you enabled the Template Wizard, you can choose what type of header file you want to create.

Files included in A68k files with 'incbin' have to be in the 'other files' section.


Saving and Renaming Source Files

To rename a source file, simply rename it in the project tree. To save it with a different name, click on it with your right mouse button, and select 'Save As...' from the popup menu.

To save changes to a file, right-click on it and select 'Save'. You can also click on 'File/Save All' to save all files.


Editor Features

To print the current source file, click on 'Print...' from the menu or the toolbar. To find or replace text, use the 'Find' menu. There you will also find a menu item to jump to a function in the editor. Note that this can be done much quicker using the toolbar.

If you want to open a source file whose name is in the current source code, move your cursor to the file name and press Ctrl+Enter. If the file is not included in the project, it will be opened in a popup editor.

If the cursor is on an identifier, press F1 to display help on that identifier.

You can use Ctrl+Tab or Ctrl+G to switch between source files. Files in the project tree which are not visible at the moment are skipped.

Press Ctrl+Space or Ctrl+M to activate auto-completion for the current word. Press Ctrl+J to use a predefined template.


Compiling and Running your Program

To compile and run your program, press F9, or select 'Run' from the 'Debug' menu. Like 'Project/Make', this will perform all the steps necessary to create the executable file; then it will send the file to the device or program you specified in the preferences. If some files are not compiled, but they have been changed or need to be recompiled for some reason, click on 'Project/Build'.

You can also choose only to compile all files without creating an executable file by clicking on 'Compile'. A 'Compile' item is also available for each source file in the popup menu of the project tree.

If you need to change the link order of files, you can do this by dragging a file to another place in the same file group. You can use drag and drop also to move files between categories.

In the project options, you can specify how your program is built. This also includes automatic compression. If you use this feature, two files will be compiled: a small starter program and a compressed program file. The on-calc variable name that you specify cannot be the same as the on-calc variable name of your program (which will be the name of the starter program in this case).

In the same dialog, you can also enter the starting parameters for your program. These parameters are pasted into the command line between the parentheses.

If one or more errors were found when compiling, an 'Errors and Warnings' box is displayed at the bottom of the main window. If you click on an error, the IDE jumps to the position in the source file where the error occured, if the position is available.

The compiler stops at errors, but not at warnings. To turn warnings off, use the switches available in 'Project/Options...'. Click here for details about switches supported by the GCC compiler. Note: Not all of these switches can be used from the IDE.

If you are experienced in the use of GDB to track down runtime errors, the 'Debug Information' option may help you. If you set it, GCC4TI will generate a .dbg file which allows you to debug your program using a GDB-enabled version of the TiEmu emulator.


Special Features

Auto-Indenting:

If you press Enter in the editor, the cursor will be under the first non-whitespace character of the previous line.

Auto-Blocks:

If you press '{' on a new line, the corresponding '}' is created automatically, and all formatting with tabs is done automatically as well. You can disable this feature.

Error Tracking:

Even if you edit a source file, clicking on an error will still jump to the correct position. Optionally, error list entries are deleted when you delete the character that caused the error.

File Date Checking:

Files are compiled only if they were modified since the last compilation.

Keyword Search:

Pressing F1 on a GCC4TI Library function or a keyword will search the index for that function.

Code Auto-Completion:

The editor implements several features to make writing code using the predefined library calls easier.


Planned Features


Disclaimer

I cannot be held responsible for any error or system failure caused by this program or any programs related to it. Use this program at your own risk.


Feedback

Feel free to contact us if you have any questions, comments, or bug reports. If you found a bug, please don't just think we will probably find it, because we probably won't. Instead, please use the ticket tracker at http://trac.godzil.net/gcc4ti/.


Version History

Version 2.96 (June 2009) - GCC4TI

Version 2.95 (January 2009) - GCC4TI

Version 2.94 (October 2006) - TIGCC

Version 2.93 SP1 (July 2006)

Version 2.93 (April 2005)

Version 2.92 (August 2004)

Version 2.91 (November 2002)

Version 2.9 (December 2001)

Version 2.8 SP3 (November 2001)

Version 2.8 SP2 (September 2001)

Version 2.8 SP1 (April 2001)

Version 2.8 (March 2001)

Version 2.71 (November 2000)

Version 2.7 (October 2000)

Version 2.6 (June 2000)

Version 2.5 (May 2000)

Version 2.4 (May 2000)

Version 2.3 (May 2000)

Version 2.2 (May 2000)

Version 2.11 (May 2000)

Version 2.1 (May 2000)

Version 2.0 (May 2000)

Version 1.0 (April 2000)


Return to the main index