2014-06-28 01:46 AM
I define a macrio in .h file using C language:#define VERSION 0x01.But I want to use it in an ASM file. How can I reference it? I try to #include ''*.h'', but it failed.
2014-06-28 02:50 AM
It is not possibly. Assembler doesn't know about C language.
2014-06-28 04:25 AM
It's a feature that depends on your toolchain.
Example: using GNU toolchain, assembly file (*.S) are first sent to the C preprocessor, where header files can be included, and macro expanded. Which toolchain do you use ?2014-06-28 11:46 AM
''Assembler doesn't know about C language''
As already noted, it depends on the Assembler.eg, RTFM for the particular assembler in question...2014-06-28 11:51 AM
As suggested in the
http://www.keil.com/forum/8313/
, even if the Assembler in question doesn't support 'C' headers, you could pass the source file through the'C'
preprocessor - to deal with #include, #define, #if, etc -before
giving it to the Assembler...2014-06-28 08:07 PM
Thanks your reply. I use MDK-ARM in keil.