EasyManuals Logo
Home>Texas Instruments>Computer Hardware>TMS34010

Texas Instruments TMS34010 User Manual

Texas Instruments TMS34010
128 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
Page #49 background imageLoading...
Page #49 background image
TMS34010
C
Run-Time
Environment
An interrupt function may perform any task a normal function may perform:
access global variables,
allocate local variables,
call
other functions, etc.
Notes:
1.
It
is your responsibility
to
handle any special masking
of
interrupts.
You
can
reenable the interrupts and
do
any masking required
without
corrupting the C environment.
2.
An interrupt handler must
be
declared
with
no arguments.
If
it
is
de-
clared to have arguments, the interrupt handler
will
not
run correctly.
3.
An interrupt handler may
not
be called by the user code. Because the
linkage
is
set up for handling interrupts, a C calling sequence
will
not
be
handled correctly, and the system could crash.
4.
c-intOO
is
used
as
the system reset interrupt. This routine initializes the
system and calls the user's
main function. Note that when the user's
function
is
called, the interrupts
are
still disabled; thus,
it
is
the user's
responsibility
to
enable interrupts
if
they are.needed.
5.
Any
interrupt handler can
be
used to handle any interrupt or multiple
interrupts. The codegen does
not
generate any code specific
to
the
particular interrupt,
with
the exception
of
the system reset interrupt
c-intOO,
which
must
be
used
as
system reset and cannot have any
local variables (since
it
is
assumed that at system reset the stack
has
not
yet been allocated).
To attach
an
interrupt handler to
an
interrupt, the address
of
the in-
terrupt must be placed in the proper interrupt vector. This
can
be done
with
the assembler and linker, creating a simple table
of
addresses and
linking
to
the proper location.
5.7
System
Initialization
5-12
Before any C code may
be
run, the C run-time environment must be created.
This environment is represented in the program stack and the system stack,
so these must be properly constructed and initialized.
In
addition, any vari-
ables
which
were declared to be automatically initialized at program entry
must
be
initialized before calling user code.
Two
stacks
are
used
to
manage the C run-time environment:
Program stack
(STK)
System
stack (SP)
These stacks must
be
initialized by the
boot
function before any user code is
executed. The stacks
are
located in the static array
SYS-STACK,
declared in
the module
BOOT.C, and share the space by
growing
toward each other from
opposite ends
of
the space .. A stack overflow occurs when the stacks overlap.
The size
of
SYS-STACK
may be changed by modifying source code and re-
compiling
BOOT.C. There
is
no protection in the run-time code against stack
overflows, so stack size should be chosen
with
care.

Table of Contents

Other manuals for Texas Instruments TMS34010

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS34010 and is the answer not in the manual?

Texas Instruments TMS34010 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS34010
CategoryComputer Hardware
LanguageEnglish

Related product manuals