⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 target-setup.sgml

📁 开放源码实时操作系统源码.
💻 SGML
📖 第 1 页 / 共 5 页
字号:
<PARA>Choose the
<EMPHASIS>Build</EMPHASIS>-&#62;<EMPHASIS>Templates</EMPHASIS>
 menu item, and then select the ARM PID hardware.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Enable the "Build flash programming tool" option in the
ARM PID HAL (CYGBLD_BUILD_FLASH_TOOL)
and resolve any resulting configuration conflicts.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Build eCos using 
<EMPHASIS>Build</EMPHASIS>
-&#62;
<EMPHASIS>Library</EMPHASIS></PARA>
</LISTITEM>
<LISTITEM>
<PARA>When the build completes, the FLASH tool image file can
be found in the bin/ subdirectory of the install tree,
with the prefix "prog_flash"</PARA>
</LISTITEM>
</ORDEREDLIST>
</SECT3>
<SECT3>
<TITLE>Building the FLASH Tool with ecosconfig</TITLE>
<!-- <PARA>(See <XREF LINKEND="USING-ECOSCONFIG-ON-UNIX">)</PARA> -->
<ORDEREDLIST>
<LISTITEM>
<PARA>		    Make an empty directory to contain the build tree,
and cd into it
		    </PARA>
</LISTITEM>
<LISTITEM>
<PARA>Enter the command:</PARA>
<PROGRAMLISTING>$ ecosconfig new pid</PROGRAMLISTING>
</LISTITEM>
<LISTITEM>
<PARA>Edit the file ecos.ecc and enable the option CYGBLD_BUILD_FLASH_TOOL
by uncommenting its user_value property and setting it
to 1.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Enter the commands:</PARA>
<PROGRAMLISTING>$ ecosconfig resolve</PROGRAMLISTING>
<PARA>[there will be some output]</PARA>
<PROGRAMLISTING>$ ecosconfig tree
$ make</PROGRAMLISTING>
</LISTITEM>
<LISTITEM>
<PARA>When the build completes, the FLASH tool image file can
be found in the bin/ subdirectory of the install tree,
with the prefix "prog_flash"</PARA>
</LISTITEM>
</ORDEREDLIST>
</SECT3>
<SECT3>
<TITLE>Prepare the Board for FLASH Programming</TITLE>
<PARA>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:</PARA>
<ORDEREDLIST>
<LISTITEM>
<PARA>		    Set jumper 7-8 on LK6   [using the Angel code
in the 16 bit EPROM]</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Set jumper 5-6 on LK6   [select 8bit ROM mode]</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Set jumper LK18         [ROM remap - this is
also required for eCos]</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Set S1 to 0-0-1-1       [20MHz operation]</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Open jumper LK4  [enable little-endian operation]

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
binaries will be downloaded. Attach a serial cable from Serial B
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
tool will write its instructions (at 38400 baud).</PARA>
</LISTITEM>
</ORDEREDLIST>
</SECT3>
<SECT3>
<TITLE>Program the FLASH</TITLE>
<ORDEREDLIST>
<LISTITEM>
<PARA>Download the FLASH ROM image onto the PID board. For
example. for the GDB stubs image:

<PROGRAMLISTING>bash$ arm-elf-gdb -nw gdb_module.img
GNU gdb 4.18-DEVTOOLSVERSION
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies
of it under certain conditions. Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i586-pc-cygwin32 --target=arm-elf".
(no debugging symbols found)...
(gdb) target rdi s=com1
Angel Debug Monitor for PID (Built with Serial(x1), Parallel, DCC) 1.00
(Advanced RISC Machines SDT 2.10)
Angel Debug Monitor rebuilt on Jan 20 1997 at 02:33:43
Connected to ARM RDI target.
(gdb) load
Loading section .rom_vectors, size 0x44 lma 0x60000
Loading section .text, size 0x1f3c lma 0x60044
Loading section .rodata, size 0x2c lma 0x61f80
Loading section .data, size 0x124 lma 0x61fac
Start address 0x60044 , load size 8400
Transfer rate: 5169 bits/sec.
(gdb) q 
The program is running.  Exit anyway? (y or n) y </PROGRAMLISTING>

<NOTE>
<PARA> On a UNIX or Linux system, the serial port must be
 /dev/ttyS0 instead of COM1.
 You need to make sure that the /dev/ttyS0 files
have the right permissions:
<SCREEN>$ su
 Password:
 # chmod o+rw /dev/ttyS0*
 # exit 
		      </SCREEN>
If you are programming the GDB stub image, it will now be located
at 0x60000..0x64000. If you are programming the Cygmon ROM Monitor,
it will be located at 0x60000..0x80000.</PARA>
</NOTE></PARA>
</LISTITEM>
<LISTITEM>
<PARA>Now download the FLASH programmer tool</PARA>
<PROGRAMLISTING>bash$ arm-elf-gdb prog_flash.img 
GNU gdb 4.18-DEVTOOLSVERSION
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute
copies of it under certain conditions. Type "show copying" to see
the conditions. There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "--host=i586-pc-cygwin32 --target=arm-elf".
(gdb) target rdi s=com1
Angel Debug Monitor for PID (Built with Serial(x1), Parallel, DCC) 1.00
(Advanced RISC Machines SDT 2.10)
Angel Debug Monitor rebuilt on Jan 20 1997 at 02:33:43
Connected to ARM RDI target.
(gdb) load
Loading section .rom_vectors, size 0x44 lma 0x40000
Loading section .text, size 0x44a4 lma 0x40044
Loading section .rodata, size 0x318 lma 0x444e8
Loading section .data, size 0x1c8 lma 0x44800
Start address 0x40044 , load size 18888
Transfer rate: 5596 bits/sec.
(gdb) c</PROGRAMLISTING>
</LISTITEM>
<LISTITEM>
<PARA>The FLASH tool will output some text on the board serial
port B at 38400 baud:</PARA>
<PROGRAMLISTING>ARM
eCos

