This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Hitachi HD6303 target.


John Carter wrote:
> I have been given the opportunity to create a cross compiler
> to ye olde 16 bit Hitachi HD 6303 CPU.

That's a pretty old chip, do they still manufacture it? I'd fear
obsolescense if I were you. And... I would call it 8 bit, although it
has some 16 bit instructions.

> Allegedly it is similar in instruction set to the Motorola 6805

Actually it is an enhanced CMOS version of Motorola's MC6801/MC6803,
which is in turn an enhanced version of the original MC6800. These are
object code compatible in the sense that code running on the older
chips will also run on the newer ones. Yet another enhancement of the
MC6801 is the MC68HC11 which continues to be popular and is produced in
a number of different varieties. See Motorola's website for details.
They keep archive versions of old documents online, so you will still
be able to get the datasheets of these old and obsolete parts. Very
nice.

The MC6805 is a black sheep in this family, although it is the most
popular when you count the number of chips sold. Its instruction set
isn't compatible with the others, although you'll notice some
similarities.

If you try to port gcc, don't look at the MC6805. There is a gcc port
for the MC68HC11 already. This will probably be the best starting
point. The HC11 has a Y index register which the older chips don't
have, so it won't be a trivial port, especially given that these
processors are short on registers anyway. But it will certainly be
better than starting from scratch.

> Questions to the list:
> - Wild guess as to the number of man days to do such a thing?

no idea. Depends a lot on you.

> - Is there any C compiler for this thing?
> - Is there any gcc port or partial port for this thing?

As I said, the gcc port for MC68HC11 comes close.

> - Is there any gcc port or partial port for the 6805?

Don't know. But it would be lunacy to try. This processor is even more
limited than the others when it comes to supporting C.

> - Given that this is a slow, register starved, tiny memory space (64k

>   address space) beastie, would targetting gcc to it be the right
>   thing?


No. But don't let that hold you back! Maybe someday someone ports gcc
to the intel 4004 ;-)

>   Or would it better / easier to use something like Small C?
> - Would it be easier retarget a forth implementation?

I'm sure there is one already. An implementation for the MC6800 or
MC6801 will most probably work out of the box.

Have fun!

Stefan

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]