Forums

HC11 C Compiler Recommendations?

Started by Mike Murphree March 28, 2005
At 01:02 PM 3/28/2005 -0600, you wrote:
>...
>
>We are using an IP core and not a real HC11 so we need access to the C
>runtime source (and preferably library). Most of the native HC11
>registers and peripherals are either not supported or implemented
>differently so we need to be able to customize the library source if it
>depends upon them. We are currently using the Imagecraft product and
>have exceeded the amount of code space that we would like to use, so
>good optimization is a must. We are using the NoICE debugger and it
>would be helpful if the object file format was supported by the
>compiler/linker.
>
>I have the non-commercial license of Introl which won't help me much
>and it doesn't belong to my company either. >Thanks,
>Mike

Mike,

I mostly just linger, and my 68HC11 projects (so far) haven't been quite as
lengthy as yours. However, I may have a few hints which may help you with
the ICC compiler. Since your core doesn't have most of the registers, then
I would suggest not using the include-file that has all of the HC11
defines. You mentioned something about the start-up code produced by the
compiler was trying to write to some of these registers: I recently had to
dig through and locate the default start-up code and modify it. You should
be able to do the same per your requirements. One trick with the start-up
code is that it is all written in assembler, and you have to use the
Imagecraft assembler to assemble it to be compatible with their
compiler. The command-line for running the assembler was omitted from the
V6 compiler manual, but it is listed in the V5 manual.

One of the problems I found with my code concerned the way I had written a
number of pre-initialized character arrays to hold various canned messages
I needed. I found that the compiler's startup code was copying these
arrays from eprom space into ram space, and using the ram copies as the
program calls upon them. This was rather wasteful, and not what I would
consider "documented." I was able to shift to using just the epromed
arrays by declaring the arrays as CONST. In hindsight, this seemed pretty
obvious to me. My thought was that maybe you have some similar blocks of
code that can be changed to free up some address space. I don't use most
of the standard libraries that come with the compiler because they don't
meet my requirements i.e. they don't know how to talk to my LCD or use my
protocal when using the serial port. I don't know why you can't just
modify the given libraries to suit your requirements, since all the source
is supplied.

What I am looking forward to is the 68HC11 V7 compiler, which is supposed
to support some C++ extensions, some of which may help some of my projects,
if not yours :)

Steve




In a message dated 3/29/05 6:12:59 P.M. Eastern Standard Time,
stevetabler@stev... writes:

What I am looking forward to is the 68HC11 V7 compiler, which is supposed
to support some C++ extensions, some of which may help some of my projects,
if not yours :)

=================================
That would be cool. Make sure we get our wishes/votes in for support of
direct addressed variables like in the hc08 compilier!