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 directly accessing the hardware.
However, the compiler cannot read include files of the assembler, and the assembler cannot read the header files of the compiler.
The Compiler produces an assembler include file that allows both tools to use one single source to share constants, variables, labels, and even structure fields.
The compiler writes an output file in assembler format which contains all information needed by a C header file.
The current implementation supports the following mappings:
C defines translate to assembler EQU directives.
C enum values translate to EQU directives.
Generates the size of any type and the offset of structure fields for all typedefs. For bitfield structure fields, generates the bit offset and the bit size
Generates an XREF entry for each function.
Generates C variables with an XREF. In addition, defines all fields with an EQU directive for structures or unions.
Includes C style comments ( /* ... */) as assembler comments ( ;....).
The topics covered here are as follows: