📄 sh4-microdev-config.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
>Configuration</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="SuperH SH4-202 MicroDev Board Support"
HREF="hal-sh4-microdev-part.html"><LINK
REL="PREVIOUS"
TITLE="Setup"
HREF="sh4-microdev-setup.html"><LINK
REL="NEXT"
TITLE="The HAL Port"
HREF="sh4-microdev-port.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="sh4-microdev-setup.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="sh4-microdev-port.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="SH4-MICRODEV-CONFIG"
></A
>Configuration</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN19760"
></A
><H2
>Name</H2
>Configuration -- Platform-specific Configuration Options</DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SH4-MICRODEV-CONFIG-OVERVIEW"
></A
><H2
>Overview</H2
><P
>The MicroDev platform HAL package is loaded automatically when eCos is
configured for an <TT
CLASS="LITERAL"
>sh4_202_md</TT
> target. It should
never be necessary to load this package explicitly. Unloading the
package should only happen as a side effect of switching target
hardware.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SH4-MICRODEV-CONFIG-STARTUP"
></A
><H2
>Startup</H2
><P
>The MicroDev platform HAL package supports two separate startup types:
</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>RAM</DT
><DD
><P
>This is the startup type which is normally used during application
development. The board has RedBoot programmed into flash at location
0xA0000000 and boots from that location.
<SPAN
CLASS="APPLICATION"
>sh-elf-gdb</SPAN
> is then used to load a RAM
startup application into memory and debug it. It is assumed that the
hardware has already been initialized by RedBoot. By default the
application will use the eCos virtual vectors mechanism to obtain certain
services from RedBoot, including diagnostic output.
</P
></DD
><DT
>ROM</DT
><DD
><P
>This startup type can be used for finished applications which will
be programmed into flash at location 0xA0000000. The application will
be self-contained with no dependencies on services provided by other
software. eCos startup code will perform all necessary hardware
initialization.
</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SH4-MICRODEV-CONFIG-REDBOOT"
></A
><H2
>RedBoot and Virtual Vectors</H2
><P
>If the application is intended to act as a ROM monitor, providing
services for other applications, then the configuration option
<CODE
CLASS="VARNAME"
>CYGSEM_HAL_ROM_MONITOR</CODE
> should be set. Typically
this option is set only when building RedBoot.
</P
><P
>If the application is supposed to make use of services provided by a
ROM monitor, via the eCos virtual vector mechanism, then the
configuration option <CODE
CLASS="VARNAME"
>CYGSEM_HAL_USE_ROM_MONITOR</CODE
>
should be set. By default this option is enabled when building for a
RAM startup, disabled otherwise. It can be manually disabled for a RAM
startup, making the application self-contained, as a testing step
before switching to ROM startup.
</P
><P
>If the application does not rely on a ROM monitor for diagnostic
services then the serial port will be claimed for HAL
diagnostics.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SH4-MICRODEV-CONFIG-FLASH"
></A
><H2
>Flash Driver</H2
><P
>The MicroDev board contains 32Mb of Intel StrataFlash, specifically,
two E28F128 parts in parallel. The
<CODE
CLASS="VARNAME"
>CYGPKG_DEVS_FLASH_STRATA</CODE
> package contains all the
code necessary to support these parts and the
<CODE
CLASS="VARNAME"
>CYGPKG_DEVS_FLASH_SH_MICRODEV</CODE
> package contains
definitions that customize the driver to the MicroDev board.
</P
><P
>Note that if booting from EEPROM instead of flash, the flash driver will
not be able to detect or use the flash parts.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SH4-MICRODEV-CONFIG-ETH"
></A
><H2
>Ethernet Driver</H2
><P
>The MicroDev board contains an SMSC LAN91C111 ethernet device.
The
<CODE
CLASS="VARNAME"
>CYGPKG_DEVS_ETH_SMSC_LAN91CXX</CODE
> package contains all the
code necessary to support this part and the
<CODE
CLASS="VARNAME"
>CYGPKG_DEVS_ETH_SH_MICRODEV</CODE
> package contains
definitions that customize the driver to the MicroDev board.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SH4-MICRODEV-CONFIG-CLOCK"
></A
><H2
>System Clock</H2
><P
>By default, the system clock interrupts once every 10ms, corresponding
to a 100Hz clock. This can be changed by the configuration option
<CODE
CLASS="VARNAME"
>CYGNUM_HAL_RTC_DENOMINATOR</CODE
> which corresponds to the
clock frequency. Other clock-related settings are recalculated
automatically if the denominator is changed.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SH4-MICRODEV-CONFIG-FLAGS"
></A
><H2
>Compiler Flags</H2
><P
>The platform HAL defines the default compiler and linker flags for all
packages, although it is possible to override these on a per-package
basis. Most of the flags used are the same as for other architectures
supported by eCos. There are two flags specific to this port:
</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><CODE
CLASS="OPTION"
>-m4</CODE
></DT
><DD
><P
>The <SPAN
CLASS="APPLICATION"
>sh-elf-gcc</SPAN
> compiler supports many
variants of the SH architecture, from the SH2 onwards.
A <CODE
CLASS="OPTION"
>-m</CODE
> option should be used to select the specific
variant in use, and with current tools <CODE
CLASS="OPTION"
>-m4</CODE
> is the
correct option for the SH4-202.
</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="sh4-microdev-setup.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ecos-ref.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="sh4-microdev-port.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Setup</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="hal-sh4-microdev-part.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>The HAL Port</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -