File Types

Top  Previous  Next

Here are the files that make up a project:

 

tide_icon_tprThe project file (.TPR) lists all other files in the project, along with their types.

There is also a second project file with the .TPRUSR extension. It remembers the project state (breakpoints, opened files, cursor positions in files, etc.). This file is "expendable". TIDE will (re)create it if this file isn't found.

 

tide_icon_tbhBASIC and C header files (.TBH and .TH by default). Used for inclusion into other files. Typically contain declarations of global variables, constants, #defines, etc.

The use of header files is optional. A project may contain multiple header files.

Just adding header files to the project tree isn't enough — they won't be compiled in unless you use the include statement. In fact, the header files are in the tree only for your editing convenience, nothing else.

 

tide_icon_tbsBASIC and C code files (.TBS and .TC by default). Contain the actual source code of your project.

A project must have at least one BASIC or C code file. Mixing BASIC and C within a single project is also OK.

Each code file in the project tree will be compiled in (unless there is a condition preventing this).

 

tide_icon_htmlHTML files (.HTML by default). Contain HTML pages. These may include blocks of executable code for generating dynamic HTML output (see Working with HTML).

The use of HTML files is optional. You only need them if you want to access your device as a "webserver". A project may have more than one HTML file.

 

Each HTML file in the project tree will be compiled in (unless there is a condition preventing this).

There are two types of HTML files, as defined by the file type:

HTML files that allow including BASIC code;

HTML files that allow including C code.

 

Resource files. These are added into the .TPC binary without any modification.

Each resource file in the project tree will be added to the compiled binary (unless there is a condition preventing this).

Types of resource files:

Text files (.TXT, .CFG, .INI by default). Can be edited from within TIDE.

Configuration files (.XTXT by default). These are text files that have configurators associated with them.

Image files (.BMP, .ICO, .PCX, .JPG, .PNG, .GIF by default):

The lcd. object can output BMP image files onto graphic LCD displays (see lcd.bmp);

Image files can also be referenced from HTML pages.

Binary files (.BIN by default). These contain generic binary data that may be needed by your application (lookup tables, etc.).

About file extensions and types

Only the .TPR and .TPRUSR files has a fixed file extension. Extensions of all other file types listed above are just "common default extensions" that TIDE understands. They have no direct bearing on how TIDE treats the files.

Rather than looking at the extension, TIDE memorizes the type of each file as specified in the Add New File to Project and Add Existing File to Project dialogs.

The file type can also be changed at any time by right-clicking on the file and selecting Change Type.

It must be noted that while TIDE doesn't care about the extensions, the outside world very often does. Having a  BMP file hiding under the .ABC extension will work with the lcd.bmp method but referencing this file from the HTML page won't always work, as you browser will not know what to do with .ABC files.