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

How to set the buttons in the toolbox of simulation target?

Hello
I run the measure project in the folder C:\Keil\ARM\RV30\Examples\Measure and I found that if the target is simulation, a tool box containing "Update windows", "My status Info", "Analog0 0..3V","Stop Analog0" items appears. I tried to find what defines the itmes in the tool box and I found that they are defined in the Measure.Opt as
OPTBT 0,(My Status Info)(MyStatus())
OPTBT 1,(Analog0 0..3V)(Analog0(3.0))
OPTBT 2,(Stop Analog0)(signal kill analog0). But I don't know how to set the items in the tool box by GUI of Keil IDE. Will someone tell me how to do? Thanks.

  • Hello
    I've read the document but there's no such code
    >DEFINE BUTTON "Decimal Output", "radix=0x0A"
    >DEFINE BUTTON "Hex Output", "radix=0x10"
    >DEFINE BUTTON "My Status Info", "MyStatus ()" /* call debug function */
    >DEFINE BUTTON "Analog0..5V", "analog0 ()" /* call signal function */
    >DEFINE BUTTON "Show R15", "printf (\"R15=%04XH\\n\")"
    in the measure.ini file which is in the options of measure project. I wonder although there's no code like that in the document, the measure project can set the items in toolbox. Can you help me? Thanks.

  • The buttons were defined as described in the User's guide (via the command window) when the example project was created and were saved automatically in the uVision project file.

    This means that whenever a button is defined it is also saved in the project file and you don't need to define it again (for example in an ini file).

  • Hello
    But there's no definitions like "define button" in the measure.ini file in C:\Keil\ARM\RV30\Examples\Measure. The measure.ini file is as following
    /******************************************************************************/
    /* MEASURE.INI: Measure Debug Initialization File */
    /******************************************************************************/
    /* This file is part of the uVision/ARM development tools. */
    /* Copyright (c) 2005-2006 Keil Software. All rights reserved. */
    /* This software may only be used under the terms of a valid, current, */
    /* end user licence from KEIL for a compatible version of KEIL software */
    /* development tools. Nothing else gives you the right to use this software. */
    /******************************************************************************/

    /*--------------------------------------------*/
    /* MyStatus shows analog and other values ... */
    /*--------------------------------------------*/
    FUNC void MyStatus (void) { printf ("=============================\n"); printf (" Analog-Input-0: %f\n", ad0); printf (" Analog-Input-1: %f\n", ad1); printf (" Analog-Input-2: %f\n", ad2); printf (" Analog-Input-3: %f\n", ad3); printf (" Port A: %08X\n", porta); printf (" Port B: %08X\n", portb); printf ("=============================\n");
    }

    /*------------------------------------------------------------------*/
    /* Analog0() simulates analog input values given to channel-0 (AD0) */
    /*------------------------------------------------------------------*/
    Signal void analog0 (float limit) { float volts;

    printf ("Analog0 (%f) entered.\n", limit); while (1) { /* forever */ volts = 0; while (volts <= limit) { ad0 = volts; /* analog input-0 */ twatch (200000); /* 200000 Cycles Time-Break */ volts += 0.1; /* increase voltage */ } volts = limit; while (volts >= 0.0) { ad0 = volts; twatch (200000); /* 200000 Cycles Time-Break */ volts -= 0.1; /* decrease voltage */ } }
    } Can you tell me where the button is defined in the measure project? Thanks.

  • Please read again my previous post:

    The buttons were defined as described in the User's guide (via the command window) when the example project was created and were saved automatically in the uVision project file.

    The define was entered directly in the command window (not part of measure.ini).

  • I got it. Thanks for your help.