 | Discussion Forum |  |
|
|
3 little brown squaresNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author erik malund Posted 15-Aug-2001 22:25 GMT Toolset C51 |  3 little brown squares erik malund 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 | | Read-Only Author erik malund Posted 16-Aug-2001 14:36 GMT Toolset C51 |  RE: brown squares gone, still problem erik malund I deleted the file from the project and added it back, the brown squares are now gone, but I still get the error.
Erik | | Read-Only Author erik malund Posted 16-Aug-2001 15:17 GMT Toolset C51 |  RE: brown squares gone, still problem erik malund is the problem related to the call from the "C" code : bit CdataWrite(char xdata * loc, unsigned char dat); | | Read-Only Author erik malund Posted 16-Aug-2001 15:44 GMT Toolset C51 |  RE: what is the problem erik malund 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 | | Read-Only Author erik malund Posted 16-Aug-2001 16:27 GMT Toolset C51 |  RE: This thing is stupid erik malund 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 | | Read-Only Author Jon Ward Posted 16-Aug-2001 19:01 GMT Toolset C51 |  RE: This thing is stupid Jon Ward 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 | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|