Toolset reference manual
May 1995
INMOS document number: 72-TDS-487-00
458 Pages
© SGS-Thomson 1995.
About this manual
This manual is the Toolset Reference Manual and it is designed to cover the following products:
- ST20 toolset;
- ANSI C toolset;
- occam 2 toolset;
for the following hosts:
- IBM 386 PC compatible running MS-DOS
- Sun 4 systems running SunOS or Solaris.
This manual provides reference material for each tool in the toolsets including command line options, syntax and error messages. Many of the tools in the toolset are generic to several toolset products e.g. the ST20 toolset, the ANSI C toolset and the occam 2 toolset and the documentation reflects this. Examples are given in C. The appendices provide details of toolset conventions, processor types, the ANSI C assembler, memory configuration files and the configuration languages.
A list of the tools supported by your particular toolset is given in the 'User Guide' which accompanies your toolset. References in the documentation to tools, languages or processor targets which do not apply to your toolset, should be ignored.
Contents
Contents overview Preface About this manual About the toolset documentation set Other documents Documentation conventions
Tools
1 icc - ANSI C compiler 1.1 Introduction 1.2 Running the compiler 1.2.1 Input/output files 1.2.2 Transputer targets 1.2.3 Error modes 1.2.4 Default command line options 1.2.5 Search paths 1.2.6 Using the assembler 1.2.7 Using the compiler preprocessor 1.2.8 Compatibility with other C implementations 1.2.9 Software quality check 1.2.10 Runtime checking options 1.2.11 Compactable code 1.3 Compiling with optimization switched on 1.3.1 Advantages of enabling optimization 1.3.2 When optimization should not be used 1.3.3 Optimization options 1.3.4 Enable side effects information messages 1.3.5 Disable side effect warning messages 1.3.6 Language considerations 1.3.7 How to use feedback information to improve optimized code quality 1.4 Memory map 1.4.1 Notes on the compiler memory map format 1.5 Compiler directives 1.5.1 #define 1.5.2 #elif 1.5.3 #else 1.5.4 #endif 1.5.5 #error 1.5.6 #if 1.5.7 #ifdef 1.5.8 #ifndef 1.5.9 #include 1.5.10 #line 1.5.11 #pragma 1.5.12 #undef 1.6 Compiler predefinitions 1.6.1 Macro names 1.6.2 Other predefines 1.7 Transputer inline code 1.7.1 Inlined functions 1.8 Compiler diagnostics 1.8.1 Message format 1.8.2 Severities 1.8.3 Standard terms 1.8.4 Information messages 1.8.5 Warning diagnostics 1.8.6 Recoverable errors 1.8.7 Serious errors 2 icconf - configurer 2.1 Introduction 2.2 Configuration language implementation 2.3 Running the configurer 2.3.1 Default command line 2.3.2 Boot from ROM options 2.3.3 Support for INQUEST 2.3.4 Virtual routing processes 2.3.5 Mixed language programming 2.3.6 Configurer library files 2.3.7 Standard include files 2.3.8 Configuration description examples 2.3.9 Search paths 2.3.10 Default memory map 2.3.11 System processes 2.4 Configurer messages 2.4.1 Information 2.4.2 Warnings 2.4.3 Errors 2.4.4 Serious messages 2.4.5 Fatal errors 3 oc - occam 2 compiler 3.1 Introduction 3.2 Running the compiler 3.2.1 Default command line arguments 3.3 Filenames 3.4 Transputer targets 3.5 Error modes 3.6 Enable/Disable Error Detection 3.7 Enabling/disabling warning messages 3.8 Support for debugging 3.9 Channel input/output 3.10 Separately compiled units and libraries 3.11 Code insertion using ASM 3.12 Memory map 3.13 Compiler directives 3.13.1 Syntax of compiler directives 3.13.2 #INCLUDE 3.13.3 #USE 3.13.4 #IMPORT 3.13.5 #COMMENT 3.13.6 #OPTION 3.13.7 #PRAGMA 3.14 Error messages 3.14.1 Warnings 3.14.2 Errors 4 occonf - occam configurer 4.1 Introduction 4.2 Running the configurer 4.3 Default command line 4.4 Search paths 4.5 Configurer library files 4.6 Boot-from-ROM options 4.7 Configuration error modes 4.8 Enable/Disable Error Detection 4.9 Enabling memory re-ordering and placement 4.10 Channel input/output 4.11 Virtual routing 4.12 Enabling/disabling warning messages 4.13 ASM code 4.14 Support for INQUEST 4.15 Default memory map 4.15.1 LoadStart 4.15.2 System processes 4.15.3 Configuration description examples 4.16 Configurer diagnostics 4.16.1 Warning messages 4.16.2 Error messages 5 icollect - code collector 5.1 Introduction 5.2 Running the code collector 5.2.1 Examples of use 5.2.2 Default command line 5.2.3 Input files 5.2.4 Output files 5.3 Program interface for occam unconfigured programs 5.3.1 Interface used for 'T' option 5.3.2 Interface used for 'T' and 'M' options 5.4 Memory allocation for unconfigured programs 5.4.1 C programs 5.4.2 occam programs 5.4.3 Memory initialization errors 5.4.4 Small values of IBOARDSIZE 5.5 Clearing memory 5.6 Non-bootable files created with the K option 5.6.1 File format 5.7 Boot-from-ROM output files 5.8 Alternative bootstrap schemes 5.9 The memory map file 5.9.1 Configured program boot from link 5.9.2 Unconfigured (single processor), boot from link 5.9.3 Boot from ROM programs 5.10 Reducing the amount of memory used - 'Y' option 5.11 Error messages 5.11.1 Warnings 5.11.2 Serious errors 5.11.3 Fatal errors 6 iemit - memory interface configurer 6.1 Introduction 6.2 Running iemit 6.3 Output files 6.4 Interactive operation 6.4.1 Page 0 6.4.2 Page 1 6.4.3 Page 2 6.4.4 Page 3 6.4.5 Page 4 6.4.6 Page 5 6.4.7 Page 6 6.5 iemit error and warning messages 6.6 Memory configuration file 7 ieprom - ROM program convertor 7.1 Introduction 7.2 Prerequisites to using the ieprom tool 7.3 Running ieprom 7.3.1 Examples of use 7.4 ieprom control file 7.5 What goes into the EPROM 7.5.1 Memory configuration data 7.5.2 Parity registers 7.5.3 Jump instructions 7.5.4 Bootable file 7.5.5 Traceback information 7.6 ieprom output files 7.6.1 Binary output 7.6.2 Hex dump 7.6.3 Intel hex format 7.6.4 Intel extended hex format 7.6.5 Motorola S-record format 7.7 Block mode 7.7.1 Memory organization 7.7.2 When to use block mode 7.7.3 How to use block mode 7.8 Example control files 7.8.1 Simple output 7.8.2 Using block mode 7.9 Error and warning messages 8 ilaunch - Windows launch tool 8.1 The Windows environment file 8.1.1 Syntax 9 ilibr - librarian 9.1 Introduction 9.2 Running the librarian 9.2.1 Default command line 9.2.2 Library indirect files 9.2.3 Linked object input files 9.2.4 Library files as input 9.3 Library modules 9.3.1 Selective loading 9.3.2 How the librarian sorts the library index 9.4 Library usage files 9.5 Building libraries 9.5.1 Rules for constructing libraries 9.5.2 General hints for building libraries 9.5.3 Optimizing libraries 9.6 Error Messages 9.6.1 Information messages 9.6.2 Warning messages 9.6.3 Serious errors 9.6.4 Fatal errors 10 ilink - linker 10.1 Introduction 10.2 Running the linker 10.2.1 Default command line 10.2.2 Output format 10.3 Linker indirect files 10.3.1 Linker indirect files supplied with the toolset 10.3.2 Linking different versions of software after occam upgrade 10.4 Linker directives 10.4.1 #alias basename {aliases} 10.4.2 #define symbolname value 10.4.3 #include filename 10.4.4 #mainentry symbolname 10.4.5 #reference symbolname 10.4.6 #section name 10.5 Linker options 10.5.1 Processor types 10.5.2 Error modes - options H, S and X 10.5.3 Extraction of library modules - option EX 10.5.4 Display information - option I 10.5.5 Virtual memory - option KB 10.5.6 Main entry point - option ME 10.5.7 Link map filename - option MO 10.5.8 Suppress symbol table - NS 10.5.9 Linked unit output file - O 10.5.10 Permit unresolved references - option U 10.5.11 Channel input/output - Y 10.6 Selective linking of library modules 10.7 The link map file 10.7.1 MODULE record 10.7.2 SECT record 10.7.3 MAP record 10.7.4 Value record 10.7.5 LOCALVALUE record 10.8 Using imakef for version control 10.9 Error messages 10.9.1 Warnings 10.9.2 Errors 10.9.3 Serious errors 10.9.4 Embedded messages 11 ilist - binary lister 11.1 Introduction 11.2 Data displays 11.2.1 Modular displays 11.2.2 Example displays used in this chapter 11.3 Running the binary lister 11.3.1 Options to use for specific file types 11.3.2 Output device 11.3.3 Default command line 11.4 Specifying an output file - option O 11.5 Symbol data - option A 11.5.1 Specific section attributes 11.5.2 General symbol attributes 11.5.3 Example symbol data display 11.6 Code listing - option C 11.6.1 Example code listing display 11.7 Exported names - option E 11.7.1 Example exported names display 11.8 Hexadecimal/ASCII dump - option H 11.8.1 Example hex dump display 11.9 Module data - option M 11.9.1 Example module data display 11.10 Library index data - option N 11.10.1 Example library index display 11.11 Procedural interface data - option P 11.11.1 Example procedural data display 11.12 Specify reference - option R 11.13 Full listing - option T 11.13.1 Example full data display 11.13.2 Configuration data files 11.14 File identification - option W 11.14.1 Example file identification display 11.15 External reference data - option X 11.15.1 Example external reference data display 11.16 Error messages 11.16.1 Information messages 11.16.2 Serious errors 11.16.3 Fatal errors 12 imakef - makefile generator 12.1 Introduction 12.2 How imakef works 12.3 File extensions for use with imakef 12.3.1 Target files 12.4 Linker indirect files 12.5 Library indirect and library usage files 12.6 Running the makefile generator 12.6.1 Example of use 12.6.2 Specifying language mode 12.6.3 Configuration description files 12.6.4 Debug data 12.6.5 Software virtual routing and channel input/output 12.6.6 Boot-from-ROM target files 12.6.7 Removing intermediate files 12.6.8 Files found on ISEARCH 12.6.9 Map file output for imap 12.7 imakef examples 12.7.1 C examples 12.7.2 occam examples 12.7.3 Mixed language program 12.8 Format of makefiles 12.8.1 Macros 12.8.2 Rules 12.8.3 Delete rule 12.8.4 Editing the makefile 12.9 Error messages 12.9.1 Warnings 12.9.2 Errors 13 imap - memory mapper 13.1 Introduction 13.2 Running the map tool 13.2.1 Source files required by imap 13.2.2 Re-directing imap's output 13.3 Output format 13.3.1 imap memory map structure 13.3.2 User processes 13.3.3 Module memory usage 13.3.4 Other processes 13.3.5 Symbol table 13.4 Example 13.5 Error messages 13.5.1 Serious errors 13.5.2 Fatal errors 14 imem450 - memory interface configurer 14.1 Introduction 14.2 Running the memory interface configurer 14.2.1 Default command line 14.3 Interactive operation 14.3.1 Interactive commands 14.3.2 Interactive pages 14.4 Output files 14.4.1 Memfiles 14.4.2 ASCII display page output files 14.4.3 Waveform file 14.5 Error messages 14.5.1 Warnings 14.5.2 Errors 14.5.3 Fatal errors 15 irun - application loader 15.1 The purpose of irun 15.1.1 Initializing target hardware 15.1.2 Loading programs 15.1.3 Access to host services 15.2 Starting an application 15.2.1 Target interface parameters 15.2.2 The irun command line 15.2.3 Starting using Microsoft Windows 15.3 The environment 15.3.1 ISEARCH 15.3.2 ASERVDB 15.3.3 TRANSPUTER 15.3.4 Setting target interface parameters on a Sun 15.3.5 Setting target interface parameters on a PC with Windows 15.4 Skip loaders 15.4.1 Running the skip loader 15.4.2 Examples of use 16 iset - Windows parameter tool
Appendices
A Toolset conventions and defaults A.1 Command line syntax A.1.1 General conventions A.1.2 Indirect argument files A.2 Unsupported options A.3 Filenames A.4 Search paths A.5 Standard file extensions A.5.1 Main source and object files A.5.2 Indirect input files (script files) A.5.3 Files read by the memory map tool imap A.5.4 Other output files A.5.5 Miscellaneous files A.6 Extensions required for imakef A.7 Message handling A.7.1 Message format A.7.2 Severities A.7.3 Runtime errors B Processor types and classes B.1 Processor types supported by the toolset B.2 Processor types and classes B.2.1 Single processor type B.2.2 Creating a program which can run on a range of processors B.2.3 Linking files which contain code compiled for different targets B.2.4 Classes/instruction sets - additional information B.3 Processor type command line options C ANSI C compiler optimization examples C.1 Local optimization examples C.1.1 Peephole optimization C.1.2 Flowgraph optimizations C.1.3 Redundant store elimination C.2 Global optimization examples C.2.1 Common subexpression elimination C.2.2 Loop-invariant code optimization C.2.3 Global optimization example C.2.4 Strength reduction C.2.5 Tail-call and tail recursion optimization C.2.6 Workspace allocation by coloring D Using the assembler D.1 Introduction D.2 Running the assembler D.2.1 Specifying the source filename D.2.2 Use of icc command options with the assembler D.2.3 Using the preprocessor with the assembler D.3 Language D.3.1 Label definitions D.3.2 Symbols D.3.3 Expressions D.3.4 Transputer instruction mnemonics D.3.5 Comments D.4 Assembler directives align blkb blkw byte comment common data debug defsym descriptor extern global init language local maininit map1 map2 map3 patch patch - codefix patch - datafix patch - extoffset patch - limit patch - modnumber patch - staticfix size sourcefile textname toolname word D.5 BNF grammar for assembler language D.6 Errors D.6.1 Fatal Errors D.6.2 Serious Errors D.6.3 Errors E Memory interface configuration files E.1 Structure of memfiles E.1.1 Processor type E.1.2 DRAM refresh parameters definition E.1.3 Global parameters E.1.4 Bank definitions E.1.5 Strobe definitions E.2 Memfile statements E.2.1 Timing parameters E.2.2 Statement definitions E.3 Example file F ANSI C configuration language F.1 Introduction F.2 Statements F.3 Comments F.4 Identifiers F.4.1 Character set F.5 Types F.6 Constants F.7 Booleans F.8 Expressions and arithmetic F.9 Arrays F.10 Conditional statement F.11 Replication F.12 Built-in functions F.13 Nodes F.13.1 Node attributes F.13.2 Defining new node types F.13.3 Connections F.13.4 Prohibited connections F.14 Configuration language summary F.14.1 Network data types F.14.2 Numeric data types F.14.3 Language constructs F.14.4 Definitions and declarations F.14.5 Operators F.14.6 Predefinitions F.14.7 Built-in functions F.15 Configurer directives F.15.1 #include F.15.2 Configurer directives summary F.16 Configuration language syntax F.16.1 Notation F.16.2 Configuration F.16.3 Language features F.16.4 Expressions F.16.5 Replication and conditionals F.16.6 Numeric value declarations F.16.7 Network declarations F.16.8 Mapping declarations F.17 Implementation details F.18 Reserved words F.18.1 Keywords F.18.2 Pre-defined attributes F.19 Predefinitions F.19.1 Constants F.20 Types F.21 Declarations G occam configuration language G.1 Notation G.2 Introduction G.3 New types and specifications G.3.1 Syntax of configuration description G.4 Hardware description G.4.1 Processor attributes G.4.2 Syntax definition G.5 Software description G.5.1 Syntax definition G.6 Mapping structure G.6.1 Syntax definition G.7 Constraints G.8 Checking IF statements H AServer database H.1 Target hardware connection fields I ITERM files I.1 Introduction I.2 The structure of an ITERM file I.3 The host definitions I.3.1 ITERM version I.3.2 Screen size I.4 The screen definitions I.4.1 Goto X Y processing I.5 The keyboard definitions I.6 Setting up the ITERM environment variable I.7 Iterms supplied with a toolset I.8 An example ITERM Index