Hi there,
I am still struggling to call a C function from an assembler program
Here is the command used:
jsr $pff.c I tried also jsr _pff.c
The result is always the same:
Error (asp100): Characters exist in expression
Any clue ?
Thks in advance for your help
Jean-Pierre
Which compiler are you using?
NC100 compiler with HEW IDE
According to the user manual (rej10j2009):
Assuming that your C-function is named "pff", you would prepend either the $ or _ character depending on whether the function has arguments passed to it.
I would guess that the problem is the ".c" that is being flagged as an error. Why is this included?
You are right the original error was due to the ".c" but when I removed it the error is now: Undefined symbol exist '_pff' despite the file is clearly included in the project under C source file directory.
Is there any working example program I can look at in order to compare with mine
Thks for your help
Is this a compiler error or a linker error for the undefined symbol?
Here is the complete error message from assembly compiler phase:
C:\0DATA\32C\32C Projects\R32C_GFORCE_GRAPHIC\R32C_GFORCE_3\main.a30R32C/100 Series Assembler system V.1.02.01Copyright (C) 2006 (2007 - 2010) Renesas Electronics Corporation.and Renesas Solutions Corporation. All rights reserved.macro processing nowassembler processing now----*----*----*----*----*----*----*----*----*----*-C:\0DATA\32C\32C Projects\R32C_GFORCE_GRAPHIC\R32C_GFORCE_3\main.a30(461) : Error (asp100): Characters exist in expression---TOTAL ERROR(S) 00001TOTAL WARNING(S) 00000TOTAL LINE(S) 05415 LINESCODE 00000625(000271H) program( C:\0DATA\32C\32C Projects\R32C_GFORCE_GRAPHIC\R32C_GFORCE_3\main.a30 )
The error shown is, "Characters exist in expression" which is quite different than "Undefined symbol..."
Sorry for late reply, I was ut for a while !
Sorry for late reply, I was out for a while !
When the command is: jsr $pff.c
the error is: Error (asp100): Characters exist in expression
When the command is: jsr $pff
the error is: Error (asp100): Undefined symbol exist '$pff'
Errors are the same if I used '_' instead of '$'
Here is the list of C files included in the project
That would be great if I could find a sample program calling a C function from an assembly program !
Can you generate the assembly code for the "pff.c" (or the assembler listing)?