i960® Tools & Software Techniques Frequently Asked Questions

Q. What patches need to be applied to the software?

A. Only the latest patch is needed. You do not need to apply the previous patches. The latest patch contains the previous patches.

Q. What environment variables are needed to run the compiler?

A. For the GCC960 compiler the following environment variables are needed:

For the IC960 Compiler and tools the following variables are needed:

Q. How can you place 'C' code into a specific section?

A. You can name new sections within a "C" program. Review the "#pragma section" command. Then load the sections into specific addresses during link time. Example of the C code:



void test(void)
#pragma section "xxx"

   printf("This function is in the .textxxx section!\n");

void test2(void)
#pragma section ""

   printf("This function is in the .text section!\n");

void main(void)

   printf("This Main is in the .text section!\n");

From the previous "C" program we produced two sections named .text and .textxxx. The linker directive file needs to be modified to know where to place the new section. Below is a portion of the linker directive file that will combine those sections into the .text section that is mapped into dram.

      .text :
         } >dram

      .data :
         } >dram

      .bss : 
         } >dram

/* For R4.0 of the compiler & libraries, the following lines */
/* should not be enclosed in comments. */
        SFP_AC :
           fpem_CA_AC = .;
        } >isram

Q. Where can I get the 5.0 GNU source code for the 960 tools?

A. If you are on the World Wide Web you can find the source code starting at http://www.intel.com/design/i960/patches/. If you are a FTP user a compressed TAR file can be found at ftp://ftp.intel.com/pub/i960/gnu/Rel_5.0/. The IP address for the ftp.intel.com site is This source code is only supplied for UNIX operating systems. We do not recommend recreating the tools for DOS and Windows operating systems from source code.

Q. How can I use quad stores in a "C" program?

A. Use an assembly function. An example of a quad store using an assembly function in "C" is shown below. This function will be put inline where the function is called.

#define uint32 unsigned int

asm store_quad(uint32 source1, uint32 source2, uint32 source3,  uint32 source4,void *dest)
% use g8,r4,r5,r6,r7; spillall;
    mov  dest,g8
    mov  source1,r4
    mov  source2,r5
    mov  source3,r6
    mov  source4,r7

    stq          r4,(g8)


Q. What is the difference between #pragma isr, and #pragma interrupt?

A. #pragma isr and #pragma interrupt do the same thing in different ways. With #pragma isr, the compiler makes a context-specific choice of where to save the processor state. In most cases the processor state is saved to the local registers. With #pragma interrupt, the processor state is saved on the interrupt stack in external memory. We recommend using #pragma isr in your application since it is generally more efficient. The reason for two different #pragma's is to maintain backwards compatibility with previous versions when CTOOLS and GNUTOOLS were separate software packages.

Q. How do you declare an absolute value in C?

A. Declare the C variable as an extern (e.g. extern unsigned long test). Then add the _test=0x? to the linker directive file. In addition to libraries, the linker will scan the linker directive file to resolve any external symbols that have been declared in the object file(s).

Q. While stepping through my source code with gdb960 under Window95, I noticed that the debugger was displaying incorrect lines numbers. Why?

A. This is a known bug with the debugger. Patches can be found on the Intel ftp site. (ftp.intel.com)

Q. Why is it when I write a value to a local register I don't see that value in memory?

A. The i960's normal call/return mechanism stores register sets internally. Although the processor allocates space on the stack frame for the local registers, they aren't actually saved to external memory unless there is a register "spill". In order to be able to see the contents of the internal registers in memory, the "flushreg" instruction can be used to force the contents of all the registers sets to be copied into memory.

Q. How can I do program-wide Analysis and Optimization if I compile and link in separate steps?

A. The only thing different for program-wide Analysis and Optimization done in two steps (compiling-linking) is that the decision maker (gcdm) must be invoked in both command lines. The following example shows how the decision maker is invoked and things to look for:

This should complete the process.

Q. What kind of test and what specific algorithm does the rommer use when the cheksum utility is invoked?

A. The checksum utility from the rommer computes a 16 or 32 bit CRC checksum algorithm over the address range specified and stores it in the . The format of the utility is -> checksum image <16|32> .

     The CRC algorithm can be found in the crc.c file under the src/rom960/common subdirectory. Q. How do we link our user application under Mon960?

A. The process is now very simple under Mon960 v3.1. With this new source code the user program will be the running process on the board after boot up, and as soon the program is interrupted by using Ctrl-c the monitor is invoked. This new process also gives full hdil debugging capabilities.

To link a user application into the monitor, the customer needs to make the following changes to the monitor's source code:

These should be all of the changes needed to link the monitor. Now it is a matter of building the new monitor and downloading it to flash. To build the monitor type on the command line -> nmake -f makefile cyxx (xx corresponds to the processor being used). To download the new monitor to flash memory, follow the instructions on page 10 of the Mon960 Debug Monitor Product Release Notes. Q. What is CTOOLS5.0 and how is it related to GNU tools and CTOOLS?

A. CTOOLS 5.0 is the name of the software package of our latest development tools. It is composed of the GNU interface and CTOOLS interface. In the past we sold both compilers in different packages, but as time passed, most of the utilities and functions of the compilers were merging. It did not make sense any longer to make different packages for the tools, since they were very similar. That is why we decided to ship both interfaces under the same software. This gives customers one software package that contains both interfaces.

Q. How do I invoke the extended-call mechanism for out of range addresses during compiling?

A. When using the ic960 compiler use the "-Gxc" option in your command line. When using the gcc960 compiler use the "-mlong-calls" option in your command line.

Cyclone Board

Q. Why is it when I try to erase flash with the 'ef' command on the Cyclone evaluation board the monitor replies "FLASH_ADDR in .h is not flash memory."

A. The flash located on the base board requires 12 volts for programming. This error message is an indication that either the Cyclone board is not being supplied 12 volts or the Vpp switch is not in the ON position.

Q. The PCI Cyclone board seems to hang my system when it boots. Why?

A. Earlier versions of MON960 that do not support PCI will hang the system. The solution is to upgrade MON960 to version 3.xx.

Q. When I try to download my program to the Cyclone board using the gdb960 debugger , why do I get the error message "HDIL error (22), Error writing to target memory" ?

A. This error is an indication that the lower 32K bytes of memory (0xA000000 - 0xA0008000) allocated for MON960 has been corrupted by the program downloaded. The solution is to re-link the code at an address above 0xA0008000 as shown below.

/* excerpt from linker directive file */ 
      dram  :  org = 0xA0008000, len = 0x1ff8000   /* 32M less monitor */
      isram :  org = 0x00000100, len = 0x300

      .text :
         } >dram

      .data :
         } >dram

      .bss : 
         } >dram

Q. How do I identify which Cyclone evaluation board I should order?

A. The evaluation boards come configured either for operation as a stand-alone or as a plug-in PCI card. Which one of the two will depend on the part number provided below. The CTOOLS provided within these packages supports operation under Windows 95.

SX Evaluation boards:GSX80960W95KT (stand-alone)GSX80960W95PK (PCI)
KX Evaluation boards:GKX80960W95KT (stand-alone)GKX80960W95PK (PCI)
CX Evaluation boards:GCX80960W95KT (stand-alone)GCX80960W95PK (PCI)
HX Evaluation boards:GHX80960W95KT (stand-alone)GHX80960W95PK (PCI)
JX Evaluation boards:GJX80960W95KT (stand-alone)GJX80960W95PK (PCI)

Q. How do I upgrade the version of MON960 on my Cyclone evaluation board?

A. Follow these steps to upgrade the MON960 on the Flash ROM:

a) Download the latest version of MON960 from the ftp site @ ftp://ftp.intel.com/pub/i960/mon960/
b) Execute the executable (i.e. "MON_302 -d") in the sub-directory you want the files to reside in.
c) Copy the file \mondb\dos\mondb.exe to the Intel 960 tools bin directory
d) Make sure the Flash ROM is in the socket at location U27 of the Cyclone baseboard.
e) Turn on the Vpp switch for the baseboard flash memory and make sure ROMSWAP switch is off.
f) Reset the board to ensure that a race condition on the rise of 5 volts and 12 volts does not interfere with the Flash initialization.
g) At the PC, perform the following: (using PCI: mondb -pci -ef -ne cyxx.fls) or (using serial: mondb -b 9600 -ser com1 -ef -ne cyxx.fls). The "xx" in cyxx.fls is for you to insert the particular processor daughter card module you are using (i.e. cx).
h) After the download completes, turn the ROMSWAP switch on and the Vpp switch off. Then reset the board. You'll now boot from the Flash ROM located in position U27.

Legal Stuff © 1997 Intel Corporation
Free Web Hosting