FLASH here!
manuf: 8, device: 40
Error: Wrong Manufaturer: 08
... Please change FLASH jumper</PROGRAMLISTING>
</LISTITEM>
<LISTITEM>
<PARA>This text is repeated until you remove the jumper 7-8
on LK6. Then the output will be:</PARA>
<PROGRAMLISTING>manuf: 1F, device: A4
AT29C040A recognised
About to program FLASH using data at 60000..64000
*** Press RESET now to abort!</PROGRAMLISTING>
</LISTITEM>
<LISTITEM>
<PARA> You have about 10 seconds to abort the operation by pressing
reset. After this timeout, the FLASH programming happens:</PARA>
<SCREEN>...Programming FLASH 
All done!</SCREEN>
</LISTITEM>
<LISTITEM>
<PARA>Quit/kill the GDB process, which will hang.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Next time you reset the board, the stub will be in control,
communicating on Serial A at 38400 baud.</PARA>
</LISTITEM>
</ORDEREDLIST>
<NOTE>
<PARA>If you do not have two serial ports available on your host
computer, you may still verify the FLASH programming completed successfully
by quitting/killing the GDB process after running "c" in
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.
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.</PARA>
</NOTE>
</SECT3>
<SECT3>
<TITLE>Programming the FLASH for big-endian mode</TITLE>
<PARA>The process is almost identical to the previous instructions
which apply to a PID board running in little-endian mode only.</PARA>
<PARA>The only adjustments to make are that if programming a <EMPHASIS>GDB</EMPHASIS> stub
ROM image (or CygMon ROM monitor image), you must enable the option "Use
Big-endian mode" in the <EMPHASIS>eCos Configuration Tool</EMPHASIS> (CYGHWR_HAL_ARM_BIGENDIAN
if using ecosconfig and editing ecos.ecc).</PARA>
<PARA>When programming the FLASH there are two options:</PARA>
<ORDEREDLIST>
<LISTITEM>
<PARA>Program FLASH using the little-endian FLASH tool. After
powering off, replace the ROM controller with the special big-endian
version which can be acquired from ARM. (This has not been tested
by Red Hat).</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Use a special big-endian version of the FLASH tool which
byte-swaps all the words as they are written to the FLASH.</PARA>
</LISTITEM>
</ORDEREDLIST>
<PARA>Build this tool by enabling the "Build flash programming tool
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"
which should be used instead of "prog_flash".</PARA>
<PARA>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
section is folded into the .data section and thus copied to RAM
before the system starts.</PARA>
<PARA>Given that Thumb instructions are 16 bit, it is not possible
to run ROM-startup Thumb binaries on the PID board using this method.</PARA>
<PARA>When the image has been programmed, power off the board, and
set jumper LK4 to enable big-endian operation.</PARA>
</SECT3>
</SECT2>
<SECT2>
<TITLE>Installing the Stubs into ROM</TITLE>
<ORDEREDLIST>
<LISTITEM>
<PARA>Program the binary image file gdb_module.bin
into ROM referring to the instructions of your ROM programmer.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Plug the ROM into socket U12 and install jumper LK6 pins
7-8 to enable the ROM.</PARA>
</LISTITEM>
</ORDEREDLIST>
</SECT2>
</SECT1>
<SECT1 id="setup-arm-aeb1">
<TITLE><!-- <index></index> -->ARM AEB-1 Hardware Setup</TITLE>
<SECT2>
<TITLE>Overview</TITLE>
<PARA>The ARM AEB-1 comes with tools in ROM. These include a simple
FLASH management tool and the Angel&reg; monitor. eCos for
the ARM AEB-1 comes with GDB stubs suitable for programming into
the onboard FLASH. GDB is the preferred debug environment for GDB,
and while Angel provides a subset of the features in the eCos GDB
stub, Angel is unsupported.</PARA>
<PARA>Both eCos and the stubs support both Revision B and Revision
C of the AEB-1 board. Stub ROM images for both types of board can
be found in the loaders/arm-aeb directory under the root
of your eCos installation. You can select which board you are using
by selecting either the aeb or aebC platform by selecting the appropriate
platform HAL in the <EMPHASIS>eCos Configuration Tool</EMPHASIS>.</PARA>
<PARA>The GDB stub can be downloaded to the board for programming
in the FLASH using the board's on-board ROM monitor:</PARA>
<ORDEREDLIST>
<LISTITEM>
<PARA>talk to the AEB-1 board with a terminal emulator (or
a real terminal!)</PARA>
</LISTITEM>
<LISTITEM>
<PARA>use the board's rom menu to download a UU-encoded
version of the GDB stubs which will act as a ROM monitor</PARA>
</LISTITEM>
<LISTITEM>
<PARA>tell the board to use this new monitor, and then hook
GDB up to it for real debugging</PARA>
</LISTITEM>
</ORDEREDLIST>
</SECT2>
<SECT2>
<TITLE>Talking to the Board</TITLE>
<PARA>Connect a terminal or computer's serial port to the
ARM AEB-1. On a PC with a 9-pin serial port, you can use the cable
shipped by ARM with no modification. </PARA>
<PARA>Set the terminal or terminal emulator to 9600N1 (9600 baud,
no parity, 1 stop bit). </PARA>
<PARA>Reset the board by pressing the little reset button on the
top. You will see the following text: </PARA>
<PROGRAMLISTING>	ARM Evaluation Board Boot Monitor 0.01 (19 APR 1998)
	Press ENTER within 2 seconds to stop autoboot</PROGRAMLISTING>
<PARA>Press ENTER quickly, and you will get the boot prompt: </PARA>
<PROGRAMLISTING>	Boot:</PROGRAMLISTING>
</SECT2>
<SECT2>
<TITLE>Downloading the Stubs via the Rom Menu</TITLE>
<PARA>Using the AEB-1 rom menu to download the GDB stubs from the
provided ".UU" file.</PARA>
<NOTE>
<PARA>This is an annotated 'terminal' session
with the AEB-1 monitor:</PARA>
</NOTE>
<PROGRAMLISTING>+Boot: help
Module is BootStrap       1.00 (14 Aug 1998)</PROGRAMLISTING>
<PROGRAMLISTING>Help is available on:</PROGRAMLISTING>
<PROGRAMLISTING>Help          Modules       ROMModules    UnPlug        PlugIn
Kill          SetEnv        UnSetEnv      PrintEnv      DownLoad
Go            GoS           Boot          PC            FlashWrite
FlashLoad     FlashErase</PROGRAMLISTING>
<PROGRAMLISTING>Boot: download c000
Ready to download. Use 'transmit' option on terminal
emulator to download file.</PROGRAMLISTING>
<PROGRAMLISTING>... at this point, download the ASCII file "loaders/arm-aeb/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -