EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Looking to buy a used embedded cross compiler

Started by Jim June 25, 2010
Hi,

I have this home project and am currently set up with a MS Windows gcc
cross compiler to 68000.  I did a quick look at the assembler and saw
that when I passed a single variable to a function, it was pushed onto
the stack.  I think that overhead could cause problems.  I'll talk to
the gcc guys to see if there's some setting to get around that.  But,
to plan ahead, I thought I'd casually look around for a used 68000
compiler & linker--I don't want to spend thousands on a brand new
one.  I know of several used test equipment sites, but so far a google
search has only found one site that had a compiler (I think it was HP
BASIC).  Does anyone know of any used tech sw sites?

Thanks,


Jim
Jim wrote:
> Hi, > > I have this home project and am currently set up with a MS Windows gcc > cross compiler to 68000. I did a quick look at the assembler and saw > that when I passed a single variable to a function, it was pushed onto > the stack. I think that overhead could cause problems. I'll talk to > the gcc guys to see if there's some setting to get around that. But, > to plan ahead, I thought I'd casually look around for a used 68000 > compiler & linker--I don't want to spend thousands on a brand new > one. I know of several used test equipment sites, but so far a google > search has only found one site that had a compiler (I think it was HP > BASIC). Does anyone know of any used tech sw sites? >
If you are looking for a good compiler for the m68k, and don't want to spend very large sums of money, then gcc is almost certainly your best choice (personally, I think gcc is the best choice for the 68k target even if you /do/ have lots of money to spend, but not everyone agrees on that). If you think gcc is producing poor code, there are three likely explanations. One is that you might have a very old version of the compiler - anything older than gcc 4.3 is out of date. If you have just searched around the web for gcc for the 68000 or the m68k, it's not unlikely that you have found an old version - perhaps gcc 2.x, since newer versions are almost invariably referred to as targeting the Coldfire. But since Coldfire is basically a newer variant of the m68k, the same compiler works fine for the 68000. The second reason for producing poor code is if you've got the wrong compiler flags. If you don't specify any optimisation flags (-Os and -O2 are typical choices), you get target code that is a very simple direct translation of the source code, and it is neither small nor fast. The third reason is that you are missing an understanding of the architecture and its ABI conventions. On the m68k, the standard calling convention IIRC is to use D0 and D1 for the first two arguments, then to push the other arguments on the stack. However, there may be other calling conventions that push /all/ the arguments on the stack. You will need to check if you are using the correct flags for the calling convention you need, or alternatively check that the gcc you have was configured for the correct platform (there may be differences if it was configured for a plain elf target, or a unix target). If the compiler is generating code for a function that has external linkage, the code must follow the ABI for the platform - and that means arguments on the stack. The way to improve on this is to make good use of modularised and structured code, along with "static" for any function that is not exported from a module. That way most functions are under full control of the compiler, and it can be more flexible about argument passing. I would recommend that you look at www.codesourcery.com for a current version of gcc for the Coldfire (and thus for the 68000). You can download an entirely free version, or pay for a version with Eclipse integration and a support contract.
"Jim" <adirondackmtn@yahoo.com> wrote in message 
news:84ff00c2-3f07-4653-a538-f8b4da42841d@b35g2000yqi.googlegroups.com...
> Hi, > > I have this home project and am currently set up with a MS Windows gcc > cross compiler to 68000. I did a quick look at the assembler and saw > that when I passed a single variable to a function, it was pushed onto > the stack. I think that overhead could cause problems. I'll talk to > the gcc guys to see if there's some setting to get around that. But, > to plan ahead, I thought I'd casually look around for a used 68000 > compiler & linker--I don't want to spend thousands on a brand new > one. I know of several used test equipment sites, but so far a google > search has only found one site that had a compiler (I think it was HP > BASIC). Does anyone know of any used tech sw sites? >
Thinking outside the square - the 68000 work I have done most recently did not use a cross-compiler. I used 68000 development hardware i.e. a Mac Quadra and a Sage IV both of which I got on eBay. In my case I used the MacMeth Modula-2 compiler on the Mac. The source is available on my website along with the source of a 68000 assembler written in Modula2: http://www.cfbsoftware.com/modula2 I wouldn't have thought it was too difficult to get a C compiler for the Mac. Regards, Chris Burrows CFB Software Astrobe: ARM Oberon-07 Development System http://www.astrobe.com
"Jim" <adirondackmtn@yahoo.com> wrote in message 
news:84ff00c2-3f07-4653-a538-f8b4da42841d@b35g2000yqi.googlegroups.com...
> > I thought I'd casually look around for a used 68000 > compiler & linker--I don't want to spend thousands on a brand new > one.
It might be ancient (1988) but it had a very good reputation in its day - Manx Aztec C68K. The MS-DOS version and a PDF manual on BitSavers: http://www.bitsavers.org/pdf/manx/ There's also a version rebundled for Windows XP which you can download from: http://www.aztecmuseum.ca/compilers.htm Regards, Chris Burrows CFB Software Astrobe: ARM Oberon-07 Development System http://www.astrobe.com
On Fri, 25 Jun 2010 13:59:05 -0700 (PDT), Jim
<adirondackmtn@yahoo.com> wrote:

