redboot_installing.sgml

来自「eCos操作系统源码」· SGML 代码 · 共 1,810 行 · 第 1/5 页

SGML
1,810
字号
	      flash boot sector.</entry>	      <entry>redboot_RAM.ecm</entry>	    </row></tbody></tgroup></informaltable></para></sect2><sect2><title>Initial Installation Method </title><para>Device programmer is used to program socketed flash parts with ROM versionof RedBoot. </para><para>Alternatively, to install RedBoot on a target that already has eCosGDB stubs, download the RAM mode image of RedBoot and run it. Initialize theflash image directory: <command>fis init</command> Thendownload the ROM version of RedBoot and program it into flash: <screen>RedBoot> <userinput>load -b %{FREEMEMLO} -m ymodem</userinput>RedBoot> <userinput>fi cr RedBoot</userinput></screen></para></sect2><sect2><title>Special RedBoot Commands </title><para>None.</para></sect2><sect2><title>Memory Maps </title><para>RedBoot sets up the following memory map on the PID board. <programlisting>Physical Address Range Description----------------------- -----------0x00000000 - 0x0007ffff DRAM0x04000000 - 0x04080000 flash0x08000000 - 0x09ffffff ASB Expansion0x0a000000 - 0x0bffffff APB Reference Peripheral0x0c000000 - 0x0fffffff NISA Serial, Parallel and PC Card ports </programlisting></para></sect2><sect2><title>Rebuilding RedBoot</title><para>These shell variables provide the platform-specific informationneeded for building RedBoot according to the procedure described in<xref linkend="Rebuilding-Redboot">:<programlisting>export TARGET=pidexport ARCH_DIR=armexport PLATFORM_DIR=pid</programlisting></para><para>The names of configuration files are listed above with thedescription of the associated modes.</para></sect2></sect1><?Pub _newpage><sect1 id="at91"><title>ARM/ARM7 Atmel AT91 Evaluation Boards (EBXX)</title><sect2><title>Overview</title><para><indexterm><primary>Atmel AT91/EBXX</primary><secondary>installing and testing</secondary></indexterm><indexterm><primary>installing and testing</primary><secondary>Atmel AT91/EBXX</secondary></indexterm>RedBoot support is available for the EB40, EB40A, EB42 and EB55boards. By default all these boards are shipped with only 256Kbytes ofRAM. To minimize the amount of RAM used by RedBoot, only very basicflash management is provided, comprising of just the <command>fiserase</command> and <command>fis write</command> commands.</para><para>RedBoot supports both serial ports. On all AT91 evaluation boards, serialport A requires a straight through cable to connect with a PC, whereasserial port B requires a null modem cable. If you fail to be able toconnect to Angel in the instructions below when installing RedBoot, besure to verify you are using the appropriate cable for the serial port.The default serial port settings for RedBoot are 38400,8,N,1. </para><para>The following RedBoot configurations are supported:      <informaltable frame="all">	<tgroup cols="4" colsep="1" rowsep="1" align="left">	  <thead>	    <row>	      <entry>Configuration</entry>	      <entry>Mode</entry>	      <entry>Description</entry>	      <entry>File</entry>	    </row>	  </thead>	  <tbody>	    <row>	      <entry>ROM</entry>	      <entry>[ROM]</entry>	      <entry>RedBoot running from the board's flash boot	      sector.</entry>	      <entry>redboot_ROM.ecm</entry>	    </row>	    <row>	      <entry>RAM</entry>	      <entry>[RAM]</entry>	      <entry>RedBoot running from RAM with RedBoot in the	      flash boot sector.</entry>	      <entry>redboot_RAM.ecm</entry>	    </row>	    <row>	      <entry>ROMRAM</entry>	      <entry>[ROMRAM]</entry>	      <entry>RedBoot running from RAM, but contained in the	      board's flash boot sector.</entry>	      <entry>redboot_ROMRAM.ecm</entry>	    </row></tbody></tgroup></informaltable></para></sect2><sect2><title>Initial Installation Method </title><para>RedBoot installation is essentially the same for all boards, howeverthe details differ slightly. Please make sure you follow thedirections from the correct section below. Any errors could result inan unusable board.</para><sect3><title>Installing RedBoot on the EB40</title><para>This development board comes with ARM's debug tool, Angel, installedin flash.  At this time, Angel will not be replaced.  Rather, RedBootwill be placed in the alternate half of flash.  Switch SW1 is used toselect which monitor to boot. Once RedBoot is installed, selecting SW1to <literal>lower mem</literal> will choose Angel, whereas selectingSW1 to <literal>upper mem</literal> will choose RedBoot.</para><para>Set SW1 to <literal>lower mem</literal> and connect serial port A to ahost computer.  Using GDB from the host and Angel on the board,download and run the RAM mode image of RedBoot to the board.<screen><userinput>arm-elf-gdb redboot_RAM.elf</userinput>(gdb) <userinput>tar rdi s=/dev/ttyS0</userinput>Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) forAT91EB40 (2.00)Angel Debug Monitor rebuilt on Apr 07 2000 at 12:40:31Serial Rate:   9600Connected to ARM RDI target.(gdb) <userinput>set $cpsr=0xd3</userinput>(gdb) <userinput>load</userinput>Loading section .rom_vectors, size 0x40 lma 0x2020000Loading section .text, size 0x7fd8 lma 0x2020040Loading section .rodata, size 0x15a0 lma 0x2028018Loading section .data, size 0x2e4 lma 0x20295b8Start address 0x2020040 , load size 39068Transfer rate: 6250 bits/sec, 500 bytes/write.(gdb) <userinput>cont</userinput>Continuing.</screen>Once RedBoot is started, the GDB session connected with Angelmust be suspended (this can be done using Ctrl-Z) or terminated(with Ctrl-C or the Windows task manager).  Follow thisby connecting to the board using a terminal emulator such ashyperterminal or minicom at 38400-8N1.  At this point, RedBoot will be running on the board inRAM.<screen>RedBoot> <userinput>version</userinput>RedBoot(tm) bootstrap and debug environment [RAM]Non-certified release, version UNKNOWN - built 14:09:27, Jul 20 2001Platform: Atmel AT91/EB40 (ARM7TDMI)Copyright (C) 2000, 2001, Red Hat, Inc.RAM: 0x02000000-0x02080000, 0x020116d8-0x0207fd00 availableFLASH: 0x01010000 - 0x01020000, 256 blocks of 0x00000100 bytes each.RedBoot></screen>Now, download the ROM mode image.<screen>RedBoot> <userinput>load -m ymodem -b %{FREEMEMLO}</userinput></screen>Use your terminal emulator to send the file redboot_ROM.srec via YModem.e.g. <literal>Transfer->Send File</literal> in Hyperterminal, or<literal>Ctrl-A S</literal> in minicom.Finally, program it to flash.<screen>RedBoot> <userinput>fi wr -f 0x01010000 -b %{FREEMEMLO} -l 0xe100</userinput></screen>SW1 should now be set to <literal>upper mem</literal> to select bootingwith RedBoot rather than Angel. Finally, press the "reset" pushbutton andRedBoot should come up on the board.</para></sect3><sect3><title>Installing RedBoot on the EB40A, EB42 or EB55</title><para>These development boards come with ARM's debug tool, Angel, installedin flash.  At this time, Angel will not be replaced.  Rather, RedBootwill be placed in the alternate half of flash.  Jumper JP1 is used toselect which monitor to boot.  Once RedBoot is installed, setting JP1to <literal>STD</literal> will choose Angel, whereas setting JP1 to<literal>USER</literal> will choose RedBoot.</para><para>Set JP1 to <literal>STD</literal> and connect serial port A to a hostcomputer.  Using GDB from the host and Angel on the board, downloadthe RAM mode image of RedBoot to the board, and start it using the'cont' command.<screen><userinput>arm-elf-gdb redboot_RAM.elf</userinput>(gdb) <userinput>tar rdi s=/dev/ttyS0</userinput>Angel Debug Monitor (serial) 1.04 (Advanced RISC Machines SDT 2.5) for AT91EB55 (2.20)Angel Debug Monitor rebuilt on Feb 03 2002 at 16:10:20Serial Rate:   9600Connected to ARM RDI target.(gdb) <userinput>set $cpsr=0xd3</userinput>(gdb) <userinput>load</userinput>Loading section .rom_vectors, size 0x40 lma 0x2008000Loading section .text, size 0xb0b8 lma 0x2008040Loading section .rodata, size 0x1c27 lma 0x20130f8Loading section .data, size 0x5f0 lma 0x2014d20Start address 0x2008040, load size 54031Transfer rate: 6264 bits/sec, 500 bytes/write.(gdb) <userinput>cont</userinput>Continuing.</screen>Once RedBoot is started, the GDB session connected with Angel must besuspended (this can be done using Ctrl-Z) or terminated(with Ctrl-C or the Windows task manager).  Follow this by connecting tothe board using a terminal emulator such as hyperterminal or minicomat 38400-8N1.  At this point, RedBoot will be running on the board inRAM.<screen>RedBoot> <userinput>version</userinput>RedBoot(tm) bootstrap and debug environment [RAM]Non-certified release, version UNKNOWN - built 16:58:52, May  7 2003                                                                                            Platform: Atmel AT91/EB55 (ARM7TDMI)                                            Copyright (C) 2000, 2001, 2002, Red Hat, Inc.                                                                                                                   RAM: 0x02000000-0x02040000, 0x020068a8-0x0203f000 available                     FLASH: 0x01010000 - 0x01200000, 31 blocks of 0x00010000 bytes each.RedBoot> </screen>Now, download the ROM mode image.<screen>RedBoot> <userinput>load -m ymodem -b %{FREEMEMLO}</userinput></screen>Use your terminal emulator to send the file redboot_ROM.srec via YModem.e.g. <literal>Transfer->Send File</literal> in Hyperterminal, or<literal>Ctrl-A S</literal> in minicom.Finally, program it to flash.<screen>RedBoot> <userinput>fi wr -f 0x01100000 -b %{FREEMEMLO} -l 0x10000</userinput></screen>Set JP1 to the <literal>USER</literal> setting, press the "reset"pushbutton and RedBoot should come up on the board.</para></sect3></sect2><sect2><title>Special RedBoot Commands </title><para>None.</para></sect2><sect2><title>Memory Maps </title><para>This processor has no MMU, so the only memory map is forphysical addresses.</para><para>The memory layout of the EB40 is as follows:<programlisting>Physical Address Range     Description-----------------------    ----------------------------------0x00000000 - 0x00000fff    On-chip SRAM0x01000000 - 0x0101ffff    Flash0x02000000 - 0x0207ffff    RAM0xffe00000 - 0xffffffff    I/O registers</programlisting>The flash based RedBoot image occupies virtual addresses 0x01010000 - 0x0101dfff.</para><para>The memory layout of the EB40A is as follows:<programlisting>Physical Address Range     Description-----------------------    ----------------------------------0x00000000 - 0x0003ffff    On-chip SRAM0x01000000 - 0x011fffff    Flash0x02000000 - 0x02ffffff    External SRAM (optional)0xffe00000 - 0xffffffff    I/O registers</programlisting>The flash based RedBoot image occupies virtual addresses 0x01100000 - 0x0110ffff.</para><para>The memory layout of the EB42 and EB55 is as follows:<programlisting>Physical Address Range     Description-----------------------    ----------------------------------0x00000000 - 0x00001fff    On-chip SRAM0x01000000 - 0x011fffff    Flash0x02000000 - 0x0203ffff    RAM0xffe00000 - 0xffffffff    I/O registers</programlisting>The flash based RedBoot image occupies virtual addresses 0x01100000 - 0x0110ffff.</para></sect2><sect2><title>Rebuilding RedBoot</title><para>These shell variables provide the platform-specific informationneeded for building RedBoot according to the procedure described in<xref linkend="Rebuilding-Redboot">:<programlisting>export ARCH_DIR=armexport TARGET=eb40export PLATFORM_DIR=at91/eb40export TARGET=eb40aexport PLATFORM_DIR=at91/eb40aexport TARGET=eb42export PLATFORM_DIR=at91/eb42export TARGET=eb55export PLATFORM_DIR=at91/eb55</programlisting>Use just one of the <literal>TARGET</literal> and<literal>PLATFORM_DIR</literal> variable pairs only.</para><para>The names of configuration files are listed above with thedescription of the associated modes.</para><para>When reprogramming RedBoot using RedBoot itself, you shouldload a RedBoot RAM image as normal, and load the new ROM imageinto RAM. However before programming the new image into Flashyou <emphasis>must</emphasis> switch SW1 to lower mem (EB40)or set JP1 to STD (EB40A, EB42, EB55) before writing to Flash.</para><warning><title>Warning!</title><para>Failure to set SW1 to<literal>lower mem</literal> (EB40) or JP1 to<literal>STD</literal> (EB40A, EB42, EB55) will cause theinstallation of RedBoot to overwrite Angel, thus making the board<emphasis>unbootable</emphasis>.  Only hardware JTAG can restore theboard once in this state.

⌨️ 快捷键说明

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