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

Compiler problem

Hi..
I have a problem with in-line assembly in uVision2. First I write #pragma src in the first line of code, then comes some C-code, and then I have a routine including
#pragma asm
NOP (here shoud come some assembler code)
#pragma endasm
After compiling uVision says
FATAL ERROR L210, filename.obj not found.

What can I do?

  • When you use the SRC directive, the C51 compiler generates a .SRC file which must be assembled using the A51 assembler.

    Jon

  • "the C51 compiler generates a .SRC file which must be assembled using the A51 assembler"

    this means that you also lose all 'C' symbolic debug information for that whole file

    It's generally best to write proper assembler in an assemler source file and call it from 'C'.

    By all means use ASM...ENDASM to give you a framework, but then make it a separate assembler function!