OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [user-guide/] [setup-arm-pid.html] - Diff between revs 28 and 174

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 28 Rev 174
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
<!-- This material may be distributed only subject to the terms      -->
<!-- This material may be distributed only subject to the terms      -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- and conditions set forth in the Open Publication License, v1.0  -->
<!-- or later (the latest version is presently available at          -->
<!-- or later (the latest version is presently available at          -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- http://www.opencontent.org/openpub/).                           -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- Distribution of the work or derivative of the work in any       -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- standard (paper) book form is prohibited unless prior           -->
<!-- permission is obtained from the copyright holder.               -->
<!-- permission is obtained from the copyright holder.               -->
<HTML
<HTML
><HEAD
><HEAD
><TITLE
><TITLE
>ARM PID Hardware Setup</TITLE
>ARM PID Hardware Setup</TITLE
><meta name="MSSmartTagsPreventParsing" content="TRUE">
><meta name="MSSmartTagsPreventParsing" content="TRUE">
<META
<META
NAME="GENERATOR"
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
"><LINK
REL="HOME"
REL="HOME"
TITLE="eCos User Guide"
TITLE="eCos User Guide"
HREF="ecos-user-guide.html"><LINK
HREF="ecos-user-guide.html"><LINK
REL="UP"
REL="UP"
TITLE="Target Setup"
TITLE="Target Setup"
HREF="appendix-target-setup.html"><LINK
HREF="appendix-target-setup.html"><LINK
REL="PREVIOUS"
REL="PREVIOUS"
TITLE="SPARClite Architectural Simulator Setup"
TITLE="SPARClite Architectural Simulator Setup"
HREF="setup-sparclite-sim.html"><LINK
HREF="setup-sparclite-sim.html"><LINK
REL="NEXT"
REL="NEXT"
TITLE="ARM AEB-1 Hardware Setup"
TITLE="ARM AEB-1 Hardware Setup"
HREF="setup-arm-aeb1.html"></HEAD
HREF="setup-arm-aeb1.html"></HEAD
><BODY
><BODY
CLASS="SECT1"
CLASS="SECT1"
BGCOLOR="#FFFFFF"
BGCOLOR="#FFFFFF"
TEXT="#000000"
TEXT="#000000"
LINK="#0000FF"
LINK="#0000FF"
VLINK="#840084"
VLINK="#840084"
ALINK="#0000FF"
ALINK="#0000FF"
><DIV
><DIV
CLASS="NAVHEADER"
CLASS="NAVHEADER"
><TABLE
><TABLE
SUMMARY="Header navigation table"
SUMMARY="Header navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TH
><TH
COLSPAN="3"
COLSPAN="3"
ALIGN="center"
ALIGN="center"
>eCos User Guide</TH
>eCos User Guide</TH
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="left"
ALIGN="left"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="setup-sparclite-sim.html"
HREF="setup-sparclite-sim.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="80%"
WIDTH="80%"
ALIGN="center"
ALIGN="center"
VALIGN="bottom"
VALIGN="bottom"
>Appendix A. Target Setup</TD
>Appendix A. Target Setup</TD
><TD
><TD
WIDTH="10%"
WIDTH="10%"
ALIGN="right"
ALIGN="right"
VALIGN="bottom"
VALIGN="bottom"
><A
><A
HREF="setup-arm-aeb1.html"
HREF="setup-arm-aeb1.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"></DIV
WIDTH="100%"></DIV
><DIV
><DIV
CLASS="SECT1"
CLASS="SECT1"
><H1
><H1
CLASS="SECT1"
CLASS="SECT1"
><A
><A
NAME="SETUP-ARM-PID">ARM PID Hardware Setup</H1
NAME="SETUP-ARM-PID">ARM PID Hardware Setup</H1
><P
><P
>eCos comes with two ROM images that provide GDB support for
>eCos comes with two ROM images that provide GDB support for
the ARM PID board. The first ROM image provides a port of the CygMon
the ARM PID board. The first ROM image provides a port of the CygMon
ROM monitor, which includes a command-line interface and a GDB remote
ROM monitor, which includes a command-line interface and a GDB remote
stub. The second ROM image provides a remote GDB stub only, which
stub. The second ROM image provides a remote GDB stub only, which
is a minimal environment for downloading and debugging eCos programs
is a minimal environment for downloading and debugging eCos programs
solely using GDB.</P
solely using GDB.</P
><P
><P
>eCos, CygMon and the GDB stubs all support the PID fitted
>eCos, CygMon and the GDB stubs all support the PID fitted
with both ARM7T and ARM9 daughterboards. CygMon and the stubs can
with both ARM7T and ARM9 daughterboards. CygMon and the stubs can
be programmed into either the programmable ROM (U12) or the FLASH
be programmed into either the programmable ROM (U12) or the FLASH
(U13). Pre-built forms of both ROM images are provided in the directory
(U13). Pre-built forms of both ROM images are provided in the directory
loaders/arm-pid under the root of your eCos installation,
loaders/arm-pid under the root of your eCos installation,
along with a tool that will program the stubs into the FLASH memory on
along with a tool that will program the stubs into the FLASH memory on
the board. CygMon images are prefixed with the name 'cygmon' and
the board. CygMon images are prefixed with the name 'cygmon' and
GDB stub ROM images are given the prefix 'gdb_module'.
GDB stub ROM images are given the prefix 'gdb_module'.
Images may be provided in a number of formats including ELF (.img
Images may be provided in a number of formats including ELF (.img
extension), binary (.bin extension) and SREC (.srec extension).
extension), binary (.bin extension) and SREC (.srec extension).
Note that some unreliability has been experienced in downloading
Note that some unreliability has been experienced in downloading
files using Angel 1.00. Angel 1.02 appears to be more robust in
files using Angel 1.00. Angel 1.02 appears to be more robust in
this application.</P
this application.</P
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="AEN3542">Installing the Stubs into FLASH</H2
NAME="AEN3542">Installing the Stubs into FLASH</H2
><DIV
><DIV
CLASS="SECT3"
CLASS="SECT3"
><H3
><H3
CLASS="SECT3"
CLASS="SECT3"
><A
><A
NAME="AEN3544">Preparing the Binaries</H3
NAME="AEN3544">Preparing the Binaries</H3
><P
><P
>These two binary preparation steps are not strictly necessary
>These two binary preparation steps are not strictly necessary
as the eCos distribution ships with pre-compiled binaries in the
as the eCos distribution ships with pre-compiled binaries in the
directory loaders/arm-pid relative to the installation
directory loaders/arm-pid relative to the installation
root.</P
root.</P
></DIV
></DIV
><DIV
><DIV
CLASS="SECT3"
CLASS="SECT3"
><H3
><H3
CLASS="SECT3"
CLASS="SECT3"
><A
><A
NAME="AEN3547">Building the ROM images with the eCos Configuration Tool</H3
NAME="AEN3547">Building the ROM images with the eCos Configuration Tool</H3
><P
><P
></P
></P
><OL
><OL
TYPE="1"
TYPE="1"
><LI
><LI
><P
><P
>Start with a new document - selecting the
>Start with a new document - selecting the
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>File</I
>File</I
></SPAN
></SPAN
>-&#62;<SPAN
>-&#62;<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>New</I
>New</I
></SPAN
></SPAN
>
>
 menu item if necessary to do this.</P
 menu item if necessary to do this.</P
></LI
></LI
><LI
><LI
><P
><P
>Choose the
>Choose the
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>Build</I
>Build</I
></SPAN
></SPAN
>
>
-&#62;
-&#62;
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>Templates</I
>Templates</I
></SPAN
></SPAN
>
>
 menu item, and then select the ARM PID hardware.</P
 menu item, and then select the ARM PID hardware.</P
></LI
></LI
><LI
><LI
><P
><P
>While still displaying the
>While still displaying the
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>Build</I
>Build</I
></SPAN
></SPAN
>
>
-&#62;
-&#62;
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>Templates</I
>Templates</I
></SPAN
></SPAN
>
>
 dialog box, select either the "stubs" package template to build
 dialog box, select either the "stubs" package template to build
a GDB stub image, or the "cygmon" template to build the CygMon ROM
a GDB stub image, or the "cygmon" template to build the CygMon ROM
Monitor. Click
Monitor. Click
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>OK</I
>OK</I
></SPAN
></SPAN
>.</P
>.</P
></LI
></LI
><LI
><LI
><P
><P
>Build eCos using
>Build eCos using
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>Build</I
>Build</I
></SPAN
></SPAN
>
>
-&#62;
-&#62;
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>Library</I
>Library</I
></SPAN
></SPAN
></P
></P
></LI
></LI
><LI
><LI
><P
><P
>When the build completes, the image files can be found
>When the build completes, the image files can be found
in the bin/ subdirectory of the install tree. GDB stub
in the bin/ subdirectory of the install tree. GDB stub
ROM images have the prefix "gdb_module". CygMon images
ROM images have the prefix "gdb_module". CygMon images
have the prefix "cygmon".</P
have the prefix "cygmon".</P
></LI
></LI
></OL
></OL
></DIV
></DIV
><DIV
><DIV
CLASS="SECT3"
CLASS="SECT3"
><H3
><H3
CLASS="SECT3"
CLASS="SECT3"
><A
><A
NAME="AEN3569">Building the ROM images with ecosconfig</H3
NAME="AEN3569">Building the ROM images with ecosconfig</H3
><P
><P
></P
></P
><OL
><OL
TYPE="1"
TYPE="1"
><LI
><LI
><P
><P
>                   Make an empty directory to contain the build tree,
>                   Make an empty directory to contain the build tree,
and cd into it.</P
and cd into it.</P
></LI
></LI
><LI
><LI
><P
><P
>To build a GDB stub ROM image, enter the command:</P
>To build a GDB stub ROM image, enter the command:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>$ ecosconfig new pid stubs</PRE
>$ ecosconfig new pid stubs</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>or to build a CygMon ROM monitor image, enter the command:</P
>or to build a CygMon ROM monitor image, enter the command:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>$ ecosconfig new pid cygmon</PRE
>$ ecosconfig new pid cygmon</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></LI
></LI
><LI
><LI
><P
><P
>Enter the commands:</P
>Enter the commands:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>$ ecosconfig tree
>$ ecosconfig tree
$ make</PRE
$ make</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></LI
></LI
><LI
><LI
><P
><P
>When the build completes, the image files can be found
>When the build completes, the image files can be found
in the bin/ subdirectory of the install tree. GDB stub
in the bin/ subdirectory of the install tree. GDB stub
ROM images have the prefix "gdb_module". CygMon images
ROM images have the prefix "gdb_module". CygMon images
have the prefix "cygmon".</P
have the prefix "cygmon".</P
></LI
></LI
></OL
></OL
></DIV
></DIV
><DIV
><DIV
CLASS="SECT3"
CLASS="SECT3"
><H3
><H3
CLASS="SECT3"
CLASS="SECT3"
><A
><A
NAME="AEN3584">Building the FLASH Tool with the eCos Configuration Tool</H3
NAME="AEN3584">Building the FLASH Tool with the eCos Configuration Tool</H3
><P
><P
></P
></P
><OL
><OL
TYPE="1"
TYPE="1"
><LI
><LI
><P
><P
>Start with a new document - selecting the
>Start with a new document - selecting the
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>File</I
>File</I
></SPAN
></SPAN
>-&#62;<SPAN
>-&#62;<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>New</I
>New</I
></SPAN
></SPAN
>
>
 menu item if necessary to do this.</P
 menu item if necessary to do this.</P
></LI
></LI
><LI
><LI
><P
><P
>Choose the
>Choose the
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>Build</I
>Build</I
></SPAN
></SPAN
>-&#62;<SPAN
>-&#62;<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>Templates</I
>Templates</I
></SPAN
></SPAN
>
>
 menu item, and then select the ARM PID hardware.</P
 menu item, and then select the ARM PID hardware.</P
></LI
></LI
><LI
><LI
><P
><P
>Enable the "Build flash programming tool" option in the
>Enable the "Build flash programming tool" option in the
ARM PID HAL (CYGBLD_BUILD_FLASH_TOOL)
ARM PID HAL (CYGBLD_BUILD_FLASH_TOOL)
and resolve any resulting configuration conflicts.</P
and resolve any resulting configuration conflicts.</P
></LI
></LI
><LI
><LI
><P
><P
>Build eCos using
>Build eCos using
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>Build</I
>Build</I
></SPAN
></SPAN
>
>
-&#62;
-&#62;
<SPAN
<SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>Library</I
>Library</I
></SPAN
></SPAN
></P
></P
></LI
></LI
><LI
><LI
><P
><P
>When the build completes, the FLASH tool image file can
>When the build completes, the FLASH tool image file can
be found in the bin/ subdirectory of the install tree,
be found in the bin/ subdirectory of the install tree,
with the prefix "prog_flash"</P
with the prefix "prog_flash"</P
></LI
></LI
></OL
></OL
></DIV
></DIV
><DIV
><DIV
CLASS="SECT3"
CLASS="SECT3"
><H3
><H3
CLASS="SECT3"
CLASS="SECT3"
><A
><A
NAME="AEN3603">Building the FLASH Tool with ecosconfig</H3
NAME="AEN3603">Building the FLASH Tool with ecosconfig</H3
><P
><P
></P
></P
><OL
><OL
TYPE="1"
TYPE="1"
><LI
><LI
><P
><P
>                   Make an empty directory to contain the build tree,
>                   Make an empty directory to contain the build tree,
and cd into it
and cd into it
                    </P
                    </P
></LI
></LI
><LI
><LI
><P
><P
>Enter the command:</P
>Enter the command:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>$ ecosconfig new pid</PRE
>$ ecosconfig new pid</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></LI
></LI
><LI
><LI
><P
><P
>Edit the file ecos.ecc and enable the option CYGBLD_BUILD_FLASH_TOOL
>Edit the file ecos.ecc and enable the option CYGBLD_BUILD_FLASH_TOOL
by uncommenting its user_value property and setting it
by uncommenting its user_value property and setting it
to 1.</P
to 1.</P
></LI
></LI
><LI
><LI
><P
><P
>Enter the commands:</P
>Enter the commands:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>$ ecosconfig resolve</PRE
>$ ecosconfig resolve</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
><P
><P
>[there will be some output]</P
>[there will be some output]</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>$ ecosconfig tree
>$ ecosconfig tree
$ make</PRE
$ make</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></LI
></LI
><LI
><LI
><P
><P
>When the build completes, the FLASH tool image file can
>When the build completes, the FLASH tool image file can
be found in the bin/ subdirectory of the install tree,
be found in the bin/ subdirectory of the install tree,
with the prefix "prog_flash"</P
with the prefix "prog_flash"</P
></LI
></LI
></OL
></OL
></DIV
></DIV
><DIV
><DIV
CLASS="SECT3"
CLASS="SECT3"
><H3
><H3
CLASS="SECT3"
CLASS="SECT3"
><A
><A
NAME="AEN3620">Prepare the Board for FLASH Programming</H3
NAME="AEN3620">Prepare the Board for FLASH Programming</H3
><P
><P
>Each time a new image is to be programmed in the FLASH, the
>Each time a new image is to be programmed in the FLASH, the
jumpers on the board must be set to allow Angel to run:</P
jumpers on the board must be set to allow Angel to run:</P
><P
><P
></P
></P
><OL
><OL
TYPE="1"
TYPE="1"
><LI
><LI
><P
><P
>                   Set jumper 7-8 on LK6   [using the Angel code
>                   Set jumper 7-8 on LK6   [using the Angel code
in the 16 bit EPROM]</P
in the 16 bit EPROM]</P
></LI
></LI
><LI
><LI
><P
><P
>Set jumper 5-6 on LK6   [select 8bit ROM mode]</P
>Set jumper 5-6 on LK6   [select 8bit ROM mode]</P
></LI
></LI
><LI
><LI
><P
><P
>Set jumper LK18         [ROM remap - this is
>Set jumper LK18         [ROM remap - this is
also required for eCos]</P
also required for eCos]</P
></LI
></LI
><LI
><LI
><P
><P
>Set S1 to 0-0-1-1       [20MHz operation]</P
>Set S1 to 0-0-1-1       [20MHz operation]</P
></LI
></LI
><LI
><LI
><P
><P
>Open jumper LK4  [enable little-endian operation]
>Open jumper LK4  [enable little-endian operation]
 
 
Attach a serial cable from Serial A on the PID board to connector
Attach a serial cable from Serial A on the PID board to connector
1 on the development system. This is the cable through which the
1 on the development system. This is the cable through which the
binaries will be downloaded. Attach a serial cable from Serial B
binaries will be downloaded. Attach a serial cable from Serial B
on the PID board to connector 2 on the development system (or any
on the PID board to connector 2 on the development system (or any
system that will work as a terminal). Through this cable, the FLASH
system that will work as a terminal). Through this cable, the FLASH
tool will write its instructions (at 38400 baud).</P
tool will write its instructions (at 38400 baud).</P
></LI
></LI
></OL
></OL
></DIV
></DIV
><DIV
><DIV
CLASS="SECT3"
CLASS="SECT3"
><H3
><H3
CLASS="SECT3"
CLASS="SECT3"
><A
><A
NAME="AEN3634">Program the FLASH</H3
NAME="AEN3634">Program the FLASH</H3
><P
><P
></P
></P
><OL
><OL
TYPE="1"
TYPE="1"
><LI
><LI
><P
><P
>Download the FLASH ROM image onto the PID board. For
>Download the FLASH ROM image onto the PID board. For
example. for the GDB stubs image:
example. for the GDB stubs image:
 
 
<TABLE
<TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>bash$ arm-elf-gdb -nw gdb_module.img
>bash$ arm-elf-gdb -nw gdb_module.img
GNU gdb 4.18-DEVTOOLSVERSION
GNU gdb 4.18-DEVTOOLSVERSION
Copyright 1998 Free Software Foundation, Inc.
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License,
GDB is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies
and you are welcome to change it and/or distribute copies
of it under certain conditions. Type "show copying" to see the conditions.
of it under certain conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i586-pc-cygwin32 --target=arm-elf".
This GDB was configured as "--host=i586-pc-cygwin32 --target=arm-elf".
(no debugging symbols found)...
(no debugging symbols found)...
(gdb) target rdi s=com1
(gdb) target rdi s=com1
Angel Debug Monitor for PID (Built with Serial(x1), Parallel, DCC) 1.00
Angel Debug Monitor for PID (Built with Serial(x1), Parallel, DCC) 1.00
(Advanced RISC Machines SDT 2.10)
(Advanced RISC Machines SDT 2.10)
Angel Debug Monitor rebuilt on Jan 20 1997 at 02:33:43
Angel Debug Monitor rebuilt on Jan 20 1997 at 02:33:43
Connected to ARM RDI target.
Connected to ARM RDI target.
(gdb) load
(gdb) load
Loading section .rom_vectors, size 0x44 lma 0x60000
Loading section .rom_vectors, size 0x44 lma 0x60000
Loading section .text, size 0x1f3c lma 0x60044
Loading section .text, size 0x1f3c lma 0x60044
Loading section .rodata, size 0x2c lma 0x61f80
Loading section .rodata, size 0x2c lma 0x61f80
Loading section .data, size 0x124 lma 0x61fac
Loading section .data, size 0x124 lma 0x61fac
Start address 0x60044 , load size 8400
Start address 0x60044 , load size 8400
Transfer rate: 5169 bits/sec.
Transfer rate: 5169 bits/sec.
(gdb) q
(gdb) q
The program is running.  Exit anyway? (y or n) y </PRE
The program is running.  Exit anyway? (y or n) y </PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
>
>
 
 
<DIV
<DIV
CLASS="NOTE"
CLASS="NOTE"
><BLOCKQUOTE
><BLOCKQUOTE
CLASS="NOTE"
CLASS="NOTE"
><P
><P
><B
><B
>Note: </B
>Note: </B
> On a UNIX or Linux system, the serial port must be
> On a UNIX or Linux system, the serial port must be
 /dev/ttyS0 instead of COM1.
 /dev/ttyS0 instead of COM1.
 You need to make sure that the /dev/ttyS0 files
 You need to make sure that the /dev/ttyS0 files
have the right permissions:
have the right permissions:
<TABLE
<TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SCREEN"
CLASS="SCREEN"
>$ su
>$ su
 Password:
 Password:
 # chmod o+rw /dev/ttyS0*
 # chmod o+rw /dev/ttyS0*
 # exit
 # exit
                      </PRE
                      </PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
>
>
If you are programming the GDB stub image, it will now be located
If you are programming the GDB stub image, it will now be located
at 0x60000..0x64000. If you are programming the Cygmon ROM Monitor,
at 0x60000..0x64000. If you are programming the Cygmon ROM Monitor,
it will be located at 0x60000..0x80000.</P
it will be located at 0x60000..0x80000.</P
></BLOCKQUOTE
></BLOCKQUOTE
></DIV
></DIV
></P
></P
></LI
></LI
><LI
><LI
><P
><P
>Now download the FLASH programmer tool</P
>Now download the FLASH programmer tool</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>bash$ arm-elf-gdb prog_flash.img
>bash$ arm-elf-gdb prog_flash.img
GNU gdb 4.18-DEVTOOLSVERSION
GNU gdb 4.18-DEVTOOLSVERSION
Copyright 1998 Free Software Foundation, Inc.
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License,
GDB is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute
and you are welcome to change it and/or distribute
copies of it under certain conditions. Type "show copying" to see
copies of it under certain conditions. Type "show copying" to see
the conditions. There is absolutely no warranty for GDB.  Type "show
the conditions. There is absolutely no warranty for GDB.  Type "show
warranty" for details.
warranty" for details.
This GDB was configured as "--host=i586-pc-cygwin32 --target=arm-elf".
This GDB was configured as "--host=i586-pc-cygwin32 --target=arm-elf".
(gdb) target rdi s=com1
(gdb) target rdi s=com1
Angel Debug Monitor for PID (Built with Serial(x1), Parallel, DCC) 1.00
Angel Debug Monitor for PID (Built with Serial(x1), Parallel, DCC) 1.00
(Advanced RISC Machines SDT 2.10)
(Advanced RISC Machines SDT 2.10)
Angel Debug Monitor rebuilt on Jan 20 1997 at 02:33:43
Angel Debug Monitor rebuilt on Jan 20 1997 at 02:33:43
Connected to ARM RDI target.
Connected to ARM RDI target.
(gdb) load
(gdb) load
Loading section .rom_vectors, size 0x44 lma 0x40000
Loading section .rom_vectors, size 0x44 lma 0x40000
Loading section .text, size 0x44a4 lma 0x40044
Loading section .text, size 0x44a4 lma 0x40044
Loading section .rodata, size 0x318 lma 0x444e8
Loading section .rodata, size 0x318 lma 0x444e8
Loading section .data, size 0x1c8 lma 0x44800
Loading section .data, size 0x1c8 lma 0x44800
Start address 0x40044 , load size 18888
Start address 0x40044 , load size 18888
Transfer rate: 5596 bits/sec.
Transfer rate: 5596 bits/sec.
(gdb) c</PRE
(gdb) c</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></LI
></LI
><LI
><LI
><P
><P
>The FLASH tool will output some text on the board serial
>The FLASH tool will output some text on the board serial
port B at 38400 baud:</P
port B at 38400 baud:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>ARM
>ARM
eCos
eCos
 
 
FLASH here!
FLASH here!
manuf: 8, device: 40
manuf: 8, device: 40
Error: Wrong Manufaturer: 08
Error: Wrong Manufaturer: 08
... Please change FLASH jumper</PRE
... Please change FLASH jumper</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></LI
></LI
><LI
><LI
><P
><P
>This text is repeated until you remove the jumper 7-8
>This text is repeated until you remove the jumper 7-8
on LK6. Then the output will be:</P
on LK6. Then the output will be:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="PROGRAMLISTING"
CLASS="PROGRAMLISTING"
>manuf: 1F, device: A4
>manuf: 1F, device: A4
AT29C040A recognised
AT29C040A recognised
About to program FLASH using data at 60000..64000
About to program FLASH using data at 60000..64000
*** Press RESET now to abort!</PRE
*** Press RESET now to abort!</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></LI
></LI
><LI
><LI
><P
><P
> You have about 10 seconds to abort the operation by pressing
> You have about 10 seconds to abort the operation by pressing
reset. After this timeout, the FLASH programming happens:</P
reset. After this timeout, the FLASH programming happens:</P
><TABLE
><TABLE
BORDER="5"
BORDER="5"
BGCOLOR="#E0E0F0"
BGCOLOR="#E0E0F0"
WIDTH="70%"
WIDTH="70%"
><TR
><TR
><TD
><TD
><PRE
><PRE
CLASS="SCREEN"
CLASS="SCREEN"
>...Programming FLASH
>...Programming FLASH
All done!</PRE
All done!</PRE
></TD
></TD
></TR
></TR
></TABLE
></TABLE
></LI
></LI
><LI
><LI
><P
><P
>Quit/kill the GDB process, which will hang.</P
>Quit/kill the GDB process, which will hang.</P
></LI
></LI
><LI
><LI
><P
><P
>Next time you reset the board, the stub will be in control,
>Next time you reset the board, the stub will be in control,
communicating on Serial A at 38400 baud.</P
communicating on Serial A at 38400 baud.</P
></LI
></LI
></OL
></OL
><DIV
><DIV
CLASS="NOTE"
CLASS="NOTE"
><BLOCKQUOTE
><BLOCKQUOTE
CLASS="NOTE"
CLASS="NOTE"
><P
><P
><B
><B
>Note: </B
>Note: </B
>If you do not have two serial ports available on your host
>If you do not have two serial ports available on your host
computer, you may still verify the FLASH programming completed successfully
computer, you may still verify the FLASH programming completed successfully
by quitting/killing the GDB process after running "c" in
by quitting/killing the GDB process after running "c" in
step 2 above. Then switch the serial cable on the PID from Serial
step 2 above. Then switch the serial cable on the PID from Serial
A to Serial B and run a terminal emulator on the host computer.
A to Serial B and run a terminal emulator on the host computer.
In a few seconds you should see the the repeated text described
In a few seconds you should see the the repeated text described
in step 2 above and you may continue the remaining steps as normal.</P
in step 2 above and you may continue the remaining steps as normal.</P
></BLOCKQUOTE
></BLOCKQUOTE
></DIV
></DIV
></DIV
></DIV
><DIV
><DIV
CLASS="SECT3"
CLASS="SECT3"
><H3
><H3
CLASS="SECT3"
CLASS="SECT3"
><A
><A
NAME="AEN3661">Programming the FLASH for big-endian mode</H3
NAME="AEN3661">Programming the FLASH for big-endian mode</H3
><P
><P
>The process is almost identical to the previous instructions
>The process is almost identical to the previous instructions
which apply to a PID board running in little-endian mode only.</P
which apply to a PID board running in little-endian mode only.</P
><P
><P
>The only adjustments to make are that if programming a <SPAN
>The only adjustments to make are that if programming a <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>GDB</I
>GDB</I
></SPAN
></SPAN
> stub
> stub
ROM image (or CygMon ROM monitor image), you must enable the option "Use
ROM image (or CygMon ROM monitor image), you must enable the option "Use
Big-endian mode" in the <SPAN
Big-endian mode" in the <SPAN
CLASS="emphasis"
CLASS="emphasis"
><I
><I
CLASS="EMPHASIS"
CLASS="EMPHASIS"
>eCos Configuration Tool</I
>eCos Configuration Tool</I
></SPAN
></SPAN
> (CYGHWR_HAL_ARM_BIGENDIAN
> (CYGHWR_HAL_ARM_BIGENDIAN
if using ecosconfig and editing ecos.ecc).</P
if using ecosconfig and editing ecos.ecc).</P
><P
><P
>When programming the FLASH there are two options:</P
>When programming the FLASH there are two options:</P
><P
><P
></P
></P
><OL
><OL
TYPE="1"
TYPE="1"
><LI
><LI
><P
><P
>Program FLASH using the little-endian FLASH tool. After
>Program FLASH using the little-endian FLASH tool. After
powering off, replace the ROM controller with the special big-endian
powering off, replace the ROM controller with the special big-endian
version which can be acquired from ARM. (This has not been tested
version which can be acquired from ARM. (This has not been tested
by Red Hat).</P
by Red Hat).</P
></LI
></LI
><LI
><LI
><P
><P
>Use a special big-endian version of the FLASH tool which
>Use a special big-endian version of the FLASH tool which
byte-swaps all the words as they are written to the FLASH.</P
byte-swaps all the words as they are written to the FLASH.</P
></LI
></LI
></OL
></OL
><P
><P
>Build this tool by enabling the "Build flash programming tool
>Build this tool by enabling the "Build flash programming tool
for BE images on LE boards" option (CYGBLD_BUILD_FLASH_TOOL_BE),
for BE images on LE boards" option (CYGBLD_BUILD_FLASH_TOOL_BE),
resulting in a utility with the prefix "prog_flash_BE_image_LE_system"
resulting in a utility with the prefix "prog_flash_BE_image_LE_system"
which should be used instead of "prog_flash".</P
which should be used instead of "prog_flash".</P
><P
><P
>Note that there is a limitation to this method: no sub-word
>Note that there is a limitation to this method: no sub-word
data can be read from the ROM. To work around this, the .rodata
data can be read from the ROM. To work around this, the .rodata
section is folded into the .data section and thus copied to RAM
section is folded into the .data section and thus copied to RAM
before the system starts.</P
before the system starts.</P
><P
><P
>Given that Thumb instructions are 16 bit, it is not possible
>Given that Thumb instructions are 16 bit, it is not possible
to run ROM-startup Thumb binaries on the PID board using this method.</P
to run ROM-startup Thumb binaries on the PID board using this method.</P
><P
><P
>When the image has been programmed, power off the board, and
>When the image has been programmed, power off the board, and
set jumper LK4 to enable big-endian operation.</P
set jumper LK4 to enable big-endian operation.</P
></DIV
></DIV
></DIV
></DIV
><DIV
><DIV
CLASS="SECT2"
CLASS="SECT2"
><H2
><H2
CLASS="SECT2"
CLASS="SECT2"
><A
><A
NAME="AEN3677">Installing the Stubs into ROM</H2
NAME="AEN3677">Installing the Stubs into ROM</H2
><P
><P
></P
></P
><OL
><OL
TYPE="1"
TYPE="1"
><LI
><LI
><P
><P
>Program the binary image file gdb_module.bin
>Program the binary image file gdb_module.bin
into ROM referring to the instructions of your ROM programmer.</P
into ROM referring to the instructions of your ROM programmer.</P
></LI
></LI
><LI
><LI
><P
><P
>Plug the ROM into socket U12 and install jumper LK6 pins
>Plug the ROM into socket U12 and install jumper LK6 pins
7-8 to enable the ROM.</P
7-8 to enable the ROM.</P
></LI
></LI
></OL
></OL
></DIV
></DIV
></DIV
></DIV
><DIV
><DIV
CLASS="NAVFOOTER"
CLASS="NAVFOOTER"
><HR
><HR
ALIGN="LEFT"
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
SUMMARY="Footer navigation table"
WIDTH="100%"
WIDTH="100%"
BORDER="0"
BORDER="0"
CELLPADDING="0"
CELLPADDING="0"
CELLSPACING="0"
CELLSPACING="0"
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="setup-sparclite-sim.html"
HREF="setup-sparclite-sim.html"
ACCESSKEY="P"
ACCESSKEY="P"
>Prev</A
>Prev</A
></TD
></TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="ecos-user-guide.html"
HREF="ecos-user-guide.html"
ACCESSKEY="H"
ACCESSKEY="H"
>Home</A
>Home</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="setup-arm-aeb1.html"
HREF="setup-arm-aeb1.html"
ACCESSKEY="N"
ACCESSKEY="N"
>Next</A
>Next</A
></TD
></TD
></TR
></TR
><TR
><TR
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="left"
ALIGN="left"
VALIGN="top"
VALIGN="top"
>SPARClite Architectural Simulator Setup</TD
>SPARClite Architectural Simulator Setup</TD
><TD
><TD
WIDTH="34%"
WIDTH="34%"
ALIGN="center"
ALIGN="center"
VALIGN="top"
VALIGN="top"
><A
><A
HREF="appendix-target-setup.html"
HREF="appendix-target-setup.html"
ACCESSKEY="U"
ACCESSKEY="U"
>Up</A
>Up</A
></TD
></TD
><TD
><TD
WIDTH="33%"
WIDTH="33%"
ALIGN="right"
ALIGN="right"
VALIGN="top"
VALIGN="top"
>ARM AEB-1 Hardware Setup</TD
>ARM AEB-1 Hardware Setup</TD
></TR
></TR
></TABLE
></TABLE
></DIV
></DIV
></BODY
></BODY
></HTML
></HTML
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.