EasyManua.ls Logo

Rabbit 2000 - Page 11

Rabbit 2000
45 pages
Print Icon
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...
Designer’s
Handbook 7
6.
The
program
enters
a
loop
where
it
receives
a
fixed
number
of
bytes
which
comprise
a
secondary
loader
program
(pilot.bin
sent
by
the
PC)
and
writes
those
bytes
to
memory
location
0x4100.
After
all
of
the
bytes
are
received,
program
execution
jumps
to
0x4100.
7.
The
secondary
loader
does
a
wrap-around
test
to
determine
how
much
RAM
is
avail-
able,
and
reads
the
flash
ID.
This
information
is
made
available
for
transmittal
to
Dynamic
C
when
requested.
8.
The
secondary
loader
now
enters
a
finite
state
machine
(FSM)
that
is
used
to
imple-
ment
the
Dynamic
C/Target
communications
protocol.
Dynamic
C
compiles
the
core
of
the
regular
BIOS
and
sends
it
to
the
target
at
address
0x00000
which
is
still
mapped
to
RAM.
Note
that
this
requires
that
the
BIOS
core
be
0x4000
or
less
in
size.
9. The
FSM
checks
the
memory
location
0x4001
(previously
set
to
zero)
after
receiving
each
byte.
When
the
compilation
and
loading
to
RAM
of
the
BIOS
is
complete,
Dynamic
C
signals
the
target
that
it
is
time
to
run
the
BIOS
by
sending
a
one
to
0x4001.
10.
The
BIOS
runs
some
initialization
code
including
setting
up
the
serial
port
for
115200
baud,
setting
up
serial
interrupts
and
starting
a
new
FSM.
11.The
BIOS
code
modifies
a
jump
instrucction
near
the
beginning
of
the
program
so
that
the
next
time
it
runs,
it
will
skip
Step
12.
12.The
BIOS
copies
itself
to
flash
at
0x80000,
and
switches
the
mapping
of
flash
and
RAM
so
that
RAM
is
at
0x80000
and
flash
is
at
0x00000.
As
soon
as
this
remapping
is
done,
the
BIOSís
execution
of
instructions
begins
happening
in
flash.
13.Dynamic
C
is
now
ready
to
compile
a
user
program.
When
the
user
compiles
his
pro-
gram
to
the
target,
it
is
first
written
to
a
file,
then
the
file
is
loaded
to
the
target
using
the
BIOS’
FSM.
The
file
is
used
as
an
intermediate
step
because
fix-ups
are
done
after
the
compilation
is
complete
and
all
unknown
addresses
are
resolved.
The
fix
ups
would
cause
extra
wear
on
the
flash
if
done
straight
to
the
flash.
14.When
the
program
is
fully
loaded,
Dynamic
C
sets
a
breakpoint
at
the
beginning
of
main
and
runs
the
program
up
to
the
breakpoint.
The
board
has
been
programmed,
and-
Dynamic
C
is
now
is
debug
mode.
15.If
the
programming
cable
is
removed
and
the
target
board
is
reset,
the
users
program
will
start
running
automatically
because
the
the
BIOS
will
check
the
SMODE
pins
to
determine
whether
to
run
the
user
application
or
enter
the
debug
kernel.

Other manuals for Rabbit 2000