This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using C header file in an assembly file

How do I use a c header file in an assembly file?
When I use:
#include "xxx.h"
I get the invalid line start error.
Please help

Parents
  • As Patrick Pointed out their seems to be no easy way to precompile assembly files and then assemble the output thorugh uV IDE.
    The only way I had found till now is running a batch file through uV IDE which will precompile and assemble the files.This is done by putiing on the option of run script before make in the options for target.

Reply
  • As Patrick Pointed out their seems to be no easy way to precompile assembly files and then assemble the output thorugh uV IDE.
    The only way I had found till now is running a batch file through uV IDE which will precompile and assemble the files.This is done by putiing on the option of run script before make in the options for target.

Children
  • uVision works through the files in the Project file list in order.

    So you could try something like this:

    Put the headers at the top of the list, and define a "Custom Translation" that just pre-processes them to, say, .i files.

    Then you also add the .i files, and set them as assembler source files.

    Then the rest of your project files, as usual...

    Not amazingly convenient, but should work...