Georg-Johann Lay <a...@gjlay.de> wrote on 23/01/2009 01:06:01 p.m.: > > > > So, from what I can see, the compiler makes these defines available to > > C source, but not to asm (.S) source, and I need to repeat them myself > > in the asm file to use them there. > > No, these defines are not available in a C source. They are available in
> a assembler .s source that is generated by the compiler. > So you can use this in your inline asm. > > If you like make you can make the assembler source(s) dependent on a > dummy header: > > .INTERMEDIATE: asm-defines.h dummy.c > > %.S: asm-defines.h > > dummy.c: > touch $< > > asm-defines.h: dummy.c > avr-gcc -mmcu=$(MCU_TARGET) -S $< -o $@ > > and include the generated header in your files > > #include "asm-defines.h" > > in order to be always in sync with the compiler and the target. > Thanks Georg-Johan, That explains it clearly, and your suggestion is just the kind of thing I had been looking for. Colin. ########################################################################### This e-mail is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this e-mail and any attached files. You may not copy, disclose or use the contents in any way. The views expressed in this e-mail may not be those of Gallagher Group Ltd or subsidiary companies thereof. ########################################################################### _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list