We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have been using the Keil tools for a long time and decided to try uVision for the first time and now have 3 projects. 2 hum along just fine, but in the 3rd I get "warning L1 unresolved external symbol" and "Warning L2 refrence made to unresolved external" both followed by "SYMBOL: WRITETOFLASH" I have cut the module containing the reference to the bare minimum: PUBLIC WriteToFlash FLASHIT SEGMENT CODE RSEG FLASHIT WriteToFlash: ret end In this project the 3 little brown squares I see next to "target 1" on all 3 projects appear next to the name of the above file. What is wrong ? Erik
I deleted the file from the project and added it back, the brown squares are now gone, but I still get the error. Erik
is the problem related to the call from the "C" code : bit CdataWrite(char xdata * loc, unsigned char dat);
I removed the parametres from the function call in the "C" source i.e. void CdataWrite(void) and now the error is gone. It can not be true that you can not pass values from "C" to an assembler function, what have I missed? Erik
Found the reason: when Keil "C" calls an external function it will call it by its name if there are no parmetres attached; however if there are parametres attached it is called by _name. Is this done just to confuse poor souls like me or is there madness to the reason? Erik
The _ in front of the function name indicates that the arguments are passed in registers. Refer to the section titled, "Interfacing C Programs to Assembler" in the C51 Compiler User's Guide. The _ is explained there under Function Parameters. This is also described in the following knowledgebase article: http://www.keil.com/support/docs/712.htm Jon