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

#pragma SRC: respecified or conflicting control

I have a very simple program:

void main(void)
{
#pragma asm
inc a
#pragma endasm
}

If I compile it as it is I get:
error C272: 'asm/endasm' requires src-control to be active.

So to fix it, I add:
#pragma src
to the top of the file. However, this introduces a new error:
C51 FATAL-ERROR -
ACTION: PARSING INVOKE-/#PRAGMA-LINE
LINE: #pragma SRC
ERROR: RESPECIFIED OR CONFLICTING CONTROL

I've tried adjusting the options for the source file to generate assembler SRC file and assemble SRC file but to no avail.

Can anyone tell me what I'm doing wrong?

Al.

Parents
  • Is SRC actually allowed in a #pragma?

    I've only ever used it as a command-line control, specified via uVision:

    Select both 'Generate assembler SRC File' and 'Assemble SRC File' in the 'Properties' tab of the Options for the file in question (right-click the file, and choose 'Options for File xxx').

Reply
  • Is SRC actually allowed in a #pragma?

    I've only ever used it as a command-line control, specified via uVision:

    Select both 'Generate assembler SRC File' and 'Assemble SRC File' in the 'Properties' tab of the Options for the file in question (right-click the file, and choose 'Options for File xxx').

Children