Re: gcc-toolchain for freescale's MC9S12X (68HCS12) ??
- From: onlinefloh@xxxxxxxxxxxxxxxx (Florian E. Teply)
- Date: Thu, 29 May 2008 17:25:27 +0200
David Brown <david@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Florian E. Teply wrote:
Hiya folks,
as you might guess from the subject: I'm trying to find a toolchain for
freescale's hcs12 or S12X family of microcontrollers. Currently i'm
using Codewarrior on the Windows machine at work, but as i'm a tad
dissatisfied by it's lack of decent syntax-checking and have no windows
at home, i'd rather use some free compiler available for my rather
unusual platform (Linux on PowerPC). So gcc would probably be the best
bet.
Has any of you guys experience with that combination or another
suggestion (apart from buying some windows machine)??
gcc provides better syntax checking than any other compiler I have
tried. However, I don't believe there is a gcc port for the 68HCS12 -
if such a thing exists, it would only be as a minor partial port. But
there are a couple of other ways to achieve what you want without
dropping Codeworrier.
I'm not necessarily into dropping Codewarrior, i thought more like using
gcc as some sort of syntax check while not at work, so i can test the
stuff at home and concentrate on fixing this mess at work ;-)
Proper binaries would be an added bonus though.
And -- i just checked -- the gcc man page lists in the "machine dependent
options" section the options -m68hc12 and -m68hcs12 in version 4.3.0.
I'll probably try and get this to work, but as said: using gcc as a mere
syntax checker would already be a start.
It is quite possible to use gcc for a different target as a static
analysis tool. I've done that along with a commercial compiler for a
target (I've forgotten which - it was a long time ago) - gcc "compiles"
the program natively for the host (linking tended to fail...). It might
mean a little bit of fiddling to get the right headers at the right
place, and perhaps an extra header defining macros for any compiler
extensions used by the real target compiler, but it can often work well.
You can also use gcc to generate the makefile dependencies at the same
time.
An alternative is to use a dedicated static analysis tool. The big one
is PC-Lint, which is a reasonable price on Windows (but absurdly four
times the price on Linux - and I doubt they support PPC Linux). The
open source option is splint, which should be fine on your system.
Thanks, will have a look at splint.
Greetings,
Florian
.
- Follow-Ups:
- Re: gcc-toolchain for freescale's MC9S12X (68HCS12) ??
- From: Grant Edwards
- Re: gcc-toolchain for freescale's MC9S12X (68HCS12) ??
- References:
- gcc-toolchain for freescale's MC9S12X (68HCS12) ??
- From: Florian E. Teply
- Re: gcc-toolchain for freescale's MC9S12X (68HCS12) ??
- From: David Brown
- gcc-toolchain for freescale's MC9S12X (68HCS12) ??
- Prev by Date: Re: gcc-toolchain for freescale's MC9S12X (68HCS12) ??
- Next by Date: Re: gcc-toolchain for freescale's MC9S12X (68HCS12) ??
- Previous by thread: Re: gcc-toolchain for freescale's MC9S12X (68HCS12) ??
- Next by thread: Re: gcc-toolchain for freescale's MC9S12X (68HCS12) ??
- Index(es):
Relevant Pages
|