Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Confused about Hitachi SuperH development tools...

0 views
Skip to first unread message

Mel Tsai

unread,
Jan 25, 1998, 3:00:00 AM1/25/98
to

Hello,

I have recently become interested in using hitachi's SuperH line of
processors in a few of my projects. They are cheap, fast, and
powerful. However, looking over all the documentation, I'm unclear as
to the (free!?) development tools available.

Cygnus software has their freeware Cygnus Development Kit, a GNU C++
compiler that supposedly can output SH-1/3 code. However, I'm
somewhat new to cross compiling and how it works, so it's very
confusing to me. For example, the docs mention the following command
line switches:

`-m1'
Generate code for the SH1.
`-m2'
Generate code for the SH2.
`-m3'
Generate code for the SH3.

Will the C compiler actually output executeable machine code, or
something else? This compiler supports over 21 platforms, so it seems
to me that the CDK would have to be a lot bigger if it were to include
assemblers for all platforms in addition to the compiler. The docs do
a poor job at explaining this stuff! Please excuse my ignorance if
this is obvious, I've been pampered by Windows IDE's when developing
code in the past :).

My confusion is compounded by Hitachi's own proprietary development
tools... They have a cross compiler, simulator, and assembler
available, but they are all very expensive ($500 to $700). If the
cygnus's C++ compiler only produces asm output, I'm stuck because the
assembler alone is $685 (unless I'm reading this wrong). Is there NO
way to freely develop code for the SuperH?

I know I'm mistaken somewhere though, because supposedly the SuperH
evaluation board contains some sort of C compiler and assembler, but
it only costs like $160.

I'd like to hear from anyone with ANY experience developing for the
SuperH...

thanks,
-Mel

Phillip Musumeci

unread,
Jan 26, 1998, 3:00:00 AM1/26/98
to

G'day,

The SH1 demonstration board from Hitachi (with, by memory, a 7032 CPU)
comes with the GNU C/C++ compiler that you mention, and it includes the GNU
assembler so executable is produced. As it is a "normal" GNU C/C++
compiler, you can use command line switches to produce the assembler
language code if you wish to review/tweak it.

The GNU debugger GDB is also included. I haven't seen this used personally
but I understand that the SH1 board contains a small amount of ROM based
executable code so that the debugger on the host PC can control the
execution of test programs on the target system. The SH1/7032 CPU includes
some very nice "built-in" support for exceptions on events such as opcode
fetches from certain addresses, DMA accesses in certain ranges, etc., and
GDB can therefore give you good support (check out the CPU's data book and
you'll see what I mean).

Note that there is an IDE for GNU C/C++ programming that helps people
program on a PC to produce executable for a PC --- it is called RHIDE, and
its user commands are apparently similar to a Borland tool. By making the
SH1's GNU C/C++ compiler be the one that is used, you should be able to
obtain at least an edit+compile environment that is similar to what you
might use elsewhere (certainly, my emacs-illiterate students seem to like
this). Search for the DJGPP application called RawHIDE, available in files
rhide14b.zip (binary dist) and rhide14s.zip (src dist, optional).
[version 1.4 is the latest I've seen]

Good luck,
phillip

--
__ /\
Dr. Phillip Musumeci / \/ ~\ Computer Systems Engineering Dept., RMIT,
mail:phi...@rmit.edu.au / \ GPO Box 2476V, Melbourne 3001 AUSTRALIA.
Telephone 96605317(w1) / / http://pm.cse.rmit.edu.au/~phillip
+61 3 96605383(w2) \ __ / http://131.170.118.50/~phillip
+61 3 96605340(fax) `-' \*/ Level 2, 410 Elizabeth Steet. [87.2.15G]
.
UNIX _IS_ user friendly. It's just selective about who its friends are.
--unknown

Ken Lee

unread,
Jan 27, 1998, 3:00:00 AM1/27/98
to

On Sun, 25 Jan 1998 08:12:22 GMT, tsai...@pilot.msu.edu (Mel Tsai)
wrote:

>Hello,
>
>I have recently become interested in using hitachi's SuperH line of
>processors in a few of my projects. They are cheap, fast, and
>powerful. However, looking over all the documentation, I'm unclear as
>to the (free!?) development tools available.

[ some text deleted ]


>Will the C compiler actually output executeable machine code, or
>something else? This compiler supports over 21 platforms, so it seems
>to me that the CDK would have to be a lot bigger if it were to include
>assemblers for all platforms in addition to the compiler. The docs do
>a poor job at explaining this stuff! Please excuse my ignorance if
>this is obvious, I've been pampered by Windows IDE's when developing
>code in the past :).

The Cygnus/GNU C/C++ compiler outputs SH-X object code with linking
info that is used by the GNU linker, LD. Suffice to say that the CDK
tools will produce object code which can be ROMmed or downloaded. The
CDK/GNU tools do NOT encompass all the 21 different platforms but is
configured for the required development and target platforms. Eg
developing SH-1 code on a Windows environment for instance. Assuming
that you are cross-developing SH-1 code on a Windows machine then
you'll need that particular pre-configured package.

>My confusion is compounded by Hitachi's own proprietary development
>tools... They have a cross compiler, simulator, and assembler
>available, but they are all very expensive ($500 to $700). If the
>cygnus's C++ compiler only produces asm output, I'm stuck because the
>assembler alone is $685 (unless I'm reading this wrong). Is there NO
>way to freely develop code for the SuperH?

There are about 3 different compilers (some 3rd party) that Hitachi
are advocating. The most expensive is the IAR tools which costs about
AUD$2000. Fundamentally they all do the same thing.

>I know I'm mistaken somewhere though, because supposedly the SuperH
>evaluation board contains some sort of C compiler and assembler, but
>it only costs like $160.

I would consider $160 good value for what you get. The SH7032 EVB
comes with the GNU/CDK tools and is packaged also with Hitachi's IDE
called HiView. Hitachi realised that the CDK tools were a bit much to
use with Windows users (great if you have a Unix background) so they
wrote this IDE which took away the command line details and presented
the developer with a proper Windows application view of the world. I
recommend HiView for the non-Unix users - it also has a very good
simulator.

>I'd like to hear from anyone with ANY experience developing for the
>SuperH...

I've reviewed the IAR and Hitachi compilers and in my opiniion the
CDK/GNU tools are equivalent and in some cases better. Also the price
is right for the GNU tools. For the novice the best way to get into
SH-X development is to buy the EVB - make sure you get HiView. Some
dealers may have old stock of the EVB which didn't come with it.

Ken.

Stephen Irons

unread,
Jan 30, 1998, 3:00:00 AM1/30/98
to

Mel Tsai wrote:
>
> I know I'm mistaken somewhere though, because supposedly the SuperH
> evaluation board contains some sort of C compiler and assembler, but
> it only costs like $160.
>
>
> thanks,
> -Mel

Yes, the EV board comes complete with Cygnus/Gnu development
suite (compiler, assembler, linker, libraries, etc) which
run happily in a Windows DOS box. Included on the board is
a ROM with the ROM-monitor (CMON) built in.

I've generated SH2 and SH3 code with this system and it works
pretty well. I haven't used the Windows interface to the
debugger but it looks pretty flash with memory dumps, register
windows, source and assembler view, breakpoints, single step,
and all.

There is also a sample application that MAKES AN LED FLASH!
From there, it is just a matter of debugging until you application
works.

Stephen

0 new messages