EasyManua.ls Logo

Intel i960 - C Interrupt Service Routine Failures

Intel i960
347 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Caveats
12-11
12
fclose.c:43: (fclose): undefined reference to ‘_close’
malloc.c:82: (malloc): undefined reference to ‘_sbrk’
malloc.c:60: (malloc): undefined reference to ‘_brk’
Problem:
When invoked with
gcc960 -ACA -o
filename
filename
.c, the
compilation system tries to construct a b.out format executable file, fully
linked. A fully linked file implies a C-runtime startup file and several
runtime libraries. If the proper library list (in the proper order) is not
added to the invocation command, the error messages listed above may
result.
Solution:
The preferred method of creating fully linked executables is to use the
target configuration files, e.g.,
gcc960 -o
filename
filename
.c -T
arg
.
The
-T
arg
option instructs the compiler to parse the file
$G960BASE/lib/
arg
.gld, which contains definitions for the i960
architecture flag, C-runtime filename, library lists, and section load
addresses. Target configuration files are supplied for all the i960
processor evaluation boards, and adding your own description file is as
easy as renaming and modifying an existing description file. Do not
confuse gcc960's
-T option with ic960’s and gld960's -T option.
C Interrupt Service Routine Failures
An application that uses interrupts extensively may have hand-built
assembler wrappers for each interrupt type, with each wrapper calling
specific C interrupt service routines. Some of the C interrupt service
routines may fail in mysterious ways, often in an operation fault.
Problem:
The C function calling convention requires that the i960 processor register
g14 contain the value zero for all functions that take fewer than 14 words
of parameters and are non-leaf procedures. Because of this, for most
functions, the compiler assumes
g14 to contain zero, and uses that register

Table of Contents

Related product manuals