Re: gcc-toolchain for freescale's MC9S12X (68HCS12) ??



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.

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.




.



Relevant Pages

  • Re: censored by comp.compilers [was please suggest an OS and language a text]
    ... The x86 instruction set isn't that complex, ... Windows has a lot of doc but Windows doesn't do 10% of what ... a static compiler can probably be done with little more than file IO. ... a VM involving JIT may need a bit more to be effective (mmap and libdl on Linux, ...
    (comp.lang.misc)
  • Re: Testing ham radio software on Sun hardware.
    ... Is that like the way Micro$oft adheres to the W3C standards? ... It sometimes means code built with gcc will not compile on better compilers. ... The other issue is that people often write code that works on Linux, but makes use of Linux specific header files. ... If anyone has some open-source UNIX or Linux code they would like to test on a Sun, using a commercially produced C compiler, let me know. ...
    (uk.radio.amateur)
  • Re: how to install ruby in home folder ?.
    ... i am using linux ubuntu 7.04. ... configure:1892: checking build system type ... configure:2245: checking for gcc ... configure:2563: checking for C compiler default output file name ...
    (comp.lang.ruby)
  • Re: Different code behaviour in Unix & Windows
    ... Please post compiler versions for both Windows and Linux. ... gcc --version will pop the version number for gcc. ... algorithm guarantees that the final result will fit into `a`. ...
    (comp.lang.c)
  • Re: Use of C99 int types
    ... > those that actually are part of the C-implementation for Linux. ... the kernel definitions are part of /usr/include). ... The kernel uses __foobar stuff provided by the compiler because it has ... > the Gimp and GCC run on completely different architectures aswell. ...
    (Linux-Kernel)