📄 m68k-m5272c3-setup.html
字号:
<!-- Copyright (C) 2009 Free Software Foundation, Inc. -->
<!-- This material may be distributed only subject to the terms -->
<!-- and conditions set forth in the Open Publication License, v1.0 -->
<!-- or later (the latest version is presently available at -->
<!-- http://www.opencontent.org/openpub/). -->
<!-- Distribution of the work or derivative of the work in any -->
<!-- standard (paper) book form is prohibited unless prior -->
<!-- permission is obtained from the copyright holder. -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Setup</TITLE
><meta name="MSSmartTagsPreventParsing" content="TRUE">
<META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="eCos Reference Manual"
HREF="ecos-ref.html"><LINK
REL="UP"
TITLE="Freescale M5272C3 Board Support"
HREF="hal-m68k-m5272c3-part.html"><LINK
REL="PREVIOUS"
TITLE="Overview"
HREF="m68k-m5272c3.html"><LINK
REL="NEXT"
TITLE="Configuration"
HREF="m68k-m5272c3-config.html"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>eCos Reference Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="m68k-m5272c3.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="m68k-m5272c3-config.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="M68K-M5272C3-SETUP"
></A
>Setup</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN19404"
></A
><H2
>Name</H2
>Setup -- Preparing the M5272C3 board for eCos Development</DIV
><DIV
CLASS="REFSECT1"
><A
NAME="M68K-M5272C3-SETUP-OVERVIEW"
></A
><H2
>Overview</H2
><P
>In a typical development environment the M5272C3 board boots from
flash into the RedBoot ROM monitor. eCos applications are configured
for a RAM startup, and then downloaded and run on the board via the
debugger m68k-elf-gdb. Preparing the board therefore involves
programming a suitable RedBoot image into flash memory.
</P
><P
>The following RedBoot configurations are supported:
</P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><A
NAME="AEN19411"
></A
><TABLE
BORDER="1"
FRAME="border"
RULES="all"
CLASS="CALSTABLE"
><COL><COL><COL><COL><THEAD
><TR
><TH
>Configuration</TH
><TH
>Description</TH
><TH
>Use</TH
><TH
>File</TH
></TR
></THEAD
><TBODY
><TR
><TD
>ROM</TD
><TD
>RedBoot running from the board's flash</TD
><TD
>redboot_ROM.ecm</TD
><TD
>redboot_rom.bin</TD
></TR
><TR
><TD
>dBUG</TD
><TD
>Used for initial setup</TD
><TD
>redboot_DBUG.ecm</TD
><TD
>redboot_dbug.srec</TD
></TR
><TR
><TD
>RAM</TD
><TD
>Used for upgrading ROM version</TD
><TD
>redboot_RAM.ecm</TD
><TD
>redboot_ram.bin</TD
></TR
><TR
><TD
>ROMFFE</TD
><TD
>RedBoot running from the board's flash at 0xFFE00000</TD
><TD
>redboot_ROMFFE.ecm</TD
><TD
>redboot_romffe.bin</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
><P
>For serial communications all versions run with 8 bits, no parity, and
1 stop bit. The dBUG version runs at 19200 baud. The ROM and RAM
versions run at 38400 baud. These baud rates can be changed via the
configuration option
<CODE
CLASS="VARNAME"
>CYGNUM_HAL_M68K_MCFxxxx_DIAGNOSTICS_BAUD</CODE
> and
rebuilding RedBoot. By default RedBoot will use the board's terminal
port, corresponding to uart0, but this can also be changed via the
configuration option
<CODE
CLASS="VARNAME"
>CYGHWR_HAL_M68K_MCFxxxx_DIAGNOSTICS_PORT</CODE
>. On an
M5272C3 platform RedBoot also supports ethernet communication and
flash management.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="M68K-M5272C3-SETUP-FIRST"
></A
><H2
>Initial Installation</H2
><P
>This process assumes that the board still has its original dBUG ROM
monitor and does not require any special debug hardware. It leaves the
existing ROM monitor in place, allowing the setup process to be
repeated just in case that should ever prove necessary.
</P
><P
>Programming the RedBoot rom monitor into flash memory requires an
application that can manage flash blocks. RedBoot itself has this
capability. Rather than have a separate application that is used only
for flash management during the initial installation, a special
RAM-resident version of RedBoot is loaded into memory and run. This
version can then be used to load the normal flash-resident version of
RedBoot and program it into the flash.
</P
><P
>The first step is to connect an RS232 cable between the M5272C3
terminal port and the host PC. A suitable cable is supplied with the
board. Next start a terminal emulation application such as
HyperTerminal or minicom on the host PC and set the serial
communication parameters to 19200 baud, 8 data bits, no parity, 1 stop
bit (8N1) and no flow control (handshaking). Make sure that the jumper
next to the flash chip is set for bootstrap from the bottom of flash,
location 0xFFE00000. The details of this jumper depend on the revision
of the board, so the supplied board documentation should be consulted
for more details. Apply power to the board and you should see a
<SAMP
CLASS="PROMPT"
>dBUG></SAMP
> prompt.
</P
><P
>Once dBUG is up and running the RAM-resident version of RedBoot can be
downloaded:
</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>dBUG> dl
Escape to local host and send S-records now...
</PRE
></TD
></TR
></TABLE
><P
>The required S-records file is <TT
CLASS="FILENAME"
>redboot_dbug.srec</TT
>,
which is normally supplied with the eCos release in the <TT
CLASS="FILENAME"
>loaders</TT
> directory. If it needs to be
rebuilt then instructions for this are supplied <A
HREF="m68k-m5272c3-setup.html#M68K-M5272C3-SETUP-REBUILD"
>below</A
>. The file should be
sent to the target as raw text using the terminal emulator:
</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>S-record download successful!
dBUG>
</PRE
></TD
></TR
></TABLE
><P
>It is now possible to run the RAM-resident version of RedBoot:
</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>dBUG> go 0x20000
+FLASH configuration checksum error or invalid key
Ethernet eth0: MAC address 00:00:00:00:00:03
Can't get BOOTP info for device!
RedBoot(tm) bootstrap and debug environment [DBUG]
Non-certified release, version v2_0_1 - built 09:55:34, Jun 24 2003
Platform: M5272C3 (Freescale MCF5272)
Copyright (C) 2000, 2001, 2002, Free Software Foundation, Inc.
RAM: 0x00000000-0x00400000, 0x0003f478-0x003bd000 available
FLASH: 0xffe00000 - 0x00000000, 8 blocks of 0x00040000 bytes each.
RedBoot>
</PRE
></TD
></TR
></TABLE
><P
>At this stage the RedBoot flash management initialization has not yet
happened so the warning about the configuration checksum error is
expected. To perform this initialization use the
<B
CLASS="COMMAND"
>fis init -f</B
> command:
</P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>RedBoot> fis init -f
About to initialize [format] FLASH image system - continue (y/n)? y
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -