I can't seem to figure out how to put variables declared via KEIL's absolute memory access macros (#include <absacc.h>) such as: #define myVariable HVAR(unsigned int, 0x100000) into my Nohau (EMUL166PC) ICE's watch window. Can anyone tell me what I need to do to make this work? Any help would be greatly appreciated... thanks, Dave.
Doesn't the C166 compiler support _at_? in
#define myVariable HVAR(unsigned int, 0x100000)
unsigned int xdata myVariable _at_ 0x1000;
Unfortunately, C166 doesn't support the _at_. I don't know why, and Keil Support couldn't answer this question either. The best "work around" you get is
>The best "work around" you get is >#define myVariable HVAR(unsigned int, 0x100000) I think this is not the best "work around". In this case you have no possibilities "watch" or "inspect" by name "myVariable" in NOHAU ICE. I use next trick: - add "debugging" pointer to watched data, for example: unsigned int * ptrUI; and in NOHAU you can assign any value to "ptrUI" in "Inspect" window, for example: ptrUI=0x1000 Simulteniously in "Watch" window you can see watch (pointed value): *prtUI You can use pointer to more complex type, not only "unsigned int".
I use next trick: - add "debugging" pointer to watched data, for example:
unsigned int *ptrUI;
Thanks to all for the help. The solution is really quite cumbersome, but it looks like it works. After spending many 1000's of $ for what's supposed to be a good ICE, what a letdown! Hopefully KEIL will eventually help those of us out who'd like to be able to use their ICEs. Does anyone know if BSO Taksing (gasp, is it okay to say that here?) or anyone else addresses this better? Thanks again, Dave Sudolcan
After spending many 1000's of $ for what's supposed to be a good ICE, what a letdown! Whoa! This is not a Nohau or Keil problem (well maybe Keil's in some way, they could've added _at_), it is simply the C language. There is no reason for a #define to ever be placed into the symbol file, I don't know if any tools place the #define name portion into a symbol file. Since the symbol does not really exists (the pre-processor strips it out) the compiler, linker, and debugger simply cannot know about the name you chose to call 0x100000. The correct answer is a the properly typed pointer to the location 0x100000. Nohau should let you watch the pointer and what it points to. - Mark
After spending many 1000's of $ for what's supposed to be a good ICE, what a letdown!<br> <br> Whoa! This is not a Nohau or Keil problem (well maybe Keil's in some way, they could've added _at_), it is simply the C language. There is no reason for a #define to ever be placed into the symbol file, I don't know if any tools place the #define name portion into a symbol file. Since the symbol does not really exists (the pre-processor strips it out) the compiler, linker, and debugger simply cannot know about the name you chose to call 0x100000.<br> <br> The correct answer is a the properly typed pointer to the location 0x100000. Nohau should let you watch the pointer and what it points to.<br> <br> - Mark<br>
The correct answer is a the properly typed pointer to the location 0x100000. Nohau should let you watch the pointer and what it points to. It doesn't? That doesn't sound right. My Signum Systems' USP-51 does. If it's a struct pointer it shows you the struct format too. Sorry to hear that about Nohau, haven't used them in a while. BTW, see "Tips for posting" (left) to see the limited HTML tags this forum supports, no <br>'s I'm afraid. Regards, - Mark