<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16525" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=006242917-27082007><FONT face=Arial
color=#0000ff size=2>Edward,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=006242917-27082007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=006242917-27082007><FONT face=Arial
color=#0000ff size=2>thanks a lot. It really helped to get me
started.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=006242917-27082007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=006242917-27082007><FONT face=Arial
color=#0000ff size=2>Oskar</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> icc-mot-bounces@imagecraft.com
[mailto:icc-mot-bounces@imagecraft.com] <B>On Behalf Of </B>Edward
Karpicz<BR><B>Sent:</B> Samstag, 25. August 2007 10:05<BR><B>To:</B> Discussion
List for ICC08/11/12/16 users. You do NOT need tosubscribetoicc-announce if you
are a member of this.<BR><B>Subject:</B> Re: [Icc-mot] GNU to
ICC<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><A
title=oskar@atk-it.com href="mailto:oskar@atk-it.com">Oskar Atkinson</A>
wrote:</DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></FONT><BR> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>I am absulutly new
to programming on Frescale uC's ( HC9S12C64 ), professionally I am developing
for the win32 platform.</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>I am attemting to
port code which is written for GNU to ICC. Of course I am getting
all kinds of compiler errors</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV></BLOCKQUOTE>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>Porting is easy when
you know what you are doing. I'm not familiar with GCC, I may only guess what
all those attributes are about. </FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>How would this be
correct in ICC ?</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>#define
LOOKUP_ATTR __attribute__ ((section (".lookup")))</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>#define VECT_ATTR
__attribute__ ((section (".vectors")))</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>extern const int
cltfactor_table[1024] LOOKUP_ATTR;</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV></BLOCKQUOTE>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>^^ this looks like
putting some table of constants into nondefault memory area. Well, with
extern declaration (in the header probably) you shouldn't do anything, just
remove LOOKUP_ATTR.</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>extern const int
cltfactor_table[1024];</FONT></SPAN></DIV></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007></SPAN><SPAN
class=147271915-23082007></SPAN><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>Definition is bit
different. First of all create you custom memory section by putting -b linker
option into </FONT></SPAN><SPAN class=147271915-23082007><FONT face=Arial
size=2>Project->Options->Other Options edit box. For
example</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2>-blookup:0x1000.0x4FFF</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>^^ this defines area
lookup from 0x1000 to 0x4FFF</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>Then in C source you
write</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>#pragma
text:lookup</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>const int
cltfactor_table[1024]={1,2,3,4,5,6};</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007>// add here more initialized const
variables</SPAN></DIV>
<DIV><SPAN class=147271915-23082007>#pragma
text:text</SPAN></DIV></FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>INTERRUPT void
UnimplementedISR(void) POST_INTERRUPT;<BR>INTERRUPT void ISR_Ign_TimerIn(void)
POST_INTERRUPT_TEXT3;</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV></BLOCKQUOTE>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>ISR's must
be easier than in GCC. 1) Remove INTERRUPT and POST_xxx, 2) add
#pragma interrupt_handler <function name> to the file where ISR's are
defined:</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>#pragma
interrupt_handler UnimplementedISR</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>void
UnimplementedISR(void)</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2>{</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007>...</SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2>}<BR></FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>
<DIV><SPAN class=147271915-23082007><FONT face=Arial size=2>#pragma
interrupt_handler ISR_Ign_TimerIn</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007></SPAN>void
ISR_Ign_TimerIn(void)</FONT></SPAN></DIV></DIV>
<DIV><SPAN class=147271915-23082007>{</SPAN></DIV>
<DIV><SPAN class=147271915-23082007>}</SPAN></DIV>
<DIV><SPAN class=147271915-23082007></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007>Regards</SPAN></DIV>
<DIV><SPAN class=147271915-23082007>Edward</SPAN></DIV></FONT></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2>TIA</FONT></SPAN></DIV>
<DIV><SPAN class=147271915-23082007><FONT face=Arial
size=2>Oskar</FONT></SPAN></DIV>
<P></P><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><FONT face=Arial size=2></FONT>
<HR>
<P></P>_______________________________________________<BR>Icc-mot mailing
list<BR>Icc-mot@imagecraft.com<BR>http://dragonsgate.net/mailman/listinfo/icc-mot<BR></BLOCKQUOTE></BODY></HTML>