EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

68000 compiler?

Started by Unknown February 22, 2009
I have some code for a 68000 based system that I need to compile/
modify, it was written for use with the SDS cross compiler, however I
can't find anyone that sells it anymore.


What would you recommend to use as a 68000 compile (target chip is
actually 68332)
Is there a good free 68000 compiler? Just use an old version of gcc?
myforwik@gmail.com wrote:
> I have some code for a 68000 based system that I need to compile/ > modify, it was written for use with the SDS cross compiler, however I > can't find anyone that sells it anymore. > > > What would you recommend to use as a 68000 compile (target chip is > actually 68332) > Is there a good free 68000 compiler? Just use an old version of gcc?
Use a current version of gcc, not an old one. 68k compilers are generally labelled as "ColdFire" these days, but I don't think there are any which will not generate code targeted for the 68332 (a.k.a. CPU32). Try www.codesourcery.com, and take your pick from totally free versions or paid-for versions with support, Eclipse integration, etc. Of course, any SDS-specific code or libraries will need to be modified, but that's the case whenever you change compilers in embedded development.
David Brown schrieb:

>> What would you recommend to use as a 68000 compile (target chip is >> actually 68332) >> Is there a good free 68000 compiler? Just use an old version of gcc? > > Use a current version of gcc, not an old one. 68k compilers are > generally labelled as "ColdFire" these days, but I don't think there are > any which will not generate code targeted for the 68332 (a.k.a. CPU32).
Coldfire is a RISCified 68k successor - same register set, less addressing modes, less complex operations, plus some additional opcodes. It's NOT 100% compatible. gcc uses the same backend f�r 68k and coldfire, but you can disable either support during gcc build, so not all versions have to support both. -- Mit freundlichen Gr��en Dipl.-Ing. Frank-Christian Kr�gel
Frank-Christian Kr�gel wrote:
> David Brown schrieb: > >>> What would you recommend to use as a 68000 compile (target chip is >>> actually 68332) >>> Is there a good free 68000 compiler? Just use an old version of gcc? >> >> Use a current version of gcc, not an old one. 68k compilers are >> generally labelled as "ColdFire" these days, but I don't think there >> are any which will not generate code targeted for the 68332 (a.k.a. >> CPU32). > > Coldfire is a RISCified 68k successor - same register set, less > addressing modes, less complex operations, plus some additional opcodes. > It's NOT 100% compatible. >
None of the 68k family are 100% compatible - The 68060 has many opcodes that did not exist in the 68000, and the 68000 has addressing modes that are missing from the 68060. The same applies to the ColdFire. Still, the ISA is the same - the ColdFire is a re-implementation of the same ISA.
> gcc uses the same backend f�r 68k and coldfire, but you can disable > either support during gcc build, so not all versions have to support both. >
I didn't know it was possible to disable support for particular devices during gcc ./configure, but if so, I think it is extremely unlikely that you will find downloadable binaries that have the CPU32 disabled. It would only really be useful for people building from source who want to make an absolute minimal system that supports their devices (for example, to save time building all the extra libraries). So I stand by my assertion (until proved wrong in practice, not just in theory) - find a "ColdFire" compiler and it will support the 68332. It will also generate slightly better code if you specify the 68332 (or CPU32) rather than the 68000.
myforwik@gmail.com wrote:

> I have some code for a 68000 based system that I need to compile/ > modify, it was written for use with the SDS cross compiler, however I > can't find anyone that sells it anymore. > > > What would you recommend to use as a 68000 compile (target chip is > actually 68332) > Is there a good free 68000 compiler? Just use an old version of gcc?
You could try the AS macroassembler: http://john.ccac.rwth-aachen.de:8000/as/ Maybe this is easier than GCC, because I think the syntax of the GCC assembler is very unusual, compared to other assemblers. -- Frank Buss, fb@frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de
Frank Buss wrote:

