Has anyone ever seen an authoritative document on using debug functions in uVision3? It could be a powerful tool if I knew how to use it, but what little information I have come across is scattered across 2 hardcopy manuals, a bit more in the help file system, and smatterings in the Keil Knowledgebase. Here are clues, not documented anywhere, that I have discovered by trial and error: - If the last line of a .ini file containing function definitions does not end in a CR/LF, you get a "syntax error". - The "Breakpoint Set (BS), and "Go" (GO) commands may be executed from the command line, but not inside a function. - If you access program variables from the function, you must halt execution at a point in the program where they are all in scope before you load the function with an "include" command. Otherwise you get another "syntax error." - When you define and/or when you invoke a function, you must terminate its name with a pair of parentheses. When you "kill" the function, you must omit the parentheses. Otherwise, you get another one of those ubiquitous "syntax errors". - It could be that everything is a syntax error in this domain. The messages are that useful. :-} Perhaps if we all pool our insights, we will have a running start on a manual. ============================================================ Gary Lynch | To send mail, no$pam in domain name lynchg@no$pam.com | must be changed to stacoenergy.
I must admit that sometimes I have spent more time debugging my signal functions than my controller code.
Thanks for telling us the manual and tools weaknesses. We have tried to improve it by new examples. Did you saw already: http://www.keil.com/support/man/docs/uv3/uv3_simulation.htm Reinhard
We may have a semantic gap here. The material you reference seems to be about signal functions, which as best I understand, are only available in the simulator. They are used to generate input numbers that look like peripheral ports to the application. I am using what the manual calls the "target hardware debugger" running on my own board (flash programmed via JTAG interface). My signals come directly from the hardware itself. I have never used the simulator at all. Is a user function something I can use with the hardware debugger capability, or am I trying to force my cat to haul a piano upstairs? It isn't obvious from the manual. ============================================================ Gary Lynch | To send mail, no$pam in domain name lynchg@no$pam.com | must be changed to stacoenergy.