sh4-microdev-setup.html

来自「ecos3.0 beta 的官方文档,html格式」· HTML 代码 · 共 702 行 · 第 1/2 页

HTML
702
字号
... Program from 0x8bfbf000-0x8bfff000 at 0xa1fc0000: .                         
... Lock from 0xa1fc0000-0xa2000000: .                                         
RedBoot>
    </PRE
></TD
></TR
></TABLE
><P
>At the end, the block of flash at
location 0xA1FC0000 holds information about the various flash blocks,
allowing other flash management operations to be performed. The next
step is to set up RedBoot's non-volatile configuration values:
    </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>RedBoot&gt; <KBD
CLASS="USERINPUT"
>fconfig -i</KBD
>
Initialize non-volatile configuration - continue (y/n)? <KBD
CLASS="USERINPUT"
>y</KBD
>
Run script at boot: false                                                       
Use BOOTP for network configuration: true                                       
Console baud rate: 38400                                                        
DNS server IP address:                                                          
Set eth0 network hardware address [MAC]: false                                  
GDB connection port: 9000                                                       
Force console for special debug messages: false                                 
Network debug at boot time: false                                               
Update RedBoot non-volatile configuration - continue (y/n)? <KBD
CLASS="USERINPUT"
>y</KBD
>
... Unlock from 0xa1f80000-0xa1f81000: .                                        
... Erase from 0xa1f80000-0xa1f81000: .                                         
... Program from 0x8bfb2000-0x8bfb3000 at 0xa1f80000: .                         
... Lock from 0xa1f80000-0xa1f81000: .
RedBoot&gt;
    </PRE
></TD
></TR
></TABLE
><P
>For most of these configuration variables, the default value is
correct. If there is no suitable BOOTP service running on the local
network then BOOTP should be disabled and, instead, RedBoot will prompt
for a fixed IP address, netmask, and addresses for the local gateway
and DNS server.
    </P
><P
>It is now possible to load the flash-resident version of RedBoot.
Because of the way that flash chips work, it is better to first load it
into RAM and then program it into flash.
    </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>RedBoot&gt; <KBD
CLASS="USERINPUT"
>load -r -m xmodem -b %{freememlo}</KBD
>
    </PRE
></TD
></TR
></TABLE
><P
>The file <TT
CLASS="FILENAME"
>redboot_ROM.bin</TT
> should now be uploaded
using the terminal emulator. The file is a raw binary and should be
transferred using the X-modem protocol.
    </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>Raw file loaded 0x8812d000-0x8814e32f, assumed entry at 0x8812d000              
xyzModem - CRC mode, 1064(SOH)/0(STX)/0(CAN) packets, 2 retries
RedBoot&gt;
    </PRE
></TD
></TR
></TABLE
><P
>Once RedBoot has been loaded into RAM it can be programmed into flash:
    </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>RedBoot&gt; <KBD
CLASS="USERINPUT"
>fis create RedBoot -b %{freememlo}</KBD
>
An image named 'RedBoot' exists - continue (y/n)? <KBD
CLASS="USERINPUT"
>y</KBD
>
... Erase from 0xa0000000-0xa0040000: .                                         
... Program from 0x8812d000-0x8816d000 at 0xa0000000: .                         
... Unlock from 0xa1fc0000-0xa2000000: .                                        
... Erase from 0xa1fc0000-0xa2000000: .                                         
... Program from 0x8bfbf000-0x8bfff000 at 0xa1fc0000: .                         
... Lock from 0xa1fc0000-0xa2000000: .                                          
RedBoot&gt;
    </PRE
></TD
></TR
></TABLE
><P
>The flash-resident version of RedBoot has now been programmed at location
0xA0000000, and the flash info block at 0xA1FC0000 has been updated.
The initial setup is now complete. Power off the Micro Probe and reset
the MicroDev board using S6. You should see the following:

    </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>+... waiting for BOOTP information                                     
Ethernet eth0: MAC address 00:08:ee:00:0b:37                                    
Can't get BOOTP info for device!                                                
                                                                                
RedBoot(tm) bootstrap and debug environment [ROM]                               
Non-certified release, version UNKNOWN - built 14:22:57, Sep  8 2003            
                                                                                
