This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Hitachi HD6303 target
- From: tm <tm at mail dot kloo dot net>
- To: john dot carter at tait dot co dot nz
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 19 Jul 2002 14:21:46 -0700 (PDT)
- Subject: 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.
>It's best known incarnation is probably the Psion
>Organizer II (although I would be using it in a weird embedded thing).
>Allegedly it is similar in instruction set to the Motorola 6805
>Questions to the list:
>- Wild guess as to the number of man days to do such a thing
>- Is there any C compiler for this thing?
>- Is there any gcc port or partial port for this thing?
>- Is there any gcc port or partial port for the 6805?
>- Given that this is a slow, register starved, tiny memory space (64k
> address space) beastie, would targetting gcc to it be the right thing?
You would probably emulate a machine with general-purpose registers
and emit multiple native instructions to move stuff in/out of the
emulated gp registers.
IMHO it's like trying to put a 1.6 liter Honda engine on a go-kart.
> Or would it better / easier to use something like Small C?
Here are a few alternatives:
SDCC, the Small Device C Compiler. http://sdcc.sourceforge.net
It already supports the 8051, Z80, the AVR and other 8 bit procs with a
64-bit address space.
CC65, the 6502 C compiler. http://www.cc65.org.
lcc1.9v816, which is a port I did years ago of lcc-1.9 to the 65816.
The entire code generation is datafile-driven, and it's easy to port.
It's possible to crank out a code generator for a processor in about
two weeks, but the compiler doesn't optimize much.
It's available by request - let me know if you want it.
>- Would it be easier retarget a forth implementation?
Probably a factor of two to four easier IMHO to do a Forth implementation.
Toshi