![]() Have you considered maybe writing that bit of code in C, rather than assembly language, and letting the compiler handle the calling convention details? I only use the "extern" keyword on global variables, not on global functions, exactly as Kanwar Saad describes. (The assembly-language name of C++ functions has much more decoration). ![]() To refer to a C function that is defined in C without an underscore ("SavePC"). Often assembly language must use a name decorated with an underscore ("_SavePC") The c file with the assembly includes the header file with the SavePC prototype. Error: Unknown symbol in inline assembly: "IMPORT"Įrror: Unknown symbol in inline assembly: "SavePC"Įrror: Syntax error in inline assembly: "Error: Expression can not be forward" I have tried to IMPORT the function like so. However, when SavePC is placed in another c file I have no luck. This works fine when SavePC is in the same c file. The assembly is basically meant to pass the current stack pointer as a parameter (in R0). I have a bit of assembly in a hard fault handler. Not getting much traction over there either. I have posted a duplicate question in stackoverflow, however this may be just as appropriate here given that it's for an embedded platform and a number of embedded developers frequent this stackexchange. I don't know if this is recommended or not but I am sure someone will give me a stern warning if not.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |