source: rtems/bsps/sh/gensh2/README.EVB7045F @ b82a4b4

5
Last change on this file since b82a4b4 was eb36d11, checked in by Sebastian Huber <sebastian.huber@…>, on 04/25/18 at 13:06:08

bsps: Move documentation, etc. files to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 5.4 KB
Line 
1#  Author: Radzislaw Galler (rgaller@et.put.poznan.pl)
2#
3
4
5Getting started with EVB7045F and gensh2
6========================================
7This is a capture of success path to put a RTEMS sample
8'hello.exe' on the evaluation board EVB7045F.
9
10 What you need
11---------------
12   * Computer with two operating systems: Linux and Wndows 2000 (tm) -
13     that was in my case (see section 'Variations')
14
15   * Flash Development Toolkit (FDT) - available on HMSE homepage
16     (http://www.hmse.com/products/fdt/support.htm)
17
18   * 'gdbstubs' - available on SourceForge
19     (http://sourceforge.net/projects/gdbstubs/)
20
21   * working GNU C compiler for Hitach SH processors; do-it-yourself
22     (on Linux) or download ready stuff for Windows'9x/NT/2k from
23     (http://www.hitachi-eu.com/hel/ecg/) or from Hitach Databook 2001
24     CD-ROM (if no luck try to search on the net for gnu99r1p1.zip)
25     
26   * GDB compiled for target sh-rtems  - do-it-yourself or download
27     from ftp://ftp.oarcorp.com:21/pub/rtems/snapshots/c_tools/
28
29   * RTEMS (ofcourse) you probably already have if you are reading this
30     document
31
32 Instalation of 'gdbstubs'
33--------------------------
34  Once you downladed and unzipped gdbstubs you have to compile
35  it. First modify the Makefile to use the compiler installed on your
36  machine.  Then issue the command:
37
38  $ make
39
40  This should produce the default target sh2-7045edk.out. This is the
41  S-record file which should be added to FDT project (renaming it to
42  *.mot extension helps a bit).
43  If you are lucky you will be able to put the file into the FLASH
44  following the instuctions in FDT and EVB manuals.
45 
46  Well I wasn't lucky so I had to bypass the Universal Programming
47  Board (see EVB7045F User Manual) and manually put the processor into
48  BOOT mode. This can be done by shortening the capacitor C8 (or C108
49  on schematics) which puts the UPB into permanent reset state, and by
50  removing jumper JP4 (or JP104 on schematics) and connecting its
51  middle pin to the ground. After pressing CRES button the processor
52  is in BOOT mode. In FDT select "direct connection":
53
54  Menu Project->Properties->Device->Select Interface
55
56  After that there should be no problem in putting the program into the
57  FLASH.
58
59 Loading 'hello.exe' on board
60------------------------------
61  I assume you are able to compile RTEMS with 'gensh2' BSP and
62  necessary tools. If not please refer to 'started.pdf' document which
63  describes the procedure (http://www.oarcorp.com/).
64
65  At the time of writing this document 'gdbstubs' default
66  communication port was SCI1. So it was the default port for
67  /dev/console in RTEMS. To avoid problems I had check these settings
68  both in 'gdbstubs' and $RTEMS_ROOT/c/src/lib/libbsp/sh/gensh2/include/bsp.h
69
70  After changing the line
71
72  #define BSP_CONSOLE_DEVNAME "/dev/sci1"
73
74  to
75
76  #define BSP_CONSOLE_DEVNAME "/dev/sci0"
77
78  in 'bsp.h' and rebuilding RTEMS there should no problem in running
79  'hello.exe' and other samples.
80
81  For downloading connect a serial cable to computer and EVB. You will
82  also need a second cable and second serial port to see the effects
83  of your work.
84
85  Assuming you are working in Linux and Xwindows fire up two terminal
86  windows. In the first one run sh-rtems-gdb, in the second run a
87  serial port terminal (for example 'minicom'). Set up the serial
88  terminal to a port connected to SCI0 and leave the window in a
89  visible place on the desktop. The debugger should be invoked best
90  from the directory where 'hello.exe' is placed. Assuming that here
91  is a GDB session:
92
93  --------start------
94  $ sh-rtems-gdb hello.exe
95  GNU gdb 5.0
96  Copyright 2000 Free Software Foundation, Inc.
97  GDB is free software, covered by the GNU General Public License, and you are
98  welcome to change it and/or distribute copies of it under certain conditions.
99  Type "show copying" to see the conditions.
100  There is absolutely no warranty for GDB.  Type "show warranty" for details.
101  This GDB was configured as "--host=i686-pc-linux-gnu --target=sh-rtems"...
102  (gdb) set remotebaud 115200
103  (gdb) target remote /dev/ttyS0
104  Remote debugging using /dev/ttyS0
105  0x0 in ?? ()
106  (gdb) load
107  Loading section .text, size 0x12d70 lma 0x444000
108  Loading section .data, size 0xb80 lma 0x456df0
109  Loading section .stack, size 0x10 lma 0xfffffec0
110  Start address 0x444000 , load size 80128
111  Transfer rate: 58274 bits/sec, 153 bytes/write.
112  (gdb) continue
113  Continuing.
114
115  Program received signal 0, Signal 0.
116  0x44ec36 in exit (code=0) at exit.c:70
117  70    exit.c: No such file or directory.
118  (gdb)
119  --------end-------
120 
121  And here is a capture from the serial terminal window:
122
123*** HELLO WORLD TEST ***
124Hello World
125*** END OF HELLO WORLD TEST ***
126
127  Beautiful, isn't it? That's all!
128 
129
130
131 Variations
132------------
133  I'm sure that not every one can afford having two operating systems
134  on one computer. I believe there will be a day that nobody will need
135  an MS stuff anymore... ;)
136
137  It is possible to repeat the success on MS Windows only. To do the
138  same on Linux only you need a tool to downlad 'gdbstubs' on the
139  board. This should be no problem to find it on the net but right now
140  I don't know about it.
141
142  For your convenience there are several graphical interfaces for GDB
143  available on the net. I just name two of them:
144
145  DDD - stands for Data Display Debugger
146        (http://www.gnu.org/software/ddd/)
147
148  Insight - a Tcl/Tk interface available both for MS Windows and
149            Xwindows (http://sources.redhat.com/insight/)
Note: See TracBrowser for help on using the repository browser.