> Maybe this is easier than GCC, because I think the syntax of the GCC > assembler is very unusual, compared to other assemblers.
Of course: If the SDS cross compiler was a C compiler, GCC would be fine. There are many switches to enable and disable opcodes for different 68000 types. -- Frank Buss, fb@frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de
On Feb 23, 12:28=A0pm, David Brown <da...@westcontrol.removethisbit.com>
wrote:
> ... > > Coldfire is a RISCified 68k successor - same register set, less > > addressing modes, less complex operations, plus some additional opcodes=
.
> > It's NOT 100% compatible. > > None of the 68k family are 100% compatible - The 68060 has many opcodes > that did not exist in the 68000, and the 68000 has addressing modes that > are missing from the 68060. =A0The same applies to the ColdFire. =A0Still=
,
> the ISA is the same - the ColdFire is a re-implementation of the same ISA=
. That's more or less true, but the 020+ (up to the 060, I believe - but I never touched one of these, I used the CPU32 and the 020) has all of the addressing modes of the 68000 plus many new ones. That is, user level code for the 68000 would just run on a 020 or a CPU32 (without causing illegal opcode exceptions, that is). Coldfire is close to all of these but is clearly not 100% compatible to neither of them. Pretty similar, though - unless you have some code written for the 020 or CPU32 which uses the addressing modes not available on the CF, this can be quite a pain. Dimiter ------------------------------------------------------ Dimiter Popoff Transgalactic Instruments http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/ Original message: http://groups.google.com/group/comp.arch.embedded/msg/ac5= 6758e8a0e8cad?dmode=3Dsource
didi wrote:
> On Feb 23, 12:28 pm, David Brown > <da...@westcontrol.removethisbit.com> wrote: >> ... >>> Coldfire is a RISCified 68k successor - same register set, less >>> addressing modes, less complex operations, plus some additional >>> opcodes. It's NOT 100% compatible. >> None of the 68k family are 100% compatible - The 68060 has many >> opcodes that did not exist in the 68000, and the 68000 has >> addressing modes that are missing from the 68060. The same applies >> to the ColdFire. Still, the ISA is the same - the ColdFire is a >> re-implementation of the same ISA. > > That's more or less true, but the 020+ (up to the 060, I believe - > but I never touched one of these, I used the CPU32 and the 020) has > all of the addressing modes of the 68000 plus many new ones. That is, > user level code for the 68000 would just run on a 020 or a CPU32 > (without causing illegal opcode exceptions, that is). Coldfire is > close to all of these but is clearly not 100% compatible to neither > of them. Pretty similar, though - unless you have some code written > for the 020 or CPU32 which uses the addressing modes not available on > the CF, this can be quite a pain. >
I can't find any references to op-codes or addressing modes that were dropped from the 68040 or 68060 - it's always possible that I'm imagining things. It is certainly the case that the 68040 and 68060 runs faster doing complex addressing by hand (i.e., using multiple adds, shifts and moves) rather than by using the complex addressing modes directly - but it looks like they are still available if you want. I'll confirm this when (if) I can find my 68k reference book.
Keith & Dave Walker did/do maintain a c compiler for the 68000 processor 
(c68) and also for the 8086x (c386). Try searching the web for their names 
& compiler names. 

Hul 

myforwik@gmail.com wrote:
> I have some code for a 68000 based system that I need to compile/ > modify, it was written for use with the SDS cross compiler, however I > can't find anyone that sells it anymore.
> What would you recommend to use as a 68000 compile (target chip is > actually 68332) > Is there a good free 68000 compiler? Just use an old version of gcc?
On Feb 23, 6:51=A0pm, David Brown
<david.br...@hesbynett.removethisbit.no> wrote:
> .... > > That's more or less true, but the 020+ (up to the 060, I believe - > > but I never touched one of these, I used the CPU32 and the 020) has > > all of the addressing modes of the 68000 plus many new ones. That is, > > user level code for the 68000 would just run on a 020 or a CPU32 > > (without causing illegal opcode exceptions, that is). Coldfire is > > close to all of these but is clearly not 100% compatible to neither > > of them. Pretty similar, though - unless you have some code written > > for the 020 or CPU32 which uses the addressing modes not available on > > the CF, this can be quite a pain. > > I can't find any references to op-codes or addressing modes that were > dropped from the 68040 or 68060 - it's always possible that I'm > imagining things. =A0It is certainly the case that the 68040 and 68060 > runs faster doing complex addressing by hand (i.e., using multiple adds, > shifts and moves) rather than by using the complex addressing modes > directly - but it looks like they are still available if you want. =A0I'l=
l
> confirm this when (if) I can find my 68k reference book.
That would be an unnecessary effort. Last time I wrote a 68K (CPU32) assembler was > 10 years ago... and I hate to think how many years before that I wrote the former one. IIRC there were no user mode opcodes & addressing modes dropped on the way up, although I have some vague impression there was some minor exception to that for the 060 (but my level of confidence to that is within 10%). I'll be using some of the new tiny Coldfire parts before too long so my 68k assembler will come into play again, but I may get away with just adding a few macros and not having to make a new version of it at all (this is how I made it - back in the day - assemble 68hc11 code, just a macro file included was all it took). Dimiter ------------------------------------------------------ Dimiter Popoff Transgalactic Instruments http://www.tgi-sci.com ------------------------------------------------------ http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/ Original message: http://groups.google.com/group/comp.arch.embedded/msg/638= 858e10adc657a?dmode=3Dsource

The 2024 Embedded Online Conference