Hi
I am working with CW version 10 and using HS08 MCU. THe
problem seems to be CW having the problem with handling the
function pointers.
in detail: When I go through single step debugging, CW is not
finding the link, at this stage the CW is jumping out of the
function and giving error. The location where CW is not finding the
link is "GUI_Context.pAFont->pfDispChar(c);"
GUI_Context is a structure;
pAFont is GUI_COntext variable;
pfDispChar is function pointer in pAFont structure'
thanks
Sunil
Hello
Where is the calling function located (address)?
Where is the called function located (address)?
Which memory model are you using (tiny, small, ...)?
If you look at the disassembly window what is the code generated for the function pointer invocation?
CrasyCat
Hi ,
My code flow is like this Main() -> GUI_DispCharAt( char c, int, int) -> GL_DispChar(c) -> GUI_Context.pAFont->pfDispChar(c);
the address of each of the above routines are: Main(): 0x 4a69
Where is the calling function located (address)?: GL_DsipChar(c): 0x2bc6
Where is the called function located (address)? :GUI_Context.pAFont->pfDispChar(c); 0x20ef
GUI_Context
I am attaching 3 files (print screen), 2 of them gives you the address of the above functions and 3rd one shows the error after executing the GUI_Context.pAFont->pfDispChar(c);
GUI_Context si strcuture;
paFont is member of GUI_context
pfDispChar () is function and member of paFont
Which memory model are you using (tiny, small, ...)? its default one i.e., small
If you look at the disassembly window what is the code generated for the function pointer invocation?: can not see the code generated after this compiler jumping out from the location and giving an error (see the error file attached)
Thansk
Sunil
Attachments:
Hi
How is your function pointer defined?
CrasyCat