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

Hello,

I have a problem with #pragma SRC directive. First, when I write it at the begining of my C file the compiler (CARM) writes:

MAIN.C(1): warning C2: 'SRC': unknown #pragma/control, line ignored

Then I removed this line and right-clicked main.c in project window and under Options I checked Generate Assembler SRC file and I got this message:

Build target 'MCB2140'
compiling main.c...
linking...
*** WARNING L23: UNRESOLVED EXTERNAL SYMBOLS
*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: ?C?INIT ADDRESS: 00000104H
Program Size: data=1168 const=16 code=296
Target not created

This is strange because I have main routine in my main.c file. Can anyone help me?

Best regards,

Borut

Parents
  • You are right - compiler generates it. My mistake. But the problem here is that the compiler doesn't generates it as I already mentioned before. I checked the project's folder and I there isn't any *.SRC file (there is always an error and the target isn't built - one is that the #pragma SRC is not recognized by the compiler or if I enable the Generate Assembler SRC under Options for C file there is the error of ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: ?C?INIT as I already wrote). Now you see my problem? :) In the begining of my C source file I wrote #pragma SRC and there was the unrecognized directive. Then i erased this and I enabled the Generate Assembler SRC file under Options for my source file. Again an error L128.... Next, I read the manual for CARM and there it says that SRC is supported by the CARM. What am I doing wrong here? Thank you again.

Reply
  • You are right - compiler generates it. My mistake. But the problem here is that the compiler doesn't generates it as I already mentioned before. I checked the project's folder and I there isn't any *.SRC file (there is always an error and the target isn't built - one is that the #pragma SRC is not recognized by the compiler or if I enable the Generate Assembler SRC under Options for C file there is the error of ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: ?C?INIT as I already wrote). Now you see my problem? :) In the begining of my C source file I wrote #pragma SRC and there was the unrecognized directive. Then i erased this and I enabled the Generate Assembler SRC file under Options for my source file. Again an error L128.... Next, I read the manual for CARM and there it says that SRC is supported by the CARM. What am I doing wrong here? Thank you again.

Children