📄 setup-arm-pid.html
字号:
></TABLE><P>[there will be some output]</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig tree$ make</PRE></TD></TR></TABLE></LI><LI><P>When the build completes, the FLASH tool image file canbe found in the bin/ subdirectory of the install tree,with the prefix "prog_flash"</P></LI></OL></DIV><DIVCLASS="SECT3"><H3CLASS="SECT3"><ANAME="AEN3620">Prepare the Board for FLASH Programming</H3><P>Each time a new image is to be programmed in the FLASH, thejumpers on the board must be set to allow Angel to run:</P><P></P><OLTYPE="1"><LI><P> Set jumper 7-8 on LK6 [using the Angel codein the 16 bit EPROM]</P></LI><LI><P>Set jumper 5-6 on LK6 [select 8bit ROM mode]</P></LI><LI><P>Set jumper LK18 [ROM remap - this isalso required for eCos]</P></LI><LI><P>Set S1 to 0-0-1-1 [20MHz operation]</P></LI><LI><P>Open jumper LK4 [enable little-endian operation]Attach a serial cable from Serial A on the PID board to connector1 on the development system. This is the cable through which thebinaries will be downloaded. Attach a serial cable from Serial Bon the PID board to connector 2 on the development system (or anysystem that will work as a terminal). Through this cable, the FLASHtool will write its instructions (at 38400 baud).</P></LI></OL></DIV><DIVCLASS="SECT3"><H3CLASS="SECT3"><ANAME="AEN3634">Program the FLASH</H3><P></P><OLTYPE="1"><LI><P>Download the FLASH ROM image onto the PID board. Forexample. for the GDB stubs image:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">bash$ arm-elf-gdb -nw gdb_module.imgGNU gdb 4.18-DEVTOOLSVERSIONCopyright 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 copiesof 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=com1Angel 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:43Connected to ARM RDI target.(gdb) loadLoading section .rom_vectors, size 0x44 lma 0x60000Loading section .text, size 0x1f3c lma 0x60044Loading section .rodata, size 0x2c lma 0x61f80Loading section .data, size 0x124 lma 0x61facStart address 0x60044 , load size 8400Transfer rate: 5169 bits/sec.(gdb) q The program is running. Exit anyway? (y or n) y </PRE></TD></TR></TABLE><DIVCLASS="NOTE"><BLOCKQUOTECLASS="NOTE"><P><B>Note: </B> 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 fileshave the right permissions:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ su Password: # chmod o+rw /dev/ttyS0* # exit </PRE></TD></TR></TABLE>If you are programming the GDB stub image, it will now be locatedat 0x60000..0x64000. If you are programming the Cygmon ROM Monitor,it will be located at 0x60000..0x80000.</P></BLOCKQUOTE></DIV></P></LI><LI><P>Now download the FLASH programmer tool</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">bash$ arm-elf-gdb prog_flash.img GNU gdb 4.18-DEVTOOLSVERSIONCopyright 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 distributecopies of it under certain conditions. Type "show copying" to seethe conditions. There is absolutely no warranty for GDB. Type "showwarranty" for details.This GDB was configured as "--host=i586-pc-cygwin32 --target=arm-elf".(gdb) target rdi s=com1Angel 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:43Connected to ARM RDI target.(gdb) loadLoading section .rom_vectors, size 0x44 lma 0x40000Loading section .text, size 0x44a4 lma 0x40044Loading section .rodata, size 0x318 lma 0x444e8Loading section .data, size 0x1c8 lma 0x44800Start address 0x40044 , load size 18888Transfer rate: 5596 bits/sec.(gdb) c</PRE></TD></TR></TABLE></LI><LI><P>The FLASH tool will output some text on the board serialport B at 38400 baud:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">ARMeCosFLASH here!manuf: 8, device: 40Error: Wrong Manufaturer: 08... Please change FLASH jumper</PRE></TD></TR></TABLE></LI><LI><P>This text is repeated until you remove the jumper 7-8on LK6. Then the output will be:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">manuf: 1F, device: A4AT29C040A recognisedAbout to program FLASH using data at 60000..64000*** Press RESET now to abort!</PRE></TD></TR></TABLE></LI><LI><P> You have about 10 seconds to abort the operation by pressingreset. After this timeout, the FLASH programming happens:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">...Programming FLASH All done!</PRE></TD></TR></TABLE></LI><LI><P>Quit/kill the GDB process, which will hang.</P></LI><LI><P>Next time you reset the board, the stub will be in control,communicating on Serial A at 38400 baud.</P></LI></OL><DIVCLASS="NOTE"><BLOCKQUOTECLASS="NOTE"><P><B>Note: </B>If you do not have two serial ports available on your hostcomputer, you may still verify the FLASH programming completed successfullyby quitting/killing the GDB process after running "c" instep 2 above. Then switch the serial cable on the PID from SerialA to Serial B and run a terminal emulator on the host computer.In a few seconds you should see the the repeated text describedin step 2 above and you may continue the remaining steps as normal.</P></BLOCKQUOTE></DIV></DIV><DIVCLASS="SECT3"><H3CLASS="SECT3"><ANAME="AEN3661">Programming the FLASH for big-endian mode</H3><P>The process is almost identical to the previous instructionswhich apply to a PID board running in little-endian mode only.</P><P>The only adjustments to make are that if programming a <SPANCLASS="emphasis"><ICLASS="EMPHASIS">GDB</I></SPAN> stubROM image (or CygMon ROM monitor image), you must enable the option "UseBig-endian mode" in the <SPANCLASS="emphasis"><ICLASS="EMPHASIS">eCos Configuration Tool</I></SPAN> (CYGHWR_HAL_ARM_BIGENDIANif using ecosconfig and editing ecos.ecc).</P><P>When programming the FLASH there are two options:</P><P></P><OLTYPE="1"><LI><P>Program FLASH using the little-endian FLASH tool. Afterpowering off, replace the ROM controller with the special big-endianversion which can be acquired from ARM. (This has not been testedby Red Hat).</P></LI><LI><P>Use a special big-endian version of the FLASH tool whichbyte-swaps all the words as they are written to the FLASH.</P></LI></OL><P>Build this tool by enabling the "Build flash programming toolfor 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".</P><P>Note that there is a limitation to this method: no sub-worddata can be read from the ROM. To work around this, the .rodatasection is folded into the .data section and thus copied to RAMbefore the system starts.</P><P>Given that Thumb instructions are 16 bit, it is not possibleto run ROM-startup Thumb binaries on the PID board using this method.</P><P>When the image has been programmed, power off the board, andset jumper LK4 to enable big-endian operation.</P></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN3677">Installing the Stubs into ROM</H2><P></P><OLTYPE="1"><LI><P>Program the binary image file gdb_module.bininto ROM referring to the instructions of your ROM programmer.</P></LI><LI><P>Plug the ROM into socket U12 and install jumper LK6 pins7-8 to enable the ROM.</P></LI></OL></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="setup-sparclite-sim.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-user-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="setup-arm-aeb1.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">SPARClite Architectural Simulator Setup</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="appendix-target-setup.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">ARM AEB-1 Hardware Setup</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -