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

Save Watch Variables to a File

Hi,

Is it possible to save the watch variables and its contents to a file using Keil Microvision ?

Thanks in Advance.

Parents
  • You can use the EValuate command to write into a log file...

    say you have

        unsigned int    i_see_dead_people
        unsigned char   str[ 10 ];
    


    And you want to record them...

    log >C:\Myval.TXT
    EValuate i_see_dead_people
    0x000A 10
    EV str[0]
    0x52 82
    EV str[1]
    0x6F 110
    log off
    

    But the "Myval.TXT" file will only contain the numeric value ("0x000A 10"), and not the command you had entered ("EVALuate i_see_dead_people").

    You could use the Display command instead (but you will have to manually specify the size):

    D i_see_dead_people, i_see_dead_people+1
    D:0x00 7A 03
    

    But that can be tedious, so creating a 'batch file' with the needed DISPLAY commands and then including it and have that file generate the data for you:

     The contents to the ReadMyVals.INI file 
    LOG >C:\MyVals.TXT
    D i_see_dead_people, i_see_dead_people+1
    D str, str[10]
    LOG OFF
    

    Then in the uVision command line enter:
    >INCLUDE ReadMyVals.ini

    (even the "D str, str[10]" command is now in the output file)

    By becoming familiar with the command set that uVision has (or any Emulator/Simulator), you can create some fairly powerful tool sets.

    During "Formal Qualification Testing" (FQT) of embedded software, there is often a need to capture the output of the data-stores in order to prove the validity of a function (e.g. "to document acquisition parameters.").

    Once these type of test benches have been approved, you can automate the testing processes.

    I've used these "INCLUDE" type batch files many times over. You can execute code up to a point ("g,Compute_What_Women_Want"), then modify the function's input data ("Flowers"), run the algorithm, and then write the output of the algorithm into a log file.

    Then transfer that output file to the pre-approved/pre-qualified software for analysis to either tell you a PASS/FAIL, or some other qualifying criteria.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Reply
  • You can use the EValuate command to write into a log file...

    say you have

        unsigned int    i_see_dead_people
        unsigned char   str[ 10 ];
    


    And you want to record them...

    log >C:\Myval.TXT
    EValuate i_see_dead_people
    0x000A 10
    EV str[0]
    0x52 82
    EV str[1]
    0x6F 110
    log off
    

    But the "Myval.TXT" file will only contain the numeric value ("0x000A 10"), and not the command you had entered ("EVALuate i_see_dead_people").

    You could use the Display command instead (but you will have to manually specify the size):

    D i_see_dead_people, i_see_dead_people+1
    D:0x00 7A 03
    

    But that can be tedious, so creating a 'batch file' with the needed DISPLAY commands and then including it and have that file generate the data for you:

     The contents to the ReadMyVals.INI file 
    LOG >C:\MyVals.TXT
    D i_see_dead_people, i_see_dead_people+1
    D str, str[10]
    LOG OFF
    

    Then in the uVision command line enter:
    >INCLUDE ReadMyVals.ini

    (even the "D str, str[10]" command is now in the output file)

    By becoming familiar with the command set that uVision has (or any Emulator/Simulator), you can create some fairly powerful tool sets.

    During "Formal Qualification Testing" (FQT) of embedded software, there is often a need to capture the output of the data-stores in order to prove the validity of a function (e.g. "to document acquisition parameters.").

    Once these type of test benches have been approved, you can automate the testing processes.

    I've used these "INCLUDE" type batch files many times over. You can execute code up to a point ("g,Compute_What_Women_Want"), then modify the function's input data ("Flowers"), run the algorithm, and then write the output of the algorithm into a log file.

    Then transfer that output file to the pre-approved/pre-qualified software for analysis to either tell you a PASS/FAIL, or some other qualifying criteria.

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

Children