How to include inline assembly when I have many C-files in project?

I have many C-files in the project. I would like to include inline assembly in some files so I do this step,
- I include assembly code between "#pragma asm" and "#pragma endasm"
- I include "#pragma src" on the top of that file.
when I compile, it said "Fatal Error L210: I/O Error on Input File"
"Exception 0021H: Path or File Not Found"
It has only 1 error. I try to use this step with the project that has only 1 C-file, it works. So I think it's because of many C-file.
One thing that I see is it tell me the same result even though I include only src directive(don't include any assembly code).
How should I do? Thank you very much for your suggestion. :)

Parents
  • Why do you want to use inline assembler anyway?

    Like I always say: if you need some assembler, have it properly as an assembler module - don't mess about with inline assembler in 'C' source files!

    Remember: the SRC directive turns your 'C' source into assembler, so you lose all 'C' source-level debug & browsing facilities for that file.

    Using the SRC directive is a great way to initially create 'C'-compatible assembler source as a starting point - with all the right calling & naming conventions, parameter passing, etc - but once you've done that, the 'C' file is of no further use; so throw it away!

    http://www.keil.com/forum/docs/thread4399.asp

Reply
  • Why do you want to use inline assembler anyway?

    Like I always say: if you need some assembler, have it properly as an assembler module - don't mess about with inline assembler in 'C' source files!

    Remember: the SRC directive turns your 'C' source into assembler, so you lose all 'C' source-level debug & browsing facilities for that file.

    Using the SRC directive is a great way to initially create 'C'-compatible assembler source as a starting point - with all the right calling & naming conventions, parameter passing, etc - but once you've done that, the 'C' file is of no further use; so throw it away!

    http://www.keil.com/forum/docs/thread4399.asp

Children
More questions in this forum