|
|||||||||||
Technical Support Support Resources
Product Information |
C51: Naming Conventions for Function SymbolsInformation in this article applies to:
QUESTIONI have problems passing parameters from a C file to an assembly function. I think the problem is with the declarations. My assembly function receives a pointer as an argument. The C prototype I'm using is:
The assembler code is:
When I build my project, the linker outputs the warning Unresolved External Symbol for Function in the C file. If I change the function prototype to have a void argument list and if I pass no parameters to Function, the program compiles and links without warnings. What could be the problem? ANSWERThe C51 compiler adds an underline character ('_') to the beginning of function names to indicate that all arguments are passed in registers. This is documented in the Cx51 User's Guide under Program Objects. If you add an underline character ('_') before the function name in the assembler source file your project will build as you expect. MORE INFORMATION
SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.