The TIGCC IDE is a freely distributable Integrated Environment for TIGCC, written by Sebastian Reichelt. It is very 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.
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.
You can have the IDE automatically check the Official TIGCC Site for new headlines on startup. This way you always know whether there are any updates, like new beta versions to test.
To be able to run your program directly from the IDE, you need to specify either to run on VTI, 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.
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 TIGCC Library, and you can start programming.
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.
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.
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.
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.
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.
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, TIGCC will generate a .dbg file which allows you to debug your program using a GDB-enabled version of the TiEmu emulator.
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 TIGCC 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.
A built-in debugger
A sprite editor producing C or ASM header files
Program context help
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.
Feel free to contact me if you have any questions, comments, or bug reports. If you found a bug, please don't just think I will probably find it, because I probably won't. Instead, please use the bug report form at tigcc.ticalc.org immediately.
Version 2.94 (October 2006)
Improved keyboard accelerators (added missing ones and fixed conflicting ones).
Added Only at beginning of line checkbox to the Edit Custom Style dialog.
Fixed inverted logic bug in approximate matching for prototype helps.
Fixed detection of '??=' in source file splitting.
Changed the Debug menu to use TiEmu (20061030 or later) instead of VTI as the emulator target.
Version 2.93 SP1 (July 2006)
Various minor bugfixes.
Version 2.93 (April 2005)
Added support for Mlink-format relocs.
Added support for Windows XP theming.
Added support for DWARF 2 debugging information.
Fixed multi-line strings in macros in the source splitter.
Version 2.92 (August 2004)
Added support for the new linker, which is now a DLL.
Added support for data variables.
Added support for on-calc folder names.
Removed the Template Wizard in favor of global program options.
Added a template for comment data.
Added support for virtual folders used when compiling programs.
Added an option not to jump to the first error.
Integrated the calculator linking code into the program.
Made project loading faster by not loading all files immediately.
Added ability to copy error messages to clipboard.
Added code completion patches by Ephyx.
Various minor fixes and additions.
Version 2.91 (November 2002)
Replaced the title and wizard images and the icons by new ones created by Gereon Kindler.
Implemented storing file names in relation to the project directory.
Added optional drag and drop text editing.
Speeded up source file splitting.
Implemented a "Remove Trailing Spaces" feature.
Version 2.9 (December 2001)
Added a recent files list.
Added a customizable tools menu.
Added the possibility to move files between categories.
Changed the search function to search through all files.
Added a window showing the complete output of the program called most recently.
Changed the print function to use the Windows driver instead of printing directly.
Added proxy support in the news download.
Changed the role of Tab and Shift+Tab to indent and unindent selected text, and enabled Shift+Backspace.
Added support for the 'incbin' A68k directive with 'other files'.
Added the possibility to specify a path for Virtual TI.
Added 'none' as a possible target to send the file to.
Fixed a bug with overwriting existing files.
Implemented selection by holding down Shift and clicking.
Fixed the editor to be able to display all fixed-width fonts.
Fixed the function list to be more reliable.
Version 2.8 SP3 (November 2001)
Fixed the bug which would make closing large files really slow.
Implemented a Ctrl+Tab shortcut to switch between files.
Version 2.8 SP2 (September 2001)
Introduced special mouse wheel support for people with wheel problems.
Added the possibility to run a batch file after building.
Added a detection to warn if a file was modified on the disk.
Version 2.8 SP1 (April 2001)
Fixed send to calc/VTI support for the TI-92 Plus.
Shift+Ctrl+Alt+F9 shortcut for calc/VTI switch.
Version 2.8 (March 2001)
Background compilation.
Support for linking multiple files through the GNU linker.
Support for creating and using archives.
Creation of debug information in the .s file.
Drag and drop support from the explorer.
Headline download (manually and automatically).
Send to calc/VTI support.
Version 2.71 (November 2000)
Support for GNU assembly files.
Fixed support for BSR calls.
Support for compressing files.
Automatic inclusion of patches.
Better automatic '{...}' blocks.
Support for viewing compiler output.
Version 2.7 (October 2000)
Completely self-written new editor with syntax highlighting.
Support for opening external files.
Support for version 2.2 of the TIGCC Library.
Support for the newly recompiled version of TIGCC.
Function menu.
Automatic '{...}' blocks.
Shortcuts for increasing and decreasing the indent.
Source file splitting to find error positions.
Complete error tracking and deletion.
Version 2.6 (June 2000)
Part of TIGCC package from now on.
Fixed a lot of bugs.
Included help file by Philipp Winkler.
Works with new folder structure.
Customizable link order.
Progress bar with stop button for syntax highlighting.
More preferences.
Compilation animation.
Floatable toolbar.
Startup screen.
Version 2.5 (May 2000)
Included ASM syntax highlighting.
Included support for version 2.0 of the TIGCC library.
Updated error list.
Fixed C/ASM bug in previous release.
Version 2.4 (May 2000)
Updated preferences dialog.
Customizable syntax highlighting.
Version 2.3 (May 2000)
Never officially released.
Syntax highlighting (no customization; C only).
Version 2.2 (May 2000)
Never officially released.
Bugfixes.
New compilation window.
Bringing VTI into foreground.
Version 2.11 (May 2000)
Editor bugfixes.
Version 2.1 (May 2000)
File date checking bugfix.
More IDE options.
Find and print functions.
TIGCC installer.
Ctrl+Enter shortcut.
Word wrap (now uses rich text edit control).
Version 2.0 (May 2000)
Never officially released (beta) (too many missing features and bugs).
File date checking.
Assembler bug workaround.
Stable force-quit operation.
Toolbar, status bar, icons in menus.
More editor options.
Header file error display.
Version 1.0 (April 2000)
Initial release.
Included all three programs.
Fully functional IDE.
Extraction of errors from all three programs.
Almost 100% accurate error tracking.
Use of projects.