This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

User defined functions in uVision3

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.

Parents
  • Way back on Dec 5, 2005; I posted to this forum under the
    aforementioned subject line:
    >
    > 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.
    >

    I issued a challenge to all users to share what they had
    figured out around this topic, hoping our combined knowledge
    could be compiled into our own, home-grown user's manual.
    From the deafening silence, I concluded there wasn't much
    knowledge to go around.

    On Friday, August 04, 2006 9:46 AM; I received a message
    from fellow forum denizen, Petter Gran-Jansen:
    >
    > Hello Gary.
    >
    > My name is Petter Gran-Jansen and working with uVision3,
    > ARM, Agsi, signals and functions.
    >
    > I have read your Forum mail "User defined functions
    > uVision3" dated 12/6/05.
    >
    > I agree. ...
    >

    This was followed, approximately 2-1/2 hours later, by a
    message from Reinhard Keil:
    >
    > Hello Petter,
    >
    > well it is sometimes good to tell others your frustration. I
    > also agree that documentation can be improved a lot and we
    > are actually hiring in the moment people for doing this.
    >

    I would like to extend a warm "Danke schön" to Herr
    Keil for taking notice, and look forward to seeing what he
    comes up with.

    For Petter and fellow suffers of this documentation dearth,
    I have not been sitting on my hands in the 9 months since my
    original rant, and have had some success solving problems
    with user-defined functions, which I share with you all.

    You are going to have to read it piecemeal as the server prohibits me
    from saying all I want to in one breath. If you are reading this
    with Internet Explorer and the preformatted sections have white
    bands running across the width, try re-sizing the window.

    This info came from:

    • Getting Started with uVision2, pp. 89-144;
    • Getting Started, Creating Applications with uVision3, pp. [actually this book contains nothing useful on functions, but they sent it to me for some reason];
    • The Keil tech support guys <tip of the engineering hat> in Texas,
    • The Help system built into uVision3, particularly those points in the table of contents heading structure I have marked with a "#":
              Getting Started User's Guide
                +--Introduction
                +--Creating Applications
                +--Testing Programs
                |  +--Tips and Tricks
            #   |  |  +--Command Input from File
            #   |  |  +--Write Debug Output to a File
                +--Sample Programs
                +--Using On-Chip Peripherals
                +--RTX51 Tiny Real-Time Operating Systems
      
              uVision (R) IDE User's Guide
                +--uVision3 Overview
                +--User Interface
                +--Creating Applications
                +--Utilities
                +--Debugging
                |  +--Debug Windows and Dialogs
            #   |  |  +--Output Window-Command
                |  +--Tips and Tricks
                |  |  +--Command Input from File
                |  |  +--Write Debug Output to a File
                +--Debug Commands
            #   |  +--INCLUDE
            #   |  +--KILL
            #   |  +--LOG
                +--Debug Functions
            #   |  +--Creating Functions
            #   |  +--Invoking Functions
            #   |  +--Predefined Functions
            #   |  +--User Functions
            #   |  +--Differences Between uVision3 and C
                +--Simulation
                +--Flash Programming
                +--Dialogs
                +--Example Programs
                +--Command Line
                +--Appendix
      
    • The on-line Knowledgebase,
    • Assorted threads in this forum, and (last, but not least)
    • The School of Hard Knocks.

      User-defined functions are a powerful debugging tool, but they are also wretchedly difficult to master. The following guidelines aim to make this process easier.

      [continued in part 2]

Reply
  • Way back on Dec 5, 2005; I posted to this forum under the
    aforementioned subject line:
    >
    > 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.
    >

    I issued a challenge to all users to share what they had
    figured out around this topic, hoping our combined knowledge
    could be compiled into our own, home-grown user's manual.
    From the deafening silence, I concluded there wasn't much
    knowledge to go around.

    On Friday, August 04, 2006 9:46 AM; I received a message
    from fellow forum denizen, Petter Gran-Jansen:
    >
    > Hello Gary.
    >
    > My name is Petter Gran-Jansen and working with uVision3,
    > ARM, Agsi, signals and functions.
    >
    > I have read your Forum mail "User defined functions
    > uVision3" dated 12/6/05.
    >
    > I agree. ...
    >

    This was followed, approximately 2-1/2 hours later, by a
    message from Reinhard Keil:
    >
    > Hello Petter,
    >
    > well it is sometimes good to tell others your frustration. I
    > also agree that documentation can be improved a lot and we
    > are actually hiring in the moment people for doing this.
    >

    I would like to extend a warm "Danke schön" to Herr
    Keil for taking notice, and look forward to seeing what he
    comes up with.

    For Petter and fellow suffers of this documentation dearth,
    I have not been sitting on my hands in the 9 months since my
    original rant, and have had some success solving problems
    with user-defined functions, which I share with you all.

    You are going to have to read it piecemeal as the server prohibits me
    from saying all I want to in one breath. If you are reading this
    with Internet Explorer and the preformatted sections have white
    bands running across the width, try re-sizing the window.

    This info came from:

    • Getting Started with uVision2, pp. 89-144;
    • Getting Started, Creating Applications with uVision3, pp. [actually this book contains nothing useful on functions, but they sent it to me for some reason];
    • The Keil tech support guys <tip of the engineering hat> in Texas,
    • The Help system built into uVision3, particularly those points in the table of contents heading structure I have marked with a "#":
              Getting Started User's Guide
                +--Introduction
                +--Creating Applications
                +--Testing Programs
                |  +--Tips and Tricks
            #   |  |  +--Command Input from File
            #   |  |  +--Write Debug Output to a File
                +--Sample Programs
                +--Using On-Chip Peripherals
                +--RTX51 Tiny Real-Time Operating Systems
      
              uVision (R) IDE User's Guide
                +--uVision3 Overview
                +--User Interface
                +--Creating Applications
                +--Utilities
                +--Debugging
                |  +--Debug Windows and Dialogs
            #   |  |  +--Output Window-Command
                |  +--Tips and Tricks
                |  |  +--Command Input from File
                |  |  +--Write Debug Output to a File
                +--Debug Commands
            #   |  +--INCLUDE
            #   |  +--KILL
            #   |  +--LOG
                +--Debug Functions
            #   |  +--Creating Functions
            #   |  +--Invoking Functions
            #   |  +--Predefined Functions
            #   |  +--User Functions
            #   |  +--Differences Between uVision3 and C
                +--Simulation
                +--Flash Programming
                +--Dialogs
                +--Example Programs
                +--Command Line
                +--Appendix
      
    • The on-line Knowledgebase,
    • Assorted threads in this forum, and (last, but not least)
    • The School of Hard Knocks.

      User-defined functions are a powerful debugging tool, but they are also wretchedly difficult to master. The following guidelines aim to make this process easier.

      [continued in part 2]

Children
No data