UNIX XTC-1750A V1.10A release notes 06/20/00 ---------------------------------------------------------------------- This document provides supplemental information about the XTC-1750A compiler package. For additional information, see the XTC-1750A Toolset User Guide provided with the compiler package. Contents: 1. Installing XTC-1750A 2. Compiler changes 3. Assembler changes 4. Linker changes 5. Library changes 6. Debugger changes 7. Program restrictions 8. Program-file translation utilities ---------------------------------------------------------------------- Summary of installation procedure: 1A. Unpack the XTC-1750A TAZ file 1B. Set up the license manager 1C. Configure serial I/O on target side 1D. Install the EYE50 debugger 1E. Configure serial I/O on host side Summary of toolset changes: 2A. Compiler -- Function pointers 2B. Compiler -- Special symbol-name characters 2C. Compiler -- Output format 2D. Compiler -- ANSI prototype support 3A. Assembler -- Defining symbols at assembly time 3B. Assembler -- MACRO50 "include" files 3C. Assembler -- GPS XIO extensions 4A. Linker -- Defining symbols at link time 4B. Linker -- Generating LDM files 4C. Linker -- Setting the top-of-stack position 4D. Linker -- Multiple "-N" commands 4E. Linker -- Unresolved externals 4F. Linker -- Multiply-defined symbols 4G. Linker -- Setting NREL "fill" value 5A. Library -- Using the math library 5B. Library -- Range-checking mode flag 6A. Debugger -- Array subscripts Summary of program restrictions: 7A. Global symbols 7B. Address space 7C. Interrupt processing 7D. Misc. restrictions Summary of program-file translation utilities: 8A. DATAIO -- Translates XTC-1750A "SV" to "Intel Hex" 8B. LDMTOSV -- Translates XTC-1750A "LDM" to "SV" 8C. SVTOLDM -- Translates XTC-1750A "SV" to "LDM" ---------------------------------------------------------------------- 1A. Unpack the XTC-1750A TAZ file. If you received the XTC-1750A package in TAZ format, transfer the TAZ file to your XTC-1750A production directory and use commands similar to the following: mv cc50.taz cc50.tar.Z # rename the TAZ file compress -d cc50.tar.Z # decompress the TAZ file tar xvf cc50.tar # unpack the TAR file rm cc50.tar # delete the TAR file ---------------------------------------------------------------------- 1B. Set up the license manager. If you haven't installed XTC-1750A before, you'll need to set up some environment variables and license manager configuration files. For complete instructions, see Appendix A of the XTC-1750A Toolset User Guide. ---------------------------------------------------------------------- 1C. Configure serial I/O on target side. (a) If you have a PDU (or compatible system), go to the XTC- 1750A directory and copy "io50.pdu" to "io50.src". (b) If you have an SBC (or compatible system), go to the XTC- 1750A directory and copy "io50.sbc" to "io50.src". (c) Edit "io50.src". Modify the serial-I/O code (if neces- sary) for use with your target system. (d) Execute the command "macro50 io50". This should create an object file named "io50.rb". ---------------------------------------------------------------------- 1D. Install the EYE50 debugger. XTC-1750A includes at least one of these subdirectories: eyepdu -- PDU-compatible debugger eyesbc -- SBC-compatible debugger To install the EYE50 debugger, select the appropriate subdirectory and see "eye50.txt" (located in the given directory) for further instruct- ions. ---------------------------------------------------------------------- 1E. Configure serial I/O on host side. By default, Linux XTC-1750A assumes that SBC targets are connected to the serial device "/dev/ttyS1". Solaris XTC-1750A assumes that SBC targets are connected to "/dev/ttya". If a different serial device is used, two changes are required: (a) Edit the debugger configuration file (eye50.rc) and set the variable "port" equal to the correct device name (/dev/tty...). (b) When running "peplink", use an option switch of the form "-P/dev/tty..." to specify the correct device name. ---------------------------------------------------------------------- 2A. Compiler change -- Function pointers. CC50 supports both ANSI and pre-ANSI function-pointer rules. For exam- ple: extern int (*foo)(); /* function pointer */ extern int bar(); /* function */ foo = bar; /* set function pointer */ (*foo)(); /* pre-ANSI convention */ foo(); /* ANSI convention */ ---------------------------------------------------------------------- 2B. Compiler change -- Special symbol-name characters. There are four special symbol-name characters: Underscore (_) Question mark (?) Dollar sign ($) Period (.) Question marks and periods are not valid name characters for 'C' sym- bols. However, these two characters are valid name characters for assembly-language symbols. Conversely, underscores and dollar signs are valid 'C' symbol name characters, but these two characters have multiple meanings at the assembly-language level, and should only be used at the assembly- language level in special cases. (For example, assembly-language symbol names of the form "NAME$" may be used to create local macro symbols. For additional information, see page ASM-3-11 of the XTC-1750A Toolset User Guide.) The 'C' compiler translates underscores (inside 'C' symbol names) to question marks (inside the corresponding assembly-language symbol names). For example: int _foo; -- 'C' declaration ?foo": .BLK 1 -- corresponding assembly-language declaration The 'C' compiler also translates dollar signs (inside 'C' symbol names) to periods (inside the corresponding assembly-language symbol names). For example: int bar$x; -- 'C' declaration bar.x": .BLK 1 -- corresponding assembly-language declaration Note: 'C' symbol names may begin with underscores. 'C' symbol names cannot begin with dollar signs. ---------------------------------------------------------------------- 2C. Compiler change -- Output format. CC50 supports three output modes. By default, CC50 produces a ".rb" object file. The option switches "-a" and "-s" can be used to change the output format: cc50 name.c - produce object file (default mode) cc50 -a name.c - produce SRC file instead of object file cc50 -s name.c - produce SRC file along with object file "-s" overrides "-a". In other words, "cc50 -as" is equivalent to "cc50 -s". ---------------------------------------------------------------------- 2D. Compiler change -- ANSI prototype support. By default, CC50 doesn't accept ANSI prototypes. To compile programs containing prototypes, use the command-line switch "-p". For example: cc50 -p name.c ANSI prototypes constructed using #ifdef's or macros may be rejected, whether or not "-p" is used. ---------------------------------------------------------------------- 3A. Assembler change -- Defining symbols at assembly time. MACRO50 supports the following symbol-definition option switches: -Dsymbol -- define the specified symbol -Dsymbol=value -- define symbol using (decimal) value -Usymbol -- undefine the specified symbol "-Dsymbol=value" uses base-ten (decimal) values. If the "=value" field is omitted after "-Dsymbol", the symbol value defaults to one. For example: -DEIGHT=8 -- define "EIGHT" as decimal eight -DSETXIO -- define "SETXIO" as one ---------------------------------------------------------------------- 3B. Assembler change -- MACRO50 "include" files. MACRO50 supports the following "include file" option switch: -Idirectory -- add specified include-file directory For example: -I/src -- add "/src" to include-file searchlist ---------------------------------------------------------------------- 3C. Assembler change -- GPS XIO extensions. MACRO50 supports the GPS 1750A XIO extensions. The extensions are disabled, by default. To enable the GPS extensions, set the environ- ment variable "OPT50" equal to "gps". Under the C-shell (csh), use the following command: setenv OPT50 gps Under the Bourne shell (sh), use the following commands: OPT50=gps export OPT50 To enable the GPS extensions permanently, add these command(s) to the appropriate login scripts. Note: "gps" may be specified in upper or lower case. ---------------------------------------------------------------------- 4A. Linker change -- Defining symbols at link time. Global symbols may be defined at link time. To define new symbols, add strings of the form "name=value" to the linker command file. Values are specified in hexadecimal. For example: foo=128F ;define symbol FOO as hex 128F bar=A000 ;define symbol BAR as hex A000 ---------------------------------------------------------------------- 4B. Linker change -- Generating LDM files. RELOAD50 normally generates "SV" output files. The RELOAD50 option switch "-t" changes the default mode of operation. If "-t" is used, RELOAD50 generates both "SV" and "LDM" output files. The utility program "svtoldm" may also be used to generate "LDM" files manually. For additional information, see section 8. ---------------------------------------------------------------------- 4C. Linker change -- Setting the top-of-stack position. By default, the stack used by an XTC-1750A 'C' program starts at hex 7FFF and grows downwards. To change the top-of-stack position, add a command of the form "?STKTOP=value" to the linker command file. Values are specified in hexadecimal. For example: ?STKTOP=0FFF ;set top of stack to 0FFF (hex) Allow sufficient space below "?STKTOP". (The number of words required will vary from program to program.) Note: The stack normally should not be placed above 7FFF (hex). For additional information, see section 7. ---------------------------------------------------------------------- 4D. Linker change -- Multiple "-N" commands. Linker command files may use multiple "-N" commands to set the NREL position for individual modules. For example: 9800 -N ;set NREL base address to 9800 (hex) start50.rb ;load first object file at 9800 (hex) A000 -N ;advance NREL position to A000 (hex) foobar.rb ;load next object file at A000 (hex) ---------------------------------------------------------------------- 4E. Linker change -- Unresolved externals. If a program uses unresolved external symbols, RELOAD50 normally prints warning messages and continues processing; unresolved externals are not fatal errors. The RELOAD50 option switch "-x" changes the default mode of operation. If "-x" is used, RELOAD50 will treat unresolved externals as fatal errors. ---------------------------------------------------------------------- 4F. Linker change -- Multiply-defined symbols. RELOAD50 normally treats multiply-defined global symbols as fatal errors. The RELOAD50 option switch "-y" changes the default mode of operation. If "-y" is used, RELOAD50 will print warning messages (instead of fatal-error messages) for multiply-defined symbols. ---------------------------------------------------------------------- 4G. Linker change -- Setting NREL "fill" value. As noted in section 4D, a linker command file may use multiple "-N" commands to set the NREL position for individual modules. If this creates gaps between modules, RELOAD50 normally uses a "fill" value of zero. I.e., the gaps are cleared. To specify a different "fill" value, add a line of the following form to the linker command file: ?NRFILL=FFFF Replace "FFFF" with any 16-bit hex value. This line should be inserted before the first "-N" line. For example: ?NRFILL=FFFF ;set NREL "fill" value to FFFF (hex) 9800 -N ;set NREL base address to 9800 (hex) start50.rb ;load first object file at 9800 (hex) A000 -N ;advance NREL position to A000 (hex) foobar.rb ;load next object file at A000 (hex) In this example, the gap between "start50.rb" and memory address A000 will be filled with words containing FFFF. ---------------------------------------------------------------------- 5A. Library change -- Using the math library. Programs which use the math library require the object file "fltcon.rb". I.e., add "fltcon.rb" to the appropriate linker command files. Additionally, if the target system has a non-standard floating-point architecture, add the function call "InitFlt()" to programs which use this library. Call "InitFlt()" once at startup time. "InitFlt()" checks the floating-point hardware on the target system and adjusts some of the constants used by the math library. "InitFlt()" returns an integer result. If "InitFlt()" is successful, the result is zero; otherwise, the result is -1. If "InitFlt()" returns -1, the caller should produce an error message and terminate operation. ---------------------------------------------------------------------- 5B. Library change -- Range-checking mode flag. The XTC-1750A math library clips floating-point input values or output values (in most cases) if the values fall outside a predetermined range (absolute value = approximately 1.0E-11 to 1.0E+11, for most systems). To change the mode of operation for a particular program, make the following two changes: (a) Add the following 'C' statement to the program's initiali- zation code: _chkflt = FALSE; (b) If the modified module does not already load "math.h", add the following command at the start of the file: #include These changes will suppress clipping, in most cases. This will allow operation over a wider range of values; however, some routines will produce arithmetic-overflow errors for computations involving numbers that are out-of-bounds. ---------------------------------------------------------------------- 6A. Debugger change -- Array subscripts. The EYE50 array-subscript format has been changed. Ranges are now specified using "foo[x..y]" instead of "foo[x:y]". For example: print foo[5..6] -- Displays two array entries "foo[5]" and "foo[6]". ---------------------------------------------------------------------- 7. Program restrictions. 7A. Global symbols. The XTC-1750A toolset supports global symbols of up to eight charac- ters. Global symbols are case-sensitive at the 'C' level, but case-insensi- tive at the assembler/linker level. ---------------------------------------------------------------------- 7B. Address space. XTC-1750A does not support separate code and data address-space map- pings. The package assumes that each 64 KW address space contains both code and data. XTC-1750A does not support byte pointers to objects located above virtual word address 7FFF (hex). 'C' stack segments and 'C' data segments therefore should not be placed above 7FFF (hex), since most 'C' programs use byte pointers into these segments (directly or indir- ectly). Specifically: (a) "?STKTOP" should not be placed above 7FFF (hex) (b) The SREL segment should not extend past 7FFF (hex) XTC-1750A does not support multiple 64 KW address spaces directly, but 'C' programs can access multiple address spaces through the use of "overlays". For additional information, see the files provided in the XTC-1750A "overlay" subdirectory. ---------------------------------------------------------------------- 7C. Interrupt processing. XTC-1750A does not support interrupt processing at the 'C' level, but assembly-language interrupt routines may use 'C' subroutines. (The interrupt routines are responsible for setting up the 'C' stack appro- priately, in this case.) ---------------------------------------------------------------------- 7D. Misc. restrictions. 'C' structures may be nested to a maximum of one level. Function pointers are limited to one level of indirection. ANSI prototypes constructed using #ifdef's or macros may be rejected, whether or not "-p" is used (see section 2D). ---------------------------------------------------------------------- 8. Program-file translation utilities. The XTC-1750A package includes three program-file format translation utilities: 8A. DATAIO -- Translates XTC-1750A "SV" to "Intel Hex" 8B. LDMTOSV -- Translates XTC-1750A "LDM" to "SV" 8C. SVTOLDM -- Translates XTC-1750A "SV" to "LDM" ---------------------------------------------------------------------- 8A. DATAIO usage: dataio name.sv (".sv" filename extension is optional) DATAIO translates one XTC-1750A program file "xyz.sv" into two Intel Intellec 8/MDS-compatible output files "xyz.b0" and "xyz.b8". The ".b0" file encodes a series of low-order bytes, and the ".b8" file encodes a series of high-order bytes. ---------------------------------------------------------------------- 8B. LDMTOSV usage: ldmtosv name.ldm (".ldm" filename extension is optional) LDMTOSV takes an XTC-1750A "LDM" file as input and produces an XTC-1750A "SV" file with the same base name and a ".sv" filename extension as output. ---------------------------------------------------------------------- 8C. SVTOLDM usage: svtoldm name.sv (".sv" filename extension is optional) SVTOLDM takes an XTC-1750A "SV" file as input and produces an XTC-1750A "LDM" file with the same base name and an ".ldm" filename extension as output.