>search has only found one site that had a compiler (I think it was HP >BASIC). Does anyone know of any used tech sw sites?
I don't have a link. But IAR eg. offers eval versions. Also Codewarrior can be get for free with a size limitation. But I am not sure if both do plain old 68000 or only ColdFire. -- 42Bastian Do not email to bastian42@yahoo.com, it's a spam-only account :-) Use <same-name>@monlynx.de instead !
On Jun 25, 5:46=A0pm, David Brown
<david.br...@hesbynett.removethisbit.no> wrote:
> Jimwrote: > > Hi, > > > I have this home project and am currently set up with a MS Windows gcc > > cross compiler to 68000. =A0I did a quick look at the assembler and saw > > that when I passed a single variable to a function, it was pushed onto > > the stack. =A0I think that overhead could cause problems. =A0I'll talk =
to
> > the gcc guys to see if there's some setting to get around that. =A0But, > > to plan ahead, I thought I'd casually look around for a used 68000 > > compiler & linker--I don't want to spend thousands on a brand new > > one. =A0I know of several used test equipment sites, but so far a googl=
e
> > search has only found one site that had a compiler (I think it was HP > > BASIC). =A0Does anyone know of any used tech sw sites? > > If you are looking for a good compiler for the m68k, and don't want to > spend very large sums of money, then gcc is almost certainly your best > choice (personally, I think gcc is the best choice for the 68k target > even if you /do/ have lots of money to spend, but not everyone agrees on > that). > > If you think gcc is producing poor code, there are three likely > explanations. =A0One is that you might have a very old version of the > compiler - anything older than gcc 4.3 is out of date. =A0If you have jus=
t
> searched around the web for gcc for the 68000 or the m68k, it's not > unlikely that you have found an old version - perhaps gcc 2.x, since > newer versions are almost invariably referred to as targeting the > Coldfire. =A0But since Coldfire is basically a newer variant of the m68k, > the same compiler works fine for the 68000. > > The second reason for producing poor code is if you've got the wrong > compiler flags. =A0If you don't specify any optimisation flags (-Os and > -O2 are typical choices), you get target code that is a very simple > direct translation of the source code, and it is neither small nor fast. > > The third reason is that you are missing an understanding of the > architecture and its ABI conventions. =A0On the m68k, the standard callin=
g
> convention IIRC is to use D0 and D1 for the first two arguments, then to > push the other arguments on the stack. =A0However, there may be other > calling conventions that push /all/ the arguments on the stack. =A0You > will need to check if you are using the correct flags for the calling > convention you need, or alternatively check that the gcc you have was > configured for the correct platform (there may be differences if it was > configured for a plain elf target, or a unix target). > > If the compiler is generating code for a function that has external > linkage, the code must follow the ABI for the platform - and that means > arguments on the stack. =A0The way to improve on this is to make good use > of modularised and structured code, along with "static" for any function > that is not exported from a module. =A0That way most functions are under > full control of the compiler, and it can be more flexible about argument > passing. > > I would recommend that you look atwww.codesourcery.comfor a current > version of gcc for the Coldfire (and thus for the 68000). =A0You can > download an entirely free version, or pay for a version with Eclipse > integration and a support contract.
Thanks Dave. Like I said, I planned on looking into the compile flags to see if I get reduce the tendency to use the stack. That's a good idea about external linkage though--I didn't think about that. Some functions are indeed external, but many are not. It's been so long since I looked at the assembler (been far too busy), I'll have to check again to see if they were local functions or not. Thanks again, Jim
On Jun 25, 8:51=A0pm, "Chris Burrows" <cfbsoftw...@hotmail.com> wrote:
> "Jim" <adirondack...@yahoo.com> wrote in message > > news:84ff00c2-3f07-4653-a538-f8b4da42841d@b35g2000yqi.googlegroups.com... > > > Hi, > > > I have this home project and am currently set up with a MS Windows gcc > > cross compiler to 68000. =A0I did a quick look at the assembler and saw > > that when I passed a single variable to a function, it was pushed onto > > the stack. =A0I think that overhead could cause problems. =A0I'll talk =
to
> > the gcc guys to see if there's some setting to get around that. =A0But, > > to plan ahead, I thought I'd casually look around for a used 68000 > > compiler & linker--I don't want to spend thousands on a brand new > > one. =A0I know of several used test equipment sites, but so far a googl=
e
> > search has only found one site that had a compiler (I think it was HP > > BASIC). =A0Does anyone know of any used tech sw sites? > > Thinking outside the square - the 68000 work I have done most recently di=
d
> not use a cross-compiler. I used 68000 development hardware i.e. a Mac > Quadra and a Sage IV both of which I got on eBay. In my case I used the > MacMeth Modula-2 compiler on the Mac. The source is available on my websi=
te
> along with the source of a 68000 assembler written in Modula2: > > http://www.cfbsoftware.com/modula2 > > I wouldn't have thought it was too difficult to get a C compiler for the > Mac. > > Regards, > Chris Burrows > CFB Software > > Astrobe: ARM Oberon-07 Development Systemhttp://www.astrobe.com
Thanks Chris, but I really want a C compiler and I need control over things like startup code, code placement in ROM/RAM, etc. which some/ most? desktop compilers won't give me. Jim
On Jun 26, 8:50=A0am, "Chris Burrows" <cfbsoftw...@hotmail.com> wrote:
> "Jim" <adirondack...@yahoo.com> wrote in message > > news:84ff00c2-3f07-4653-a538-f8b4da42841d@b35g2000yqi.googlegroups.com... > > > > > =A0I thought I'd casually look around for a used 68000 > > compiler & linker--I don't want to spend thousands on a brand new > > one. > > It might be ancient (1988) but it had a very good reputation in its day - > Manx Aztec C68K. The MS-DOS version and a PDF manual on BitSavers: > > http://www.bitsavers.org/pdf/manx/ > > There's also a version rebundled for Windows XP which you can download fr=
om:
> > http://www.aztecmuseum.ca/compilers.htm > > Regards, > Chris Burrows > CFB Software > Astrobe: ARM Oberon-07 Development Systemhttp://www.astrobe.com
Chris, Yeah, I have that compiler, but I'm not confident I'll have control over things like startup code, code placement in ROM/RAM, etc. I will look at when I have some time. Thanks again, Jim
On Jun 28, 2:52=A0am, bastia...@yahoo.com (42Bastian Schick) wrote:
> On Fri, 25 Jun 2010 13:59:05 -0700 (PDT),Jim > > <adirondack...@yahoo.com> wrote: > >search has only found one site that had a compiler (I think it was HP > >BASIC). =A0Does anyone know of any used tech sw sites? > > I don't have a link. But IAR eg. offers eval versions. Also > Codewarrior can be get for free with a size limitation. > But I am not sure if both do plain old 68000 or only ColdFire. > > -- > 42Bastian > Do not email to bastia...@yahoo.com, it's a spam-only account :-) > Use <same-name>@monlynx.de instead !
42Bastian, Thanks, but trial-ware isn't what I'm after (probably going to be too limited). Now if somebody had an IAR with dongle for sale... :) Jim
Op Mon, 16 Aug 2010 20:56:54 +0200 schreef Jim <adirondackmtn@yahoo.com>:
> On Jun 28, 2:52 am, bastia...@yahoo.com (42Bastian Schick) wrote: >> On Fri, 25 Jun 2010 13:59:05 -0700 (PDT),Jim >> >> <adirondack...@yahoo.com> wrote: >> >search has only found one site that had a compiler (I think it was HP >> >BASIC). Does anyone know of any used tech sw sites? >> >> I don't have a link. But IAR eg. offers eval versions. Also >> Codewarrior can be get for free with a size limitation. >> But I am not sure if both do plain old 68000 or only ColdFire.
Currently it only targets ColdFire V1 and V2 cores.
> Thanks, but trial-ware isn't what I'm after (probably going to be too > limited). Now if somebody had an IAR with dongle for sale... > :)
I hope not. The license agreement of most commercial compilers prohibits transfer of the software and the license. -- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/ (remove the obvious prefix to reply by mail)

The 2024 Embedded Online Conference