In many projects it often makes sense to use both a C compiler and an assembler. Both have different advantages. The compiler uses portable and readable code, while the assembler provides full control for time-critical applications or for direct accessing of the hardware.
The compiler cannot read the include files of the assembler, and the assembler cannot read the header files of the compiler.
The assembler's include file output of the compiler lets both tools use one single source to share constants, variables or labels, and even structure fields.
The compiler writes an output file in the format of the assembler which contains all information needed of a C header file.
The current implementation supports the following mappings:
C defines are translated to assembler EQU directives.
C enum values are translated to EQU directives.
The size of any type and the offset of structure fields is generated for all typedefs. For bitfield structure fields, the bit offset and the bit size are also generated.
For each function an XREF entry is generated.
C Variables are generated with an XREF. In addition, for structures or unions all fields are defined with an EQU directive.
C style comments ( /* ... */) are included as assembler comments ( ;...).