Is there anyone but me that would benifit from a utility to combine C and assembly? I have found that LPP almost never works. According to this tread there are others that have also encountered problems http://www.keil.com/forum/docs/thread729.asp I know it can be done because we use another compiler for the HC16 and it works flawlessly. Here is an example. Note that absolute addresses have even been inserted. My guess is that they are using their equivalent to an OMF file to generate this.
19330 _TPA_allowed: 19331 19333 47692 T 340C pshm y,x 19334 47694 T 274F tsx 19335 47696 T .set OFST=2 19336 19338 ; 2131 BOOLEAN allowed = FALSE; 19339 47696 T 0501 clr OFST-1,x 19340 47698 T ; 2132 19341 ; 2133 if ( TPA_faults == TPA_NO_FAULTS ) 19342 19344 47698 T F50C ldk #.__data__ 19345 4769A T 27FA tbek 19346 4769C T 17F536B2 ldab L34_TPA_faults 19347 476A0 T B600 bne L17101 19348 476A2 T ; 2134 { allowed = TRUE; 19349 19351 476A2 T F501 ldab #1 19352 476A4 T CA01 stab OFST-1,x 19353 476A6 T L17101: ; line 2136, offset 19 19354 ; 2135 } 19355 ; 2136 return(allowed); 19356 19358 476A6 T C501 ldab OFST-1,x 19359 476A8 T 3705 clra 19360 476AA T 19362 476AA T 3518 pulm y,x 19363 476AC T 27F7 rts 19364 476AE T ; 2137 }
Refer to the following knowledgebase article: http://www.keil.com/support/docs/148.htm Jon
I use the C166 toolset. Is that feature available with it (or will it be)? Also, I tried using the SRC directive a while ago and did not like it for some reason. I beleive because when I build the target the files that use the SRC directive would be re-built every time regardless of whether the source code was modified or not. -Walt
"files that use the SRC directive would be re-built every time regardless" Yes, they are. You also lose any source-level debug capability with the original 'C' file, identifiers, etc. Another reason to keep your 'C' in .c files for the compiler, and your assembler in .asm files for the assembler!
You also lose any source-level debug capability with the original 'C' file Really! That's worse than rebuilding everytime. I sounds like the .COD file that Jon mentioned provides what I'm asking for but it does not look like it is available for the C166, at least not yet. -Walt