Copyright (C) 2000, 2001, 2002, Free Software Foundation, Inc.                                   
                                                                                
RAM: 0x88000000-0x8c000000, 0x8800db98-0x8bfb1000 available                     
FLASH: 0xa0000000 - 0xa2000000, 128 blocks of 0x00040000 bytes each.
RedBoot&gt;
    </PRE
></TD
></TR
></TABLE
><P
>When RedBoot issues its prompt, it is also ready to accept connections
from sh-elf-gdb, allowing applications to be downloaded and
debugged.
    </P
><P
>Occasionally it may prove necessary to update the installed RedBoot
image. This can be done simply by repeating the above process, using
the Micro Probe. Alternatively, the existing
RedBoot install can be used to load the RAM-resident version. You can
even install the RAM resident RedBoot in the "RedBoot[backup]" flash
region. See the RedBoot documentation for instruction on how to do this.
    </P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="SH4-MICRODEV-EEPROM"
></A
><H3
>EEPROM Installation</H3
><P
>The board has a 32-pin PLCC socket suitable for an EEPROM, silk screened U21.
To use RedBoot running from EEPROM, you must first program the file
<TT
CLASS="FILENAME"
>redboot_EEPROM.bin</TT
> (normally supplied with the eCos release
in the <TT
CLASS="FILENAME"
>loaders</TT
> directory) into the
EEPROM using an appropriate programmer. No byte swapping is required. If RedBoot
needs to be rebuilt, then instructions for this are supplied <A
HREF="sh4-microdev-setup.html#SH4-MICRODEV-SETUP-REBUILD"
>below</A
>, and the import file
<TT
CLASS="FILENAME"
>redboot_EEPROM.ecm</TT
> should be used.
      </P
><P
>To configure the board to boot from the EEPROM instead of flash, you must
power off the board and change the following DIP switch settings, which may
both be found on DIP switch 2 (silk screened S2): switch 2 (silk
screened FEMI SIZ1) should be set to ON, which will change the access
width for FEMI area 0 from 32-bit to 8-bit; switch 6 (silk screened
FPGA SW3) should be set to OFF to configure the FPGA to map memory
accesses for FEMI area 0 to point at the EEPROM instead of flash. In
this mode, it is no longer possible to access flash memory as the EEPROM
is mapped into the same area in the address space.
      </P
><P
>Note that it is usually preferable to boot from flash instead of EEPROM as
flash is accessed 32-bits at a time, whereas the EEPROM is accessed 8-bits
at a time, which therefore affects performance as this requires 4 times as
many read cycles.
      </P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="SH4-MICRODEV-SETUP-REBUILD"
></A
><H2
>Rebuilding RedBoot</H2
><P
>Should it prove necessary to rebuild a RedBoot binary, this is done
most conveniently at the command line. The steps needed to rebuild the
RAM version of RedBoot are:
    </P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>$ mkdir redboot_ram
$ cd redboot_ram
$ ecosconfig new sh4_202_md redboot
$ ecosconfig import $ECOS_REPOSITORY/hal/sh/sh4_202_md/v2_0_2/misc/redboot_RAM.ecm
$ ecosconfig resolve
$ ecosconfig tree
$ make
    </PRE
></TD
></TR
></TABLE
><P
>At the end of the build the <TT
CLASS="FILENAME"
>install/bin</TT
> subdirectory should contain
the file <TT
CLASS="FILENAME"
>redboot.bin</TT
>.
    </P
><P
>Rebuilding the ROM versions involves basically the same
process. The ROM version uses the file
<TT
CLASS="FILENAME"
>redboot_ROM.ecm</TT
> and generates a file
<TT
CLASS="FILENAME"
>redboot.bin</TT
>. Make sure you don't mix up the
different redboot.bin files; rename them to something more memorable
such as <TT
CLASS="FILENAME"
>redboot_RAM.bin</TT
> and
<TT
CLASS="FILENAME"
>redboot_ROM.bin</TT
>.
    </P
></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.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-config.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Overview</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"
>Configuration</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

⌨️ 快捷键说明

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