📄 appendix 1_ bdm adapt812 setup -- valvano.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0054)http://www.ece.utexas.edu/~valvano/embed/app1/app1.htm -->
<HTML><HEAD><TITLE>Appendix 1. BDM Adapt812 Setup -- Valvano</TITLE>
<META http-equiv=content-type content=text/html;charset=iso-8859-1>
<META content="MSHTML 5.50.3825.1300" name=GENERATOR>
<META
content="StarMax HD:Microsoft Office 98:Templates:Web Pages:Blank Web Page"
name=Template></HEAD>
<BODY vLink=#800080 link=#0000ff>
<P><!-- Developing Embedded Software in C using ICC11/ICC12 by Jonathan W. Valvano--><B><FONT
face=Helvetica size=4>Appendix 1. Kevin Ross/Adapt812 Setup </FONT></B></P>
<P><B><I><FONT face=Helvetica>What's in Appendix 1?</FONT></I></B></P>
<DIR>
<DIR>
<P><FONT face="Times New Roman,Times"><A
href="http://www.ece.utexas.edu/~valvano/embed/app1/app1.htm#BDM">Kevin Ross's
Background Debug Module</A> <BR><A
href="http://www.ece.utexas.edu/~valvano/embed/app1/app1.htm#ICC12">ICC12
options menu for developing software for the Adapt812</A> <BR><A
href="http://www.ece.utexas.edu/~valvano/embed/app1/app1.htm#ADAPT812">Adapt 812
Board Jumpers</A> <BR><A
href="http://www.ece.utexas.edu/~valvano/embed/app1/app1.htm#START">What you
need to get started</A> <BR><A
href="http://www.ece.utexas.edu/~valvano/embed/app1/app1.htm#PROCEDURE">Development
Procedure</A> <BR><A
href="http://www.ece.utexas.edu/~valvano/embed/app1/app1.htm#WEB">Web sites for
more information</A>. </FONT></P></DIR></DIR>
<P><B><I><FONT face=Helvetica><A name=BDM></A>Kevin Ross's Background Debug
Module/Adapt812</FONT></I></B></P>
<P><FONT face="Times New Roman,Times">Technological Arts makes a variety of low
cost 6812 products suitable for teaching laboratory classes. These boards are
convenient because they can be inserted directly into a standard protoboard. See
figures 1.28 and 1.47 in the book "Real time Embedded Systems" by Jonathan W.
Valvano. Notice that the Technological Arts boards have a male connector that
plugs into the student's female socket. If the students purchase their-own
protobaord, then the mechanical "wear and tear" occurs on the inexpensive
protoboard and not on the relatively-expensive microcomputer board.
Technological Arts can be reached at</FONT></P>
<UL>
<P><FONT face="Times New Roman,Times">Technological Arts<BR>26 Scollard
St.<BR>Toronto, Ontario, Canada M5R 1E9<BR>Phone 416-963-8996 Fax
416-963-9179<BR>http://www.technological-arts.com</FONT></P></UL>
<P><FONT face="Times New Roman,Times">The Kevin Ross BDM-12 is a debugging
interface between the PC and the Adapt812. It allows us to download programs,
view/change registers, view/change memory, single step, and run software. If you
have a logic analyzer for debugging, you can use the BDM-12 to modify the
MC68HC812A4 mode so that the address and data bus are available on the Adapt812
H2 connector. With Windows 3.1, you will run Kevin Ross’s DOS-level DOS12.EXE
program. With Windows NT or 95, you will run Kevin Ross’s DOS-level DB12.EXE
program. For more information about the Kevin Ross BDM board contact, "Kevin
Ross" <A href="mailto:kevinro@nwlink.com">kevinro@nwlink.com</A></FONT></P>
<P><IMG height=359 src="Appendix 1_ BDM Adapt812 Setup -- Valvano.files/BDM.GIF"
width=370></P>
<ADDRESS>Figure 1: The Kevin Ross BDM is used to program the Adapt812</ADDRESS>
<P><FONT face="Times New Roman,Times">The proper DIP settings on the Kevin Ross
BDM-12 board are</FONT></P>
<DIR>
<DIR>
<P><FONT face="Times New Roman,Times">1 ON for 38400 bits/sec<BR>2 OFF for
debugger mode<BR>3 OFF for 8 MHz 6812<BR>4 OFF for 8 MHz
6812</FONT></P></DIR></DIR>
<P><FONT face="Times New Roman,Times">The ribbon cable between the Kevin Ross
BDM-12 and the Technological Arts Adapt812 should be attached so that Pin 1 is
connected to Pin 1. It is possible to reverse the polarity so be careful. The
Technological Arts APAPT812 settings:</FONT></P>
<DIR>
<DIR>
<P><I><FONT face="Times New Roman,Times">Run/Boot </FONT></I><FONT
face="Times New Roman,Times">switch should be in the <I>Run</I>
position<BR><I>MODA/MODB</I> jumpers should both be in the <I>0 </I>position for
single chip mode.</FONT></P></DIR></DIR>
<P><FONT face="Times New Roman,Times">The Adapt812 board can accept power from
one of two sources. We will use an unregulated AC adapter (greater than 6 volts)
connected to the power connector J1. The other option for the Adapt812 would be
to connect a regulated +5v supply to the H1 connect. The BDM-12 helper board
received its power from the Adapt812 through the BDM cable.</FONT></P>
<P><B><I><FONT face=Helvetica><A name=ICC12></A>ICC12 options menu for
developing software for the Adapt812</FONT></I></B></P>
<P><FONT face="Times New Roman,Times">On the ICC12 development system, we use
the </FONT><FONT face=Monaco>options_compiler_linker</FONT><FONT
face="Times New Roman,Times"> menu command to specify where the start of globals
(the data section grows towards higher addresses), and the start of the object
code (the text section grows towards higher addresses). The initial stack
pointer (stack grows towards lower addresses), is specified in </FONT><FONT
face=Monaco>options_compiler_linker </FONT><FONT
face="Times New Roman,Times">menu. On our Adapt812 system,</FONT></P>
<DIR>
<P><FONT face="Times New Roman,Times">the <A
href="http://www.ece.utexas.edu/~valvano/embed/chap4/chap4.htm#STATIC">static
variables</A> (data section) should start at the start of RAM, 0x0800<BR>the
program (text section) should start at the start of EEPROM, 0xF000<BR>the <A
href="http://www.ece.utexas.edu/~valvano/embed/chap4/chap4.htm#AUTOMATIC">automatics</A>
(stack) could be set at the end of RAM, 0x0C00<BR>the Library path is set to
e:\mc6812\lib<BR>the "Create Map File" button is selected<BR>the "Heap size" is
0. </FONT></P></DIR>
<P><IMG height=276
src="Appendix 1_ BDM Adapt812 Setup -- Valvano.files/ICC12A.GIF" width=430></P>
<ADDRESS>Figure 2: ICC12 linker settings when using the Adapt812</ADDRESS>
<P><FONT face="Times New Roman,Times">We use the</FONT><FONT face=Monaco>
options_compiler_compiler</FONT><FONT face="Times New Roman,Times"> dialog to
specify that C source code be added to the Asm Output on our Adapt812
system,</FONT></P>
<P><IMG height=276
src="Appendix 1_ BDM Adapt812 Setup -- Valvano.files/ICC12B.GIF" width=429></P>
<ADDRESS>Figure 3: ICC12 compiler settings when using the Adapt812</ADDRESS>
<P><FONT face="Times New Roman,Times">Check the "Emit Interspersed C Source in
Asm Output" button.</FONT></P>
<P><A name=CPPCOMMENT></A>We use the <FONT
face=Monaco>options_compiler_preprocessor</FONT> dialog to specify that C++
comments can be used. On our Adapt812 system,</P>
<P><IMG height=276
src="Appendix 1_ BDM Adapt812 Setup -- Valvano.files/ICC12C.GIF" width=429></P>
<ADDRESS>Figure 4: ICC12 preprocessor settings when using the Adapt812</ADDRESS>
<P><FONT face="Times New Roman,Times">Check the "Accepts C++ Comments"
button.</FONT></P>
<P><B><I><FONT face=Helvetica><A name=ADAPT812></A>Adapt 812 Board
Jumpers</FONT></I></B></P>
<P><FONT face="Times New Roman,Times">JB1 has two jumpers for MODA and MODB.
They both should be in the 0 position. This will bring the MC68HC812 up in
single chip mode, placing the 4K EEPROM from $F000 to $FFFF. There is a run/boot
switch that should be in the "run" position. There is a boot loader in high
EEPROM memory that can be used to program the Adapt812 from a serial port
without the need for a Kevin Ross BDM. This procedure places the run/boot switch
in the "boot" position.</FONT></P>
<P><B><I><FONT face=Helvetica><A name=START></A>What you need to get
started</FONT></I></B></P>
<P><FONT face=Helvetica>Software</FONT></P>
<P><FONT face="Times New Roman,Times">The most expensive piece of software you
will need is a compiler. Information about ImageCraft ICC12 can be found from
the web site <A
href="http://www.imagecraft.com/">http://www.imagecraft.com/</A>. The mailing
address is ImageCraft, 706 Colorado Ave. Suite 10-88, Palo Alto, CA 94303. If a
compiler is unavailable, you could use the TExaS simulator and develop 6812
programs in assembly. TExaS can generate S19 records for downloading. There is a
free ICC11 C compiler on the TExaS CD. </FONT></P>
<P><FONT face=Helvetica>Power Adapter</FONT></P>
<P><FONT face="Times New Roman,Times">To run the Adapt812, you will need 5.5 to
9 VDC unregulated power source with a current of at least 100ma, plus the
additional current your external circuits need. </FONT></P>
<P><FONT face=Helvetica>Serial Cables</FONT></P>
<P><FONT face="Times New Roman,Times">The cables between the PC and the
development boards are standard 9 pin null modem serial cables.</FONT></P>
<P><I><FONT face="Times New Roman,Times">Downloading
Hardware<BR></FONT></I><FONT face="Times New Roman,Times">There are three ways
to program the Adapt812. You can purchase a Kevin Ross board (it does come in
kit form). With this board you download using the DOS-level application
DL12.exe. Second, you purchase a Motorola MC68HC912B32 EVB board and run it in
BDM POD mode. The ICC12 compiler supports this configuration. I.e., the PC
connected to a 912EVB in POD mode, connected to the 812A4 target. Lastly, the
Adapt812 board has a boot loader that can accept S19 records directly from the
PC. The disadvantages of this method are there is no verify and no debugging
support (but it is cheap.)</FONT></P>
<P><B><I><FONT face=Helvetica><A name=PROCEDURE></A>Development
Procedure</FONT></I></B></P>
<P><FONT face="Times New Roman,Times">The following steps are required for the
project development:</FONT></P>
<DIR>
<DIR>
<P><FONT face="Times New Roman,Times">1. Design the software<BR>2. Design the
hardware(if any)<BR>3. Using ICC12, write(modify) the code<BR>4. Remove compiler
or assembly errors from the code, and also any logical errors in the code which
you think might be present, print out the MAP file to assist in debugging<BR>5.
Build the hardware(if any) on your own protoboard<BR>6. Eliminate as many
hardware errors as possible before connecting to the 68HC812.<BR>7. With the
power of the PC and BDM-12 off, connect a PC serial port to the BDM-12 helper
board <BR>8. Using DL12.EXE, down load the object code of your software into the
68HC812. <BR>while running DL12 can observe memory<BR>while stopped DL12 can
observe/modify memory and registers</FONT></P>
<P> </P></DIR></DIR>
<P><B><I><FONT face=Helvetica><A name=WEB></A>Web sites for more
information</FONT><FONT face=Helvetica size=4> </FONT></I></B></P>
<P>
<TABLE cellSpacing=0 cellPadding=0 width=477 border=0>
<TBODY>
<TR>
<TD vAlign=top width="34%"><FONT
face="Times New Roman,Times">Technological Arts:</FONT></TD>
<TD vAlign=top width="66%"><FONT face="Times New Roman,Times"><A
href="http://www.technological-arts.com/">http://www.technological-arts.com/</A></FONT></TD></TR>
<TR>
<TD vAlign=top width="34%"><FONT face="Times New Roman,Times">electronic
parts at:</FONT></TD>
<TD vAlign=top width="66%"><FONT face="Times New Roman,Times"><A
href="http://www.bgmicro.com/">http://www.bgmicro.com/</A></FONT></TD></TR>
<TR>
<TD vAlign=top width="34%"><FONT face="Times New Roman,Times">robot parts
at:</FONT></TD>
<TD vAlign=top width="66%"><FONT face="Times New Roman,Times"><A
href="http://www.robotstore.com/">http://www.robotstore.com/</A></FONT></TD></TR>
<TR>
<TD vAlign=top width="34%"><FONT face="Times New Roman,Times">ICC11/ICC12
at:</FONT></TD>
<TD vAlign=top width="66%"><FONT face="Times New Roman,Times"><A
href="http://www.imagecraft.com/">http://www.imagecraft.com/</A></FONT></TD></TR></TBODY></TABLE></P>
<P> </P>
<P><FONT face="Times New Roman,Times">Return to <A
href="http://www.ece.utexas.edu/~valvano/embed/toc1.htm">Table of Contents</A>
</FONT></P>
<P> </P></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -