Home

M3T-PD79SIM V.3.20 User`s Manual

image

Contents

1. Run Step Open Close Log0n Log0ff View Clear RecOn Recofi Click the Clear button to dear the command display You can also select the following from the PD79SIM Window menu when the Script Window is active Option gt View gt Clear 136 Script Commands To record the executed commands PD79SIM have the function recording the history of executed commands to a file This function records not the result but only the executed commands so the saved files can be used as the script files To record the executed commands dick the RecOn button in the Script Window toolbar Clicking RecOn opens the File Selection dialog box Specify the name of the file to be saved The default file attribute if omitted is scr Run step Open Close Log0n Loz0ff View Clear ReeDn eect Click RecOn to record the executed commands You can also select the following from the PD79SIM Window menu when the Script Window is active Option gt Record gt On The file list in the File Selection dialog box starts with files with the scr attribute However you can enter a full filename including the attribute directly into the filename input area to open a view file with an attribute other than scr To stop recording the executed commands To stop recording the executed commands dick the RecOff button in the Script Window toolbar Clicking
2. Coverage FUNC 3 Display results of coverage measurements Coverage CLEAR in 4 byte units Coverage DISP starting address for displaying 4 Display results of coverage measurements as percentages 5 Display results of coverage measurements of sub routines as percentages 6 Initialize memory for coverage measurements 7 Set starting address for displaying the results of coverage measurements See page 245 for details 2 3 4 5 6 7 240 Table of Script Commands 1 2 9 StackM onitor Command 2 StackMonitor ON OFF 2 Turns the stack monitor on off 1 2 10 Cycle Count Command Command format CcYde CY 1 CYcle 1 Checks the cyde count mode 2 CYcle ON OFF CYCLE OFF The number of total execution cycles is displayed CYCLE ON The number of accumulation execution cycles from the CYCLE ON specification is displayed 2 Turns the cyde count on off 1 2 11 Script Log File Commands PAUSE PAUSE MESSAGE Display specified message in Pause dialog box and wait for user to press button SLEEP SLEEP number of seconds Wait for command input for specified number of seconds LOGON LOGON filename file attribute Open log file LOGOFF LOGGOFF Close log file 1 2 12 Program Window Control Commands Command format PATH PATH search pass search pass Set source file path en source filename T specified source file 2 FUNG function EE module name ee a function
3. 45 PD79SIM User s Manual 1 6 3 Extended Menus in the Dump Window When the Dump Window is activein the PD79SIM main display area the Option menu contains the following items View Change contents of display Saal Area Specify scroll range Address Specify display starting address DataLength Specify data length Display in 1 byte units Display in 2 byte units Display in 4 byte units Specify radix Display in decimal Display in hexadecimal Display as ASCII characters Display as SJ IS code Display as J IS code Refresh display Set memory contents Set data at specified address Fill specified memory block with data Move specified memory block to specified address Usethecachedf mana 46 1 Window function of PD79SIM 7 RAM Monitor Window The RAM Monitor Window displays the contents of memory in the RAM monitor area in dump format The display is updated at constant intervals default 100ms during execution of the target program The PD79SIM have 1KB of RAM monitor memory area You can set any contiguous address area as the RAM monitor area 1 7 1 Structure of RAM Monitor Window Toolbar ES Dump W Dec j Hex ASCII SI ss Refresh Cache es Lag OS gl 00 0 0 B B B 3 1 MBER LLL LHRH LL AL Ur 1 LEE ASCII code corresponding todata Address display area Data display area Double click the ad
4. Choose this button Output panel display area Drag the cross cursor to determine the wo of the LED 4 When a frame in which to display the LED appears double click somewhere in the frame CAUTION Before double clicking on the LED you ve created check to see that the arrow lt on the tool bar is selected If not selected choose the arrow lt before double clicking on the LED you ve created 5 A dialog box for setting an LED like the one shown below will appear Here you can specify one of the following two methods for monitoring outputs Turn on LED according to logic 1 or 0 in memory bit Turn on LED when some value is output to memory 190 Setting GUI Output Window 1 For turning on LED according to logic 1 or 0 in memory bit GUI LED Dialog Bit Or Data Select Bit _1_ Bit C Data Bit Num Specify Positive Positive Negative or Negative Vata OK Cancel 2 For turning on LED when some value is output to memory GUI LED Dialog Bit Or Data Bit Bit Num CG Data Colorl Color a Logic Select Data Positive Data Display Colorl Display Color2 191 Input the desired memory address Memory bit number Select color for the LED that is displayed when memory bit 1 or 0 if you selected Negative Select color for the LED that is displayed when memor
5. Displays data in binary Displays data in SJ IS de Refresh display d 4 Bin Dec Hex ASCII SIS TE Refresh Cache J IS button Displays data in J IS code Dec button Displays data in dedmal ASCII button Cache button Displays data in ASCII code Use the cache of memory 43 PD79SIM User s Manual 1 5 3 Extended Menus in the Memory Window When the Memory Window is active in the PD79SIM main display area the Option menu contains the following items View Change contents of display Scrdll Area Specify scroll range Address Specify display starting address S Change display starting address to value of S register Change display starting address to value of DPRO register Change display starting address to value of DPR1 register Change display starting address to value of DPR2 register Change display starting address to value of DPR3 register Specify data length Display in 1 byte units Display in 2 byte units Display in 4 byte units Specify radix Display in binary Display in decimal Display in hexadecimal Display as ASCII characters Display as SJ IS code Display as J IS ccode Refresh display Set memory contents Set data at specified address Fill specified memory block with data Move specified memory block to specified address Usethecachedf mana Window function of PD79SIM 1 6 Dump Window The Dump Window
6. Contents 3 3 Setting Executed Address synchronized Interrupte 164 4 Other Functions of 1 0 Window 166 4 1 Changing Setup Data of Virtual Port Inputs and Virtual Interrupts 166 4 2 Deleting Virtual Port Inputs Virtual Port Outputs Virtual Interrupts or 1 0 Script a 171 4 3 Changing Display Mode of Virtual Port Input Virtual Port Output or Virtual VSP UPC Ae ege gh eege ENEE EE 176 4 4 Changing Scale of Display Green 177 4 5 Changing Colors of Display Green 178 4 6 Searching for Display Data 179 4 7 Listing Registered I O Script Files ccc ee eecceeeeeteceeeeeeecaeeeeeeeaaeeeeneaaeees 180 4 8 Regarding Evaluation Timings of Virtual Port Inputs Virtual Interrupts and I O Sqipt WI 180 5 Setting GUI Input Window 181 Le OVER EEN 181 e Eifel uo ee ET 181 5 3 Saving Buttons You ve Create 183 5 4 Changing Button Position or Settings after Creating Button 184 S Re e Vulle ig WEEN 185 5 6 Deleting buttons ue re erak eeaeee raea as ete aia 186 5 7 Displaying Grid te 186 6 Setting GUI Output Window 187 OLOV CW isis ee ee i a en ene 187 6 2 Creating Label ET 188 E Reeg alo VC E 190 6 4 Saving Parts You ve Create 192 6 5 Changing Parts Position or Settings after Creating Parts 193 6 6 COPYING EE 193 6 7 DelCELAG Hate Ed gets eee ete asad da eda wt ta goa ekg gets EEN sue ete grea ght ahha eae ahha eee iih 194 6 8 Displaying Grid le 194 71 0 Script Function 195 K Gein nui endl in i ead ade ead a nat di
7. 1 Select the file name 2 Select the function name Object Source ri nert0 a 9 sect 9 inc SAMP79 r79 timer alint print ri fputc r79 Cancel 3 Sets M and X flags 4 Click the OK button To open the Source dialog box select the following from the PD 79SIM Window menu Option gt View gt Source You can also double click the line No display area of the Program Source Window to open the Source dialog box 98 Loading and Displaying the Target Program Changing the display position at the address level When the Program Source Window is in disassemble display mode click the Address button from the Disp Area dialog box Click the Address button to open the Disp Address dialog box 1 Specify the address Address 008100 Flags 2 Specify m and x flags 3 Click the OK button Note The default values of the M and X flags are the current M and X flag values When the Program Source Window is in source display mode the Address dialog box see below is open Click the Address button in the Address dialog box to enter the new address 1 Click the Address button Address C Line 2 Specify the address Cancel 3 Click the OK button To open the Disp Address dialog box select the following from the PD 79SIM Window menu Option gt View gt Address You can also double click the address displ
8. In the case of variable length memory pools nothing is shown in the Total BIk_cnt area is displayed No bit information is shown in the Free BIk_cmt map area either In this case of fixed length memory pools each bit of memory block information in the Free BIk_cnt map area is formatted as follows Page O O memory block in use busy dk Memory block not in use ready No memory block Each display area can have its display width changed by dragging the mouse to the desired position In MPL mode the horizontal scroll bar is not displayed 228 Real time OS Debugging Function To display task context Select the following from the menu Option gt MR gt Context or double click the data area in TSK mode to open the Context dialog box Use the Context dialog box to check and set context information for specified tasks The following shows the configuration of the Context dialog box Task ID P Set Context Task ID 9 task9 Status WAI FLG SUS Priority 1 POP 0091B6 PG 00 PC 91B6 DT 02 E 11000000 A 0000 B 1100 Re ih ae 140s DPO 142B DP1 0091 DP2 B600 DP3 0400 Enter the task ID No in the Task ID area then click the lt View gt button or press the Enter key to display the context for the specified task in the Context area No context is displayed when the task specified in the Task ID area isin the RUN or DMT state only the task ID and task status
9. 1 Select the custom window which changes contents of registration 2 Open the custom window registration dialog Click the Delete button to remove registration Change the turn of the display of the menu The open of custom window The menu to open the custom window when it is registered is added OptionalWindow 10 Window GUI Input Window GUI Output Window MR Window Coverage Window Custom Window Opt ion v 1 Program Window regs_win 1 Choose the custom window to open 2 Dump Window The custom window can be opened when the custom window is chosen with the custom window launcher dialog and it clicks on the button 210 Customize Function To use custom command and custom window programs Register the custom command and custom window programs created with CB79SIM from the Script Window using a MACRO command Specify as the parameter the custom command and custom window program file names with the extension p omitted when registering the programs to PD79SIM This makes the programs usable Example gt MACRO custom lt RET gt For the custom command and custom window programs registered to PD79SIM by a MACRO command you can execute the program and open the window using the same procedure as used to execute a script command To execute the program registered by a MACRO command use its file name as the command name as shown below Example gt custom lt RET gt The custom command and custom window prog
10. Cancel 151 PD79SIM User s Manual Here choose the item Set Virtual Port Input and press the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box A dialog box for setting up virtual port input timings will appear Setup Dialog Expressions can be input here pead clean 10000 First choose Cycle in the Data Input Timing column Next enter an address for virtual port input in the Input Address column the address to which you want data to be input using a hexadecimal number Then enter the cycles at which you want the virtual port input to be started and ended for Start cycle and End cyde respectively using decimal numbers Then press the Next button Or press the Prev button here if you want to return to the previous dialog box 152 Setting Virtual Port Inputs in 1 0 Window A matrix dialog box for setting the virtual port input data will appear Setup Dialog Finds the previous data you ve set UP or the next data DOWN The setup example in this element specifies that data 0x22 be set at the 10 016th cycle Double click on an element you want and set the desired input value in it lt Prey Cancel In this dialog box set the data you want to be actually input to memory F ollow the procedure below to set data 1 Move the mouse cursor to the cycles location called an element where you want data to be set
11. Displaying the mailbox status Use format 6 Enter the following to display the status of the mailbox MR MBX The following items are displayed ID MailboxID No Mag ot The number of messages in each mailbox IMAXmsg The maximum number of messages that can be stored in each mailbox Wait The messages stored in the mailboxes or the ID Nos of the waiting for Queue Message message tasks If there are messages in the mailboxes Msg is displayed with the number of stored messages If there are no messages in the mailboxes and there are tasks waiting for messages Task is displayed with the ID Nos of the tasks waiting for messages 249 PD79SIM User s Manual Displaying the cycle handler status Use format 7 Enter the following to display the status of the cycle handler MR CYH The following items are displayed Cyclic handler ID No interval Interrupt interval count Status Cycle handler status as TCY ON enabled or TCY OFF disabled Displaying the alarm handler status Use format 8 Enter the following to display the status of the alarm handler MR ALH The following items are displayed Now System Clock Count System clock count Remain Handler Number of remaining alarm handlers Alarm handler ID No Starting address of alarm handler Symbol Name of alarm handler Starting time of alarm handler If no alarm handler is used the following message is displayed This System dose not use Alarm Handl
12. Option gt Mode gt Timeout Q The following shows the configuration of the MR Window in timeout queue status mode E MR Window TSK RQ TIM FLG SEM MBX CYH ALH MPL value ID name 70FFH 21 _task 1 Ldly 7FOOH 24 _task 24 dly 7FOFH 22 _task 22 dly 7FFOH 23 _task23 dly 7FFOH 25 task25 sle 7FFOH 268 _task26 sle s 7FFFH 6 _task6 Cdly 7FFFH task CdlyJls 7FFFH 20 _task 0 Edly The following items are displayed in TIM mode The items are displayed in ascending order of timeout values for the tasks currently in the wait status Shows the timeout value of each task ID name Shows the ID No and task name of the tasks in the timeout queue And the character strings that show wait state are as follows Character string Wait status slp Wait by tslp tsk dy Ss Waitbydlytsk S y O mbox Wait due to trcv_msg 2 In TIM mode the status bar is not displayed If the tasks in the timeout queue are also in the suspended wait state WAIT SU SPEND an s is displayed after the character string in the ID name field to indicate that it is also in the WAIT SUSPEND state Normal display 26 _task26 dly Display when in WAIT SUSPEND 26 _task26 dly s 2 These states are supported by MR79 V 2 00 or later These states are not displayed for the target programs using earlier versions of MR79 than that 221 PD79SIM User s Manual When you move the mou
13. To execute the contents of the script file as a batch click Run on the toolbar of the Script Window Batch execution starts and the script file is then closed after all the commands have been executed Run Step Open Close Log0n Loz0ff View Clear RecOn Rec if Click the Run button to execute all the commands in the script file in batch mode You can also select the following from the PD79SIM Window menu when the Script Window is active Option gt Script gt Run To stop execution of a script file Click the STOP button displayed in the Running script dialog box Execution of the script file stops before the next line 138 Script Commands To independently execute each command in a script file Click the Step button on the Script Window toolbar for step execution of the script A command is executed each time you click the Step button Click the Step button for step execution of the script file You can also select the following from the PD79SIM Window menu when the Script Window is active Option gt Script gt Step To dose a script file Click the Close button on the Script Window toolbar Click the Close button to close the script file You can also close a script file by selecting the following when the Script Window is active from the PD79SIM Window menu Option gt Script gt Close e fthescript
14. As shown above data can be input to memory address 2 in any desired cycle as specified by the user 63 PD79SIM User s Manual 2 Read access synchronized input Data can be input when the program accesses a specified memory location for read Thedata size that can be input is one byte The diagram below shows an example of a virtual port input that is synchronized to memory accesses for read Shown in the sample program below is a function that reads data from portO address 2 pragma ADDRESS portO 2H char porto read_port char key key port0O Input from port 0 This function aims to assign the value of port 0 to variable key In such a case a value can be assigned to variable key by entering it to port 0 when the program accesses port 0 address 2 for read To support processing of functions like this PD79SIM provides a function that allows you to define the data to be input according to a number of times the specified memory address is read a virtual input port synchronized to memory accesses for read By using this function you can perform an operation where data 0x10 is input to memory address 3E0 when address 2 is read first and data 0x20 is input to said memory address when the address is read next Number of times the address 2 is read Data input to address 2 64 3 Window function of PD79SIM Interrupt synchronized input Data can be input to a specified memory location when a
15. Enclose characters in single quote marks Enclose character strings in double quote marks The character string must consist of one or two characters 16 bits max If more than two characters are specified the last two characters of the string are processed For example ABCD would be processed as CD or value 434416 Operators The table below lists the operators that you can use in expressions The priority of operators is indicated by the level level 1 being the highest and level 8 the lowest If two or more operators have the same level of priority they are evaluated in order from the left of the expression Priority level Monadic positive monadic negative Level 2 monadic logical NOT Dyadic multiply dyadic divide dyadic exclusive OR Dyadic comparison Level 8 258 C Expressions 3C Expressions 3 1 Writing C Expressions You can use C expressions consisting of the tokens shown below for registering C watchpoints and for specifying the values to be assigned to C watchpoints Token Example OOOO O PSininvesion O SSS S S SSS S Member reference using comma Member reference using arrow Parentheses Arrays Array 2 DArray 2 KR hp exes Casting to typedef types Variable names and function names Character string literals abcdef I am a boy 3 1 1 Immediate Values You can use hexadecimals decimals and octals as immediate values Values starting with Ox are proce
16. _task18 Number of Priority 10 Pri Ra 4 18 _task18 22 _task22 23 _task23 5 17 task17 6 19 _task19 20 _task20 21 _task21 The following items are displayed in RQ mode Of the priorities defined in configuration the items are displayed in order of priority only for those tasks in the ready queue Pri Shows priority o o IRdyQ Shows the ID Nos and task names of tasks in the ready queue In RQ mode the status bar shows the following information Current Run Task ID and task name of currently running task Number of Priority Maximum value of priority Task names displayed in the RdyQ area are indicated in up to 8 characters each If a task name consists of more than 8 characters the extra characters are omitted When you move the mouse pointer to the data position displayed in the RdyQ area a window like the one shown below appears showing information about the task same contents as shown in TSK mode d Window to display detail information on task Each display area can have its display width changed by dragging the mouse to the desired position In RQ mode the horizontal scroll bar is displayed simultaneously when data is displayed Use this scroll bar to scroll the data contents displayed in the RdyQ area 220 Real time OS Debugging Function To display the status of the timeout queue Click the TIM button on the toolbar of the MR Window or select the following from the menu
17. r na eae calling function ta GT Display called function WHERE WHERE Display function call status 1 2 13 Map Command Command format 2 MAP start address end address 2 Set target memory space 1 2 14 C Language Debugging Commands Command format PRINT PRINT variable expression Check value of specified C variable expression SET variable expression value Set specified data in specified C variable expression 241 PD79SIM User s Manual 1 2 15 Real time OS Commands 1 MR TSK 1 Display status of specified task MR RQ R Display status of ready queue MR TIM TOUT T 3 Display status of time out queue MR FLG FLAG F 4 Display status of event flag MR SEM S 5 Display status of semaphore MR MBX M 6 Display status of mailbox MR CYH CYC C 7 Display status of cycle handler MR ALH ALM A 8 Display status of alarm handler MR RTSK RT 9 Display task during execution MR STIM ST 10 Display system clock count MR CTX CT Task No 11 Display context of task with specified task No 12 MR MPL 12 Display Displays the memory pool 13 MR STK SYS TSK BASE CLEAR 13 Measure the system stack task sizes used See page 247 for details 2 2 1 2 16 Custom Command Program Custom Window Program Command format 1 MACRO 1 Refrence a list of added custom command 2 MACRO custom command s programn
18. 131 PD79SIM User s Manual Toregister the C watch point Method 1 Registering a C Watch Point from the C Watch Window Click the Add button on the toolbar in the C Watch Window to open the Add dialog box then enter the C language expression C variables expressions etc To register a C expression as a pointer click the Add button on the toolbar in the Watch Window This registers the C expression as a C watch point 1 Click the Add button to register the C watch point D _ Add Add Del DelAll Set Cancel Radix ij L Click the Add button to register the C watch point as a pointer Add Bpr i E Specify the C expression 3 Click the OK button Method 2 Registering a C Watch Point from the Local File Local or Global Window You can register variables displayed in the Local Window File Local Window and Global Window as C watch points Click the variable to be registered then click the Cwatch button on the toolbar To register the variable as a pointer click the Cwatch button 2 Click the Cwatch button e Lecal Window Func main Filename rmon c Cunsigned char i xB unsigned char j Di 1 Click the C variable to be registered N ote Thereis a possibility that compiler arranges a different variable in the same address for optimization 132 Checking C Variables 6 2 To change the value of a C variable You can change the value
19. Button to clear breakpoint button all breakpoints Button for closing dialog box You can set up to 64 hardware break points in PD79SIM If you have set multiple hardware breakpoints program execution stops when any one hardware break address is encountered OR conditions You can continue to set hardware breakpoints until you dick the lt Close gt button to close the H W BreakPoint setting dialog box You can dear hardware breakpoints selected by clicking in the hardware breakpoint display area 1 20 2 Entries in List of Hardware Break Points START 008000 O01 BYTE 40 READ Break address Pass count Comparison data Comparison condition Label for break address Data size Access condition 90 Basic Operation 92 Loading and Displaying the Target Program 1 Loading and Displaying the Target Program 1 1 Downloading To download the target program select the following from the PD79SIM Window File gt Download gt Load module The File Selection dialog box opens Select the target program from the File Selection dialog box The file to be downloaded is in the EEE 695 absolute file format called an X79 file X79 files have the filename extension x79 When downloading a target program the memory is mapped automatically You can also press Shift F 1 to open the File Selection dialog box for downloading files Download 1 Find the directory Dis 79 a M37901 x79 a
20. Off When log files are nested output to the current log file stops but output to the next higher level log file resumes 135 PD79SIM User s Manual To save the results of executing script commands after execution PD79SIM has a View Buffer that stores the results of executing the last 1000 lines of command results To save the contents of the view buffer click View on the toolbar of the Script Window Clicking View opens the F ile Selection dialog box Specify the name of the file to be saved The default file attribute if omitted is viw Run Step Open Close Loz0n Loz0ff View Clear RecOn Rec0ff Click View to save the contents of the view buffer You can also select the following from the PD79SIM Window menu when the Script Window is active Option gt View Save When you specify an existing filename the contents of the view buffer are appended to the existing file The file list in the F ile Selection dialog box starts with files with the viw attribute However you can enter a full filename including the attribute directly into the filename input area to open a view file with an attribute other than viw To clear the results of execution from the screen Click the Clear button on the menu in the Script Window to dear the contents of the command display Note that the contents of the View buffer are cleared at the same time as the command display
21. PD79SIM User s Manual 7 4 4 Macro Variables Macro variables are used by adding at the beginning of each variable name Variable names following the percent character may consist of alphanumeric characters and underscore _ However numbers cannot be used at the beginning of macro variable names Register names cannot be used in variable names Variable names are discriminated between uppercase and lowercase letters Upto 32 macro variables can be defined Once defined the macro variables remain effective until PD 79SIM is terminated 7 4 5 Memory Variables Memory variables are used when using memory values in expressions The following shows a format of memory variables address data size Expressions can be written in address Memory variables also can be used Specify data size as shown in the table below For word 2 byte size For long word 4 byte size f specification of data size is omitted the data size is assumed to be byte long Example 1 To reference memory contents at address 800016 in bytes 0x8000 B or 0x8000 Example 2 To reference memory contents at address 800016 in words 0x8000 w Example 3 To reference memory contents at address 800016 in long words 0x8000 L 7 4 6 Character Constants Specified characters or character strings are handled as constants after being converted into ASCII code Characters must be enclosed with single quotations Character string
22. S Not Spacity e e e r e HW Break Point Addr Cnt Size Data Tyre Ore 5 Click the Add button OFO003 DDI nmn mn FETCH Label 6 Click the Close button 126 Hardware Breaks To break when the specified data is read from the specified address The following example shows how to break when the specified data 12 16 has been read twice from address 40E 16 Make the following settings in the HW Break Point setting dialog box HAW Breck c Diable amp Enable 1 Select Enable 2 Enter address 40E Adres Mie Pass Count 4 Enter a pass count of 2 3 Select Read ck Access Type Length Data Compare 5 Deselect Not Specify gt T Nie Spaciiy 6 Enter data 12 7 Select i HW Braak Point Label Addr Oot Size Data Tyre Dre l 000400 002 BYTE 29 READ OFD003 O01 rr zg FETCH 8 Click the Add button 9 Click the Close button To break when data is written to the specified address The following example shows how to break when the specified data 123416 has been written five times to address 41016 Make the following settings in the HW Break Point setting dialog box oe E HAW Break Disable amp Enable 1 Select Enable 2 Enter address 410 Address 410 Pass Count 5 4 Enter a pass count of 5 3 Select Write Access Type Length 5 Select Word 6 Deselect Not a
23. The register nemeiswong JI 10420 Cant find Source File filename SOS oazi Unable read Load Module File flename U U y ee ThePATH nameisincorec 10801 Cant find the register information file ee 10802 There s incorrect line in register information i file 2 6 Error Messages 11000 The savefile name filename is wrong Specified file cannot exist 11001 Can t find symbol symbol ofM R79 Real time OS MR79 symbol not found Initialization routine ofM R79 is not executed MR commands cannot be executed when the real time OS MR79 initialization routine has not been executed 11003 Can t find the task of the specified task number 11004 11005 11006 11007 11008 11009 11010 11011 11012 ang invokesystemeall 11013 System call not invoked 11014 System call not completed FO 15000 Task with specified task No not found The specified task does not exist 15001 Context of specified task No not found The specified task context does not exist 15002 Corrupted MR data Part of the MR data is corrupted As a result correct data cannot be displayed in the MR Window No Error Message Notes and Action No Error Message Notes and Action 21000 Can t open BUTTON file GUI input file cannot be opened 21001 BUTTON fileis illegal GUI input file is corrupted 277 PD79SIM User s Manual 2000 Cant owen temporary re SSS 22001 cant deetetemporaryfile JI 22002 Cart open 170 data
24. To reference data values move the mouse cursor into this area and the value and the virtual interrupt occurrence count of the data at which the cursor is positioned will be displayed in the virtual interrupt occurrence count display area Virtual interrupt occurrence count display area It displays virtual interrupt occurrence counts Virtual interrupt occurrence count display area It displays virtual interrupt occurrence counts 73 PD79SIM User s Manual 1 14 6 Structure of Virtual Port Output Screen Virtual port output results can be displayed in one of the three modes shown below The display modes can be changed from the Mode menu 1 Chart mode displayed in units of bits Virtual port output results are displayed in chart mode in units of bits Output cycle Cycle 0000004778 Data 0x30 Cycle count display area Address Bit number Output data display area display display area area Address display area It displays the address to be monitored for virtual port output Bit number display area It displays bit numbers of memory being monitored for virtual port output tput data displ r It displays the data as virtual port output results in chart mode in units of bits This means that memory bits are in the state of logic 1 po This means that memory bits are in the state of logic 0 The short white lines appearing at the bottom of the output data display area indicate po
25. _task26 two 222 Real time OS Debugging Function If the tasks in the flag event queue are also in the suspended wait state WAIT SUSPEND an s is displayed after the character string in the D name field to indicate that it is also in the WAIT SUSPEND state Normal display 26 _task26 Display when in WAIT SUSPEND 26 _task26 s Display when in WAIT SUSPEND with time out 26 _task26 tmol s Task names displayed in the flagQ area are indicated in up to 8 characters each If a task name consists of more than 8 characters the extra characters are omitted When you move the mouse pointer to the data position displayed in the flagQ area a window like the one shown below appears showing information about the task Same contents as shown in TSK mode Window to display detail information on task Each display area can have its display width changed by dragging the mouse to the desired position In FLG mode the horizontal scroll bar is displayed simultaneously when data is displayed Use this scroll bar to scroll the data contents displayed in the flagQ area To display the semaphore status Click the SEM button on the toolbar of the MR Window or select the following from the menu Option gt Mode gt Semaphore The following shows the configuration of the MR Window in semaphore status mode P MR Window TSK RQ TIM FLGJSEM MBX CYH ALH MPL ID Det mt Count sent 1 0000H OOOOH 10
26. button You can also click the watch point to be deleted then press the Delete key To change the memory display format You can change the radix in which data is displayed to select the watch point to be changed in the ASM Watch Window then clicking Hex Dec or Bin in the toolbar of the ASM Watch Window Click to display in Hexadecimal Click to display in Binary Set Del Dei n Hex Dec Bin Click to display in Decimal You can also double click the radix display area in the ASM Watch Window 116 Checking and Setting Register Data and Memory Contents 3 5 To switch scope To set a Scope open the Scope Setting dialog box by selecting Scope under Debug from the menu in the PD79SIM Window Selecting the object listed in this dialog box make change the scope to the object z i Cancel 3 6 Setting Data at a Specified Address You can use the Memory Window or Dump Window to set data at a specified address To use the Memory Window select the following from the PD79SIM Window menu Basic Window gt Memory Window To use the Dump Window select the following from the PD79SIM Window menu Basic Window gt Dump Window See Section 1 5 Memory Window in the Window Functions for details of the Memory Window and Section 1 6 Dump Window in the Window Functions for details of the Dump Window To change data at a specified address With the Memory Window or Dump Window active se
27. display area and address display area can be displayed or hidden by selecting or canceling Option gt Layout gt Line Area and Option gt Layout gt Address Area Note that by default the address display area is hidden Doubleclick the line No display area to change the display source file Doubleclick the address display area to change the display starting address or the display starting line The value of the C variable is displayed when the mouse cursor stand still about 0 5 seconds on the strings of the variable in the Program display Theresult of the Coverage measurement is displayed by selecting On in the Menu Option gt Coverage 33 PD79SIM User s Manual 1 2 1 2 Structure of Program Window in MIX Display Mode In MIX display mode the source program is displayed with the results of its disassembly The source program is displayed in a different color from the results of disassembly File name display Toolbar Current program counter Werder L db J View SRC MIX DIS Lire Address ERK Objcece Label Saurce Wrenonic Ka 77 TEE void rear maint port Uxu DDDCMIZH oldir Ux Source line Object code display area display area Software breakpoint display setting area Address display area Program display area Theline No display area address display area and object code display area can be displayed or hidden by selecting or canceling Opti
28. ees 12 20 61 138 Script WINdOW seeen 61 134 Search path 101 ge EE EE 144 Set STATEMENT AA 198 Shortcut Memus 36 Software break pont 89 Software break eeeseceeeseeeeeesseeeeeeseeeeeeaes 89 Source Window sss 20 39 93 97 144 Stack Utilization Monitor assesseer 11 StackMonitor oommmmend 11 Step DUTTON ris ai isindi anaa a p aas 107 Stop button 105 lee WEE 5 256 T Table of Script Commande 237 temporary file cceeeeeceeeceeeeesteeeeeeteeeeeeaes 16 The Virtual Port Input function 151 Time MANAGEMENT sereen 6 U Uploading EE 96 V Version Information dialog bo ees 22 View butter 14 61 136 VIEW CET 14 61 Virtual Interrupt function ee 161 Virtual Interrupt 9 66 Virtual Port Input 9 63 Virtual Port Output File eee 16 Virtual Port Output function sses 159 Virtual Port Output 9 60 159 W Wait Statement 198 Waitc statement eerren 198 watch FUNCION sssseserserresrrrirerrnrenenses 114 VIe lee TEE 50 114 While EE ote ta tes 200 254 Writing Script Files eeceeeeeseeeeeeeees 253 M3T PD79SIM V 3 20 Users Manual Rev 1 00 May 1 2003 REJ10J0045 0100Z COPYRIGHT 2003 RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED M3T PD79SIM V 3 20 User s Manual 2tENESAS Renesas Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan REJ10J0045 0100Z
29. however that Come E xecution cannot be carried out if the cursor is positioned on a line in which no software breakpoint can be set comment lines and data definition lines etc Line BK Source 00036 pokOOK KC CAOOOOCCCCOCOO ACO K 000387 Wvoid near maint 00038 00089 00040 p0_dir Delt 00041 cnt_start 0x01 00042 p_down 0x01 00043 tal_mode 0x10 00044 timer_a0 Oxtfff 00045 Lal Leon 0x07 Cursor position set by clicking the mouse To start Come execution click the Come button on the PD 79SIM Window toolbar You can also press F 2 At Asia m ziel vpn Click the Come button You can also start Come execution by selecting the following from the PD 79SIM Window menu Debug gt Come 108 Starting and Stopping Target Program Execution To stop come execution Click the Stop button on the toolbar You can also stop Come execution by selecting the following from the PD 79SIM Window menu Debug gt Stop 2 5 Resetting the Program To reset the target program click the Reset button on the PD 79SIM Window toolbar You can also press F 8 A Asa zl el sie Click the Reset button You can also reset the target program by selecting the following from the PD 79SIM Window menu Debug gt Reset 109 PD79SIM User s Manual 3 Checking and Setting Register Data and Memory Contents 3 1 Checking
30. set AND wait wait status the event flag is cleared to 0 set OR wait wait status the event flag is cleared to 0 Displaying the status of the ready queue Use format 2 Enter the following to display the status of the ready queue MR RQ The following items are displayed RdyQ The D Nos of tasks in the ready queue 1 These states are supported by MR79 V 2 00 or later These states are not displayed for the target programs using earlier versions of MR79 than that 248 Table of Script Commands Displaying the status of the timeout queue Use format 3 Enter the following to display the status of the timeout queue MR TIM The following items are displayed The ID Nos of tasks in the timeout queue The timeout value of each task If the system clock and system time are not used the following message is also displayed System Clock and System Time is not used Displaying the status of the event flag Use format 4 Enter the following to display the status of the event flag MR FLG The following items are displayed D EventflagiIDNo o O fig ptn flg ptn Bit pattern of event flag The ID Nos of tasks in the event flag queue Displaying the semaphore status Use format 5 Enter the following to display the status of the semaphore MR SEM The following items are displayed D L eeptoel No o O Count Count Value of semaphore counter The ID Nos of tasks in the semaphore queue
31. 1 immediately after a virtual interrupt of a specified vector address is generated Otherwise the expression is false 0 For example the if statement below if Asint Oxffee becomes true 1 if a virtual interrupt of vector address Oxffee had occurred immediately before the if statement was evaluated isread expression Format sread address Function The value of the expression becomes true 1 immediately after a specified memory address is accessed for read to read data from memory Otherwise the expression is false 0 For example the if statement below if A sread 0x800 becomes true 1 if memory at address 0x800 had been accessed for read immediately before the if statement was evaluated 203 PD79SIM User s Manual iswrite expression Format swrite address Function The value of the expression becomes true 1 immediately after a specified memory address is accessed for write to write data to memory Otherwise the expression is false 0 For example the if statement below if Aswirte 0x800 becomes true 1 if memory at address 0x800 had been accessed for write immediately before the if statement was evaluated 7 5 Method for Writing Left side Expressions Left side expressions can be written in memory addresses and macro variables of the set statement in I O script statements The following shows an example of an I O script statement using left side expressions set 0x2 Oxla set val
32. 1 20 HW Break Point Setting Dialog BOX cece eeeeeeeeeeeneeeeeteeaeeeetetaaeeeeeeaaeees 90 BASIC OPERATION 91 1 Loading and Displaying the Target Program 93 1 1 Downloading sis ie a r A le 93 1 2 To Reload the recent downloaded nie 94 1 3 To download the target program automatically when update 95 1 4 Changing Program Display Position Immediately After Downloading 95 LSU ele lte DEE 96 Contents 1 6 Saving Results of Disassembly 00 0 0 cee cete eee eetneeeeeecaeeeeeeeaeeeeeeeaaeeeeseaeeeeneeaaeees 96 1 7 Continuing to Display a Selected Program Position ecceeeeseeeeetteeeeeeeneeees 97 1 8 Changing the Program Display Position cc ccceccceeeeeeneeeeeeeceeeeetetaeeeeeeeaaeees 97 1 9 Checking Source Programs in Other Directories cceceeeeeeesseeeeeeeteeeeeeaeees 101 1 10 Mixing Source and Disassemble Display 102 1 11 Displaying the Results of Disassembling ecceeeeeeeeteeeeeeceeeeteeeeeeeneaeees 103 1 12 Changing Display ee e E 104 2 Starting and Stopping Target Program Execution 105 2 1 Starting and Stopping WEE 105 2 2 Step E XOCUELON eels eee cs thes sbee chi eed aaa aa A te 107 2 3 Returning from Current to Calling Routine 108 2 4 Program Execution to Specified location 108 2 5 Resetting the Program AEN a 109 3 Checking and Setting Register Data and Memory Contents 110 3 1 Checking the Contents Of Registers cece teen eeeeeneee settee ee tteaeeeeeteaeeeene 110 3
33. 16 bit microcomputer and evaluates the target program PD79SIM comprises the following software 1 pd79sim the simulator debugger front end 2 sim79 the simulator engine PD79SIM User s Manual 2 PD79SIM Features 2 1 Multi Windowing Function PD79SIM supports multiple overlapping windows enabling you to simultaneously view a wide range of data Each window contains menus and buttons allowing commands to be executed by clicking with the mouse 2 2 1 0 Simulation Function PD79SIM provides the following I O simulation functions e Virtual port input function Changes of the data that is input from external devices to memory can be defined in the 1 O Window or a file Virtual port output function The data that is output to memory by a program can be recorded Changes of the recorded data can be graphically displayed 2 3 Interrupt Simulation Function Software interrupts can be defined You can define the interrupts you want to be generated in the 1 O Window or a file 2 4 Simplified System Simulation F unction e GUI Input function Key matrix can be defined by GUI GUI output function LEDs etc can be defined by GUI 2 5 RAM Monitor Function PD79SIM supports a RAM monitoring function making it possible to check the contents of memory while executing the target program The memory area monitored by this function is called the RAM monitor area The PD79SIM havea 1KB RAM monitor area which can be mapped to any a
34. Changes display color l ee Setup Modi Del Load Mode Scale Color I O Script File D Setup button Load button Scale button 1 0 script button Sets virtual port input Loads saved setup data Changes scale Lists registered I O virtual port output or I O script file script files or virtual interrupt 1 14 9 Extended Menu of I O Window If the O Window is active among the windows brought up in the main display area of PD79SIM the Option menu has the following menu items assigned to it Some Sas virtual portinput virtual pat output or virtual interrupt Modify Chmngsstvirtual part input virtual interrupt Loa Ddde Ddetes st virtual pat input virtual port output or virtual interrupt or user created O script file Changss display sale EEN Loads saved virtual port input virtual part output ar virtual interrupt or user created O script file 19 PD79SIM User s Manual 1 15 GUI Input Window This window allows you to create a simple key input panel buttons of the user target system in a window and execute virtual port input or virtual interrupt by pressing one of the buttons you ve created For details on how to create and set up a key input panel refer to High end Debugging described later in this manual The screen configuration tool bar and menus of the GUI Input Window are explained here One of the following three operations can be executed by pressing a button you ve created in
35. Follow the procedure below to set virtual interrupts 1 Move the mouse cursor to the cycles location called an element where you want a virtual interrupt to be generated then click the left mouse button Or you can scroll the screen to go to the desired location 2 The element is marked by an asterisk when you ve clicked Click at the same place again if you want the virtual interrupt you ve set to be canceled In this case the asterisk goes out 3 Repeat steps 1 and 2 as many times as the number of virtual interrupts to be generated When you finished setting all virtual interrupts press the Next button A dialog box for saving the virtual interrupts you ve set to a file virtual interrupt file will appear Save Data x Save in IO Samples x c eng ipn File name let scr Save as type Script Files sc EES Cancel Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into PD79SIM back again by using the I O Window menus Option gt Load or the Load button When you ve input a file name press the Save button Thus you ve finished setting executed address synchronized virtual interrupts 165 PD79SIM User s Manual 4 Other Functions of O Window 4 1 Changing Setup Data of Virtual Port Inputs and Virtual Interrupts The data for virtual port inputs or virtual interrupts you ve set using the Setup menu can
36. In MBX mode the status bar is not displayed The contents displayed in the WaitQueue Message area are as follows If amessage is stored when Msg cnt above is not 0 a character string Msg is displayed followed by the message that is stored in the mailbox f no message is stored when Mag ot aboveis 0 and any task waiting for a message exists a character string Task is displayed followed by the ID number and the name of the task that is waiting for a message If the task pending in a mailbox queue is further placed in a wait state with time out wait state due to trcv_msg a character string tmo to indicate a wait state with time out is added after the character string displayed in the WaitQueue Message area for the targets using MR79 V 2 00 or later Normal display 26 _task26 Display when mailbox wait state with time out 26 _task26 two 225 PD79SIM User s Manual If the task pending in a mailbox queue is further placed in a forced wait state double wait state a character string s to indicate a double wait state is added after the character string displayed in the WaitQueue Message area Normal display 26 _task26 Display when in WAIT SUSPEND 26 _task26 s Display when in WAIT SUSPEND with time out 26 _task26 tmol s Task names displayed in the WaitQueue Message area are indicated in up to 8 characters each If a task name consists of more than 8 characters the extra characters are
37. In this case of fixed length memory pools each bit of memory block information in the Free area is formatted as follows memory block in use busy Memory block not in use ready SE No memory block Methods for Measuring and Displaying the System Stack Task Stack Sizes Used Use format 13 To measure the sizes of the system task stacks used 1 Prepare for measuring the stack usage Todothis preparation input a command as follows MR STK BASE 2 Initialize the result of stack usage measurement Todo this initialization input a command as follows MR STK CLEAR 3 Execute the target program Then when the program execution is stopped PD79SIM measures the size of stacks used immediately after the previous measurement result is initialized To reference the size of the system stack used 1 Measure the size of the system stack used 2 Display the result of system stack usage measurement Todo this display input a command as follows MR STK SYS 251 PD79SIM User s Manual To reference the size of the stack used for each task 1 Measure the size of the stack used for each task 2 Display the result of task stack usage measurement using Format 2 Todothis display input a command as follows MR STK TSK To display the measured size of the stack used for a specific task only input a command as shown below Note that the data in the third argument is handled as being represented in decimal M
38. Line Aesetle AAA 142 Ja Ob EE 258 Local label wm 256 Local Wimndow 5 56 131 Be e 14 61 Logging FUNCTION seeen 135 Loop Statement 254 PD79SIM User s Manual M Macro variable A 202 204 257 Main oommend este ee teteeeeeee 27 MAP ommand A 8 M GU Tiles nds andi AAW ees 20 Memory Mapa a haran ea naan an ana Taata 119 Memory variables 202 204 Memory WiNdOW nsee 43 117 MR Window ee eeneeeeeeneeeeetetaeeeenaes 84 D NEE 215 Motorola S format le 12 14 94 96 0 ON Demand iiri pa aaa tees 21 ON MENO meaane dee gege 21 Operatori neike n a 203 258 Over DUON are a e E RE 107 Over step CX CUtION errereen 107 P pass statement ENNEN 199 PD79SI M version 146 PD79SIM Window 27 ie ee le 197 Program COUNCED eeeeetteeeeeeeeeeeeeneees 33 38 Program Wipdow 20 33 93 97 144 R RAM monitor area 4 47 113 114 RAM Monitor VWindow cere 47 113 Read access synchronized input sese 64 realtime e CT 217 Register information file eee 12 Register variable 257 Register WiNdOW seeren 41 110 Rel Oa WT 94 Reset iti atid ania NEE EN 95 Reset button uk 109 Return DUON eegene hand civil 108 Return execution EEN 108 Right side extptreessloms 201 S SM Break Point Setting dialog box 89 120 Sampling period c cc cceceeeeeeseeeeeeeteteeeesaes 113 282 Save DiSASM c cece eeceeeeeeneaeteneeeeeeaes 96 SCOMG DEE dee 256 Scope Setting Dialog BOX essees 117 Script Commmand 253 Script file
39. Menus in the File Local Window under Window Functions for details 60 Window function of PD79SIM 1 13 Script Window The Script Window displays the execution of text format script commands and the results of that execution Script commands can be executed using a script file or interactively You can also write script commands in the script file so that they are automatically executed The results of script command execution can also be stored in a previously specified log file 1 13 1 Structure of Script Window Script file name display area Toolbar Log file name display area E Script Window io xi Run Step Open oee LogOn Loz0ff View Clear RecOn Rec ff Script Log DH lt H Enter Command Command input area Execution result display area Command history display area Script file display area The Script Window has a view buffer that stores the results of executing the last 1000 lines The results of execution can therefore be stored in a file view file without specifying a log file When a script file is opened the command history area changes to become the script file display area and displays the contents of the script file When script files are nested the contents of the last opened script file are displayed The script file display area shows the line currently being executed in inverse vide When a script file is open you can invoke script commands from the command input ar
40. Mode The display mode changes only in the active window The Program Window automatically switches to MIX display mode when the position of the program counter when the target program stops in the area output in the source line information and does not match the starting address of the source line To return to source program display from MIX display mode Click the SRC button on the Program or Source Window toolbar You can also select the following from the PD 79SIM Window Option gt Mode gt Source Mode Note If the macro definitions include a program counter value the yellow line indicating the PC value may not be displayed 102 Loading and Displaying the Target Program 1 11 Displaying the Results of Disassembling To display disassembled results click the DIS button only disassembled results displayed or the MIX button source lines and disassembled results displayed together on the program source window toolbar To switch over the display mode use the PD 79SIM window menu commands shown below Option gt Mode gt Mix Mode Switch to the Mix display mode Option gt Mode gt Disasm Mode Switch to the Disassemble display mode The display mode can only be changed in the active window SRC button Switches to source display mode View vi MIX DIS T T DIS button MIX button Switches to disassemble display Switched to MIX display mode mode If whe
41. Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers office
42. SE En hr Specify Gate a 7 Enter data 1234 8 Select as rje r lt o gt lt HAW Break Point Label Addr Cot Size Data Tere De 9 Click the Add button 000400 002 BYTE 999 READ 00040E 002 BYTE 0012 READ OF0003 00 mr rr FETCH Dei All Close 10 Click the Close button 127 PD79SIM User s Manual To break when the specified data or greater is written to the specified address The following example shows how to break when the specified data 5616 or greater is written to address 40616 Make the following settings in the H W Break Point setting dialog box 1 Select Enable 2 Enter address 406 3 Select Write 4 Deselect Not Specify 5 Enter data 56 6 Select gt 7 Click the Add button 000400 002 BYTE vm READ pp 002 BYTE 0012 READ cath 005 WORD 1234 WRITE KH 3 001 299 999 FETCH 8 Click the Close button To disable a hardware break The following shows how to disable a hardware break Make the following settings in the H W Break Point dialog box 1 Select Disable 000400 002 BYTE vn READ 000406 001 BYTE pong READ Ge 00040E 002 BYTE 0012 READ 000410 005 MORD 1234 WRITE DEZ 00 2399 vm FETCH 2 Click the Close button 128 Hardware Breaks 5 3 Deleting a Hardware Breakpoint Make the following settings in the H W Break Point dialog box 100400 002 BY
43. Sound x79 a Defsec x79 Nert x79 al Svram01 x79 a Faxdemo x79 al Po_fax x79 aj Invb x79 al Piano x79 a J4 x79 Ps x79 el HS 7900 x79 Sample x79 2 Double click the file name Fiename x78 Files of type IEEE 695 Files x79 D Cancel The opened directory in the dialog box is the directory where the last downloaded file exist In the first opening just after installing PD79SI M the opened directory is the current directory Note If you download the file X79 but the Program and Source Window does not switch to Source Program mode the file X79 may not contain source line information Check the options that you specified when compiling assembling and linking 93 PD79SIM User s Manual To download only machine language data To download only machine language data select the following from the PD79SIM Window menu File gt Download gt Memory Image The File Selection dialog box opens Select the Motorola S format then download the machine language data To download only symbol data To download only symbol data select the following from the PD79SIM Window menu File gt Download gt Symbol Select file X79 from the file Selection dialog box then download the symbol data When you download only symbol data only the symbol data from the file X79 is read To reload a file When downloading a previously downloaded file again PD79SIM allows you to download it without ha
44. Source Window To open the Path dialog box and set the search path select the following from the PD 79SIM Window menu Environ gt Path To add a search path click the Add button in the Path dialog box The File Selection dialog box opens Use the mouse to select the name of the file to be checked 1 Click the Add button C TEST PD79 SAMPLE PROG Delete Delete All OK Cancel 3 Click the OK button 2 Specify the search path in the File Selection dialog box Note When displaying the source file in the program and source windows PD 79SIM searches for the directory in order of the following priorities 1 Path written in debug information 2 Path to target program 3 Paths specified in search paths in the order they are specified 101 PD79SIM User s Manual To delete a search path Open the Path dialog box then carry out the following 1 Click the search path to be deleted 2 Click the Delete button C TEST PD 79 SAMPLE PROG TEMP Delete Delete All HH Cancel 3 Click the OK button Click Delete All to delete all search paths 1 10 Mixing Source and Disassemble Displays Click the MIX button on the Program or Source Window toolbar to simultaneously display both the source file and the results of disassembly You can also select the following from the PD79SIM Window menu Option gt Mode gt MIX
45. There ma not be sufficient memory Quit other applications or increase memory 152 Can t open name window when the target Stop the target program then open the program is running window 153 Value is out of range The specified address exceeds the MCU s maximum address of F FFFFFh isa povesimsarencyeust OOOO La Fie not founa fierame JI 157 Path no foara coan JI ass Not enough memory S ps Kate SSCS Can t change view mode The display starting address does not match the first line of the source file or the specifieg source file cannot be found Can t find source file filename Specified source file was not found Use the PATH command or the Environ gt Path menu items to specify the directory containing the source file Can t find search string name The specified search string was not found between the starting position and end Line number of Source File filename is over Because the source file has more lines than can be displayed the file cannot be display in the Source Window Switch to disassembl display mode 26 7 PD79SIM User s Manual 300 Illegal endi filename line Thereis no if statement paired with the endi statement 301 Illegal endw filename line Thereis no while statement paired with the endw statement 304 Can t find endi filename line Thereis no endi statement paired with the if statement 305 Line length is overflow filename line The number of characters
46. Virtual port inputs virtual interrupt settings and virtual port output results can be displayed for your reference in numeric or graphic mode For details about virtual port input outputs and on how to set virtual interrupts refer to HI gh end Debugging described later in this manual The functions screen configuration tool bar and menus of the I O Window are explained here Up toa total of 20 virtual port inputs and virtual interrupts can be set Up to 20 virtual port outputs can be set 1 14 1 Virtual Port Input Virtual Port Input refers to a function that defines changes in the data that is input from external sources to a specified memory address Use of this function makes it possible to simulate data inputs to the ports defined in the SFR The defined input data can be referenced by displaying it in chart numeric hexadecimal or graphic mode There are following three types of virtual port inputs 1 Cycle synchronized input The input data can be written to memory when program execution has reached a specified number of cycles The data size that can be input is one byte The diagram below shows an example of a virtual port input that is synchronized to machine cycles Example where data is input to address 2 Data 20 is input in Data FF is input in Data 1D is input in the 2 000th cycle the 5 000th cycle the 9 000th cycle ok i 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 Number of cycles executed
47. _task10 11 _task11 LsJ 2 0003H 0003H 3 0005H 0003H 3 These states are supported by MR79 V 2 00 or later These states are not displayed for the target programs using earlier versions of MR79 than that 223 PD79SIM User s Manual The following items are displayed in SEM mode The items are displayed in order of ID No for all semaphores defined in configuration ID ID No of semaphore efault value of semaphore counter Semaphore count Task ID Nos and task names in the semaphore queue In SEM mode the status bar is not displayed If the task pending in a semaphore queue is further placed in a wait state with time out wait state due to twai_sem a character string tmo to indicate a wait state with time out is added after the character string displayed in the semQ area for the targets using MR79 V 2 00 or later Normal display 26 _task26 Display when in semaphore wait state with time out 26 _task26 two If the tasks in the semaphore queue are also in the suspended wait state WAIT SUSPEND an s is displayed after the character string in the flagQ field to indicate that it is also in the WAIT SUSPEND state Normal display 26 _task26 Display when in WAIT SUSPEND 26 _task26 s Display when in WAIT SUSPEND with time out 4 26 _task26 tmol s Task names displayed in the semQ area are indicated in up to 8 characters each If atask name consists of more than 8 characters the extra charac
48. above various other I O settings are possible 7 2 Method for Writing I O Script This section explains the method for defining virtual port inputs virtual interrupts and other I Os to be written in I O script by using definition examples To define an I O script write a procedure for it Enclose a procedure with braces Das you write it Multiple procedures can be written in one file In each procedure write settings timings etc of virtual port inputs or virtual interrupts Each of the multiple procedures thus defined are processed in parallel with program execution However the order in which each procedure is evaluated is indeterminate Register the I O script file you ve created in PD79SIM using the I O Window menus Option gt Load or the Load button Multiple I O script files can be registered However the total number of procedures that can be registered is limited to 20 Procedure 1 in the example below defines the timer mode of timer AO In this example a timer AO interrupt is generated every divide by ratio number of cycles specified for the timer AO The value specified in the interrupt control register is referenced to determine the priority of this timer interrupt Procedure 2 in the example below defines a cyclesynchronized virtual port input In this example data is input from virtual port to memory when the program has been executed 10 000 cycles Although the I O Window supports virtual port inputs in o
49. by selecting Word or Dword under Option gt View gt Data Length the memory access attribute may differ for each of the bytes If there are such mismatches in the access attributes within one data item the data item is displayed in parentheses as shown below Note that the memory display background color is set to the color for the access attribute of the 1st byte Display when access attribute is identical for all bytes of the data 0 000020 FFFFFFFF FFF 000070 FFOOFFFF FFF RN E a FFFF0000 FFF FFFFFFFF FFFFFFFF LA8R 00000000 FF240000 JE i FFEFFFEF FEFFFFFF Oe FFFFFF00 FFF Display when access attributes are mismatched between different bytes of the data 1 7 2 RAM Monitor Window Toolbar Hex button J IS button Displays data in J IS code buttori Displays data in hexadedmal default Clear access attribute Dec Dec button Displays data in dedmal A CII button Refresh display Displays data in SJ IS code ASCII button button Displays data in ASCII code Set RAM monitor area 48 Window function of PD79SIM 1 7 3 Extended Menus in the RAM Monitor Window When the RAM Monitor Window is active in the PD79SIM main display area the Option menu contains the following items View Change contents of display Address Display from specified address Data Length
50. colors in the Program Window when you select the menu Option gt Color the Color Setup Dialog Box open Note that this setting have effect on all Source Windows Character color Tesi ackground color Text Mix PC line r Coverage Execution 1 12 1 The functions of Color Setup Dialog Box Pushing the button to the left of each color box make the Color Setup Dialog Box open You can change the display colors in this dialog box Pushing the Reset button set the colors default 104 Starting and Stopping Target Program Execution 2 Starting and Stopping Target Program Execution 2 1 Starting and Stopping To start the target program Click the Go button on the PD 79SIM Window toolbar You can also press the F 1 key A sela Zei ov Click the Go button You can also start the target program by selecting the following from the PD 79SIM Window menu Debug gt Go The target program runs until it reaches a breakpoint Freerunning the target program Selecting the PD79SIM Window menu Debug gt GoF ree make the target program executed with software break points and hardware break points disabled To stop the target program Click the Stop button on the PD 79SIM Window toolbar sej akloj zi el am Click the Stop button 105 PD79SIM User s Manual You can also start the target program by selecting the following from th
51. display is updated after each command is executed 1 11 1 Structure of File Local Window File name which contains program counter Toolbar GW File Loes Window cha uns unsigned char s_far_const_volatile_char 0x0 char s_far_volatile_schar 0x80 unsigned char s_far_volatile_uchar 0x8 unsigned char s_far_volatile_char 0x0 char s_far_const_schar Ox7F unsigned char s_far_const_uchar OxFF unsigned char s_far_const_char OxFF char s_far_schar Ox7F unsigned char s far_uchar OFF Scope display area Display of variable type Dispaly of variable value Dispaly of variable name Data display area When performing step execution etc and there is a change in the file that includes the address specified by the program counter previously displayed variables are cleared and the local variables in the new source file are automatically displayed 1 11 2 File Local Window Toolbar The File Local Window toolbar is the same as that in the Local Window See Section 1 10 2 Local Window Toolbar under Window Functions for details 58 Window function of PD79SIM 1 11 3 Extended Menus in the File Local Window When one of the File Local Window is active in the PD79SIM main display area the Option menu contains the following items Operations related to C function Register selected C variable as C watch point Register pointer of selected C variable as C watch point Set new
52. equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under c
53. exceeds the maximum permissible for one line B05 Nea isoveriow filnameliney OOS Se Cant findScriptrile filename SSS noors read SE Filet Description isilegal filenametine SSS ease find endw filename line There is no endw statement paired with whil oo SE nest level exceeds the limit num SC Hat break flenameline GE Can t add new watch point because it exceeds limit of watch point number Max number is num 650 There are no symbol information Load module file not loaded 268 Error Messages 900 sy BOL fileis illegal Error in format of load module file 902 Cent find SYMBOL file filename No load module file exists 903 Can t get enough memory Insufficient memory Quit other applications or increase memory 904 Cannot open temporary file The temporary file for downloading using the on demand method could be opened 002 Description of expressinisinega OOOO poo cantaras SSCS foo righthand side of tne resson isna OOOO OOOO 009 rne Type of structure union arenot seme SSS poi Katz 1012 Net supported faat doubleyoperation e rne operation doesnot beaiiowedtoponag 1014 The operation does not be allowed to the pointer 1018 Type information is broken Error in symbol information in load module file 1020 Left value must be a structure oran union ee 1022 Left value must be reference of a structure o an union Le Leeteicie JI 02a The operand mustheavalue
54. fiet filename SSCS 2003 Peiteng 22004 The Output fie of thesameaireadyset 1 e 22006 The start yae targar man meraga 1 22007 The Output porareadyset dS 22008 There snodata in theinputfiie 1 22000 Wiese eiert Ke oss notes and action e SST S Y an Katie JI sooz_ canttfind ttiney JI 25003_ Syrnbl agesiiies e l Ca cantfindy tiey le 25005 Description of expression is illegal line token 25006 Nest level of the if statement is overflow line 25007 Nest level of the while statement is overfl i line 25008 Too many the break statement line na 25009 Thereis no if statement corresponding to the else statement line 25011 Can t open the filename file Ss 25012 The filename file is not a file made in the 1 O window 25013 The description of the memory variable is illegal line 278 Index 280 Index HiSfetCh expression eeeeeeeseeeeeseeeeeeeneees 203 FASINE expression eeeeeeeesteeeeeeteeeeenteeees 203 sread expression 203 ZM ewrlteevpreeslon 204 A ASM Watch Window sse 5 50 114 Assign Statement 253 Autotownt oa 95 B Break Statement AA 254 C C OXPIeSSION issssissserirererrrerrrrrsren 53 259 262 C language expression 132 TEE 130 132 C Watch Window 5 53 131 C watchpoint data file ees 13 EE e Lal 53 CB TOSIM EE 208 Character oonstant rere 258 is el Die e RETTEN 108 Come Execution 00 ceetcieeeeeeeesetteeeeeeeeeeeees 108 C
55. is defined Virtual interrupt is Virtual interrupt is Virtual interrupt is generated in the generated in the generated in the 3 000th cycle 6 000th cycle 9 000th cycle A ee a eg 1000 2000 3000 4000 5000 6000 7000 98000 9000 10000 Number of cycles executed As shown above virtual interrupts in this case timer AO interrupt can be generated in any desired cycle 66 Window function of PD79SIM 2 Executed address synchronized interrupt Virtual interrupts can be generated when the program has executed a specified address The diagram below shows an example of a virtual interrupt that is synchronized to executed addresses Virtual interrupt is generated when Processing program execution has moved into address F 0000 As shown above a specified virtual interrupt can be generated when program execution has moved into address F 0000 By using this function you can specify that a virtual interrupt be generated when address F 0000 is executed first by the program and that no virtual interrupt be generated when the address is executed next as shown below Number of times the address Whether virtual interrupt is F 0000 is executed generated Virtual interrupt is generated Second Virtual interrupt is not generated Virtual interrupt is generated 67 PD79SIM User s Manual 1 14 4 Screen Configuration of 1 0 Window This window is split into three sections each displaying the setup contents of virtual
56. local bit symbol SYM bol SYM 1 SY Mbol Display all symbols 2 SYMbol GLOBAL G symbol Display global symbols 3 SYMbol LOCAL L symbol Display local symbols EXPress E XP EXPress assembler expression isplay value of specified assembler expression 239 PD79SIM User s Manual 1 2 6 Software Break Setting Commands Command format SoftwareBreak SB 1 SoftwareBreak 1 Display currently set software break points 2 SoftwareBreak address 2 Set software break point at specified address specified address SBCA SBD specified address SBDA SBE specified address SBEA specified line No specified function 1 2 7 Hardware Break Setting Commands Command format HardwareBreak HB 1 HardwareBreak 1 Reference hardware break point 2 HardwareBreak address 2 Set hardware break point READ WRITE RW FETCH Y passes See page 243 for details BYTE WORD I reference data comparison condision III HBC specified address HBCA 2 BreakMode ON OFF 2 Set hardware break mode 1 2 8 Coverage Measurement Commands Command format CoVerage CV 1 Coverage 1 Check starting address for displaying the Coverage LOCAL start address end address results of coverage measurements Coverage GLOBAL start address end address 2 Display results of coverage measurements Coverage TOTAL start address end address in 1 byte units
57. menus and provide the items for the basic operation of PD79SIM and debugging Below we look at the functions of each item on the basic menus The functions of the items on the extended menus are described under the respective windows 28 Window function of PD79SIM 1 1 3 1 File operation The File menu in PD79SIM contains the items required for file operation such as including files saving files and terminating PD79SIM Download Download target program Load Madule Download machine language data and Shift F L debugging information SCC Download only machine language data Download only debugging information Raoa Reload target program DEE Upd Upload target program a AutcDownLcad Automatically download when the target program is updated SaveDiam ee disassembly result Se List the file name of target program downloaded ie ee 1 1 3 2 Editing The Edit menu in PD79SIM contains the items required for editing operation such as character strings copy paste and search Edit Copy character strings specified to clipboard Ctrl C Paste character strings of clipboard Ctrl V 1 1 3 3 Display The View menu in PD79SIM contains the items required for switching display of the tool bar and status bar View Switch display or non display of tool bar Pee sch Switch display or non display of status bar ee 29 PD79SIM User s Manual 1 1 3 4 Setup The Environ menu in PD79SIM contains t
58. of expression Comment statement Comments can be written in I O script Comment statements are ignored when executing I O script When creating I O scripts write one statement in oneline You cannot write multiple statements in one line or one statement in multiple lines 7 3 1 Procedure Procedures specify a definition block of an1 O script Multiple procedures can be written in one file However the number of procedures that can be defined is limited to 20 If procedures are defined in multiple files this limit means that up to 20 of such procedures can be defined The following shows a description format Statements Statements In the same way multiple procedures can be defined below 197 PD79SIM User s Manual 7 3 2 1 0 Script Statements Following five statements can be used in I O script 1 waiti statement Format waiti number of machine instructions Function Execution of the next statement is kept waiting for a specified number of machine instructions Right side expressions can be used to specify the number of machine instructions Specification of right side expressions is described later For example if following statements are written waiti 100 set 0x800 0x10 the set statement is executed only after executing 100 machine instructions 2 waitc statement Format waitc number of cycles Function Execution of the next statement is kept waiting for a specified number of cycles Right side
59. omitted When you move the mouse pointer to the data position displayed in the WaitQueue Message area a window like the one shown below appears showing information about the task same contents as shown in TSK mode Window to display detail information on task Each display area can have its display width changed by dragging the mouse to the desired position In MBX mode the horizontal scroll bar is displayed simultaneously when data is displayed Use this scroll bar to scroll the data contents displayed in the WaitQueue Message area To display the cycle handler status Click the CYH button on the toolbar of the MR Window or select the following from the menu Option gt Mode gt Cyclic Handler The following shows the configuration of the MR Window in cycle handler status mode TSK RQ TIM FLG SEM MBX CYH ALH MPL ID Sta amp ddr name interval count Status 1 008141H Levclel 0064H OO1EH TCY_ON 2 008147H eycle O3E8H 0144H TCY_OFF 3 00814DH Cevele3 O1F4H 0144H TCY_ON The following items are displayed in CYH mode The items are displayed in order of ID No for all cycle handlers defined in configuration ip OOOO O O ID No of cycle handler StaAddr Starting address of cycle handler Name of cycle handler interval Interrupt interval 5 These states are supported by MR79 V 2 00 or later These states are not displayed for the target programs using earlier versions of MR7
60. port inputs the output results of virtual port outputs and the setup contents of virtual interrupts Setup SmE Del Load Mode Scale Color I O Script File p Input cycle Cycle 0000000111 Data 0x90 Address Bit 0 10 20 30 40 50 60 10180190 10011012013014015016017018019 000SE0 HF 0003E0 0003E0 0003E0 00030 00030 O00SED LGE Virtual port input screen Output cycle C Address Bit W 34201361013800 3990 Be 4560 4750 4940 5130 0003E0 7 S E 0003E0 6 O00SEO Virtual port output screen 0005E0 0003E0 0003E0 00030 O00SED i 1 1 1 1 1 KE WD EA CTT TT TEE TICE TTT T TT TT CTT CTT Interrupt cycle Cycle E Virtual interrupt Vec Pri 10000 10001 10002 10003 100041100051 10008110007110008110009 AT FFEC 5 SE Each screen is detailed in the pages to follow 68 Window function of PD79SIM 1 14 5 Structure of Virtual Port Input Screen 1 14 5 1 Screen structure for cycle synchronized inputs If you ve set virtual port inputs that are synchronized to machine cycles they can be displayed in one of the three modes shown below The display modes can be changed from the Mode menu 1 Chart mode displayed in units of bits The virtual port input that has been set is displayed in chart mode in units of bits Input cycle Cyclle 0000010029 Data 0x30 E 00000100200300400500800 7008003901001 101201301 Cycle count Address Bit O0
61. the Source Window To open the Source Window select the following from the PD 79SIM Window menu Window gt Source Window 1 8 Changing the Program Display Position You can display the source program in the Program Window and in the Source Window To change the display position of the Program or Source Window click on the View button in the toolbar of the Program or Source Window to open the Disp Area dialog box You can only change the display position in the active window View button gt View SRC MIX DIS Click the View button to open the Disp Area dialog box Source button Source Cancel Change the e File Function level Address Address button Change the Address Line No level PC button Change the program counter If no debugging information has been read in no changes can be made at the file or function level or at the line No level Further if the Program or Source Window is in disassemble display mode no changes can be made at the line No level 97 PD79SIM User s Manual Changing the display position at the file function level Click the Source button in the Disp Area dialog box to open the Source dialog box The Source button cannot be clicked if no debugging information has been read in The Source dialog box shows the file structure of the downloaded target program plus data on functions Click the name of the file and the function name to be changed
62. then double click the left mouse button Or you can scroll the screen to go to the desired location 2 Input data in the selected place using a hexadecimal number The data size that can be input is one byte from 0x0 up to OxFF 3 Repeat steps 1 and 2 as many times as the number of data you want to set When you finished entering all data press the Next button A dialog box for saving the virtual port input data you ve set to a file virtual port input file will appear File name finput scr Save as type Script Files scr D Cancel 153 PD79SIM User s Manual Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into PD79SIM back again by using the I O Window menus Option gt Load or the Load button When you ve input a file name press the Save button Thus you ve finished setting the cycle synchronized virtual port inputs 1 3 Setting Read Access synchronized Inputs To set read access synchronized virtual port inputs choose the I O Window menus Option gt Setup or the Setup button The dialog box shown below will appear Setup Dialog Select Type l Set Virtual Port Input Set this item Set Virtual Port Output C Set Virtual Interrupt Cancel Here choose the item Set Virtual Port Input and press the Next button Or press the Cancel button if you want cancel the setup session and close the di
63. this dialog box to choose your desired colors 2 To change the colors of the virtual port output display screen Press the button for the item whose color you want to be changed in the Output column A dialog box for selecting colors will appear Use this dialog box to choose your desired colors 3 To change the colors of the virtual interrupt display screen Press the button for the item whose color you want to be changed in the Interrupt column A dialog box for selecting colors will appear Use this dialog box to choose your desired colors 4 6 Searching for Display Data The virtual port input or virtual interrupt data or the output result of virtual port output can be displayed at the left edge of the window after searching However the last data of each is displayed at the right edge The following shows how to search Setup Modif Del Load Mode Scale Color Input yc ele 0000000111 Data 0x90 1012013040150160 70180190110011012013014015016017018019 E Point to somewhere in one of these areas and dick the right mouse button A popup menu for searching data will appear Output cycle Cycle Address Bit H3420 26107 3800 3990 4180 4370 4560 4750 4940 5130 4 I Move the mouse cursor to a position in one of the display areas where you want search for data to begin then click the right mouse button A popup menu like the one shown below will app
64. to memory at address 0x8000 in bytes set 0x8000 B 0x10 or set 0x8000 0x10 Example 2 When writing to memory at address 0x8000 in words set 0x8000 w 0x1234 Example 3 When writing to memory at address 0x8000 in long words set 0x8000 L 0x12345678 205 PD79SIM User s Manual 8 Coverage Information 8 1 Referencing Coverage Toreference the coverage CO coverage of each function in the downloaded C language program open the coverage window The coverage window can be opened by selecting the following from the PD79SIM window menu Optional Window gt Coverage Window Coverage window for checking the execution rate of each function Coverane B Ju FFF Function Start End Coverage Main 0180A 64 29 9 EI Ti ID UU 2 013009 100 00 3 010E Doubleclick on the line of the function you want to check A coverage source window will open up debus Address Solros faint DI i int i OO mm 019004 mme e EAN 007i 01308 000121101801 0001F 018020 w4 015 01902E Die mt SE 2 OOG17 MIAE OMRI MIAE Coverage source window for checking for each line whether the 8 2 Updating Coverage Display When the target program is executed using a GO or STEP command the coverage display area of the coverage window changes to Thedisplay is not automatically updated If you want to updateit press the Refresh button on the toolbar or s
65. to stop program execution regardless of the value of the accessed data Use to stop program execution according to the size of the accessed data Use to stop program execution according to the accessed data Enter the following to stop program execution when any data is written to address 3016 format 3 HardwareBreak 30 WRITE You can abbreviate WRITE to W Specify READ or R to stop program execution when data is read or RW when data is read or written Enter the following to stop execution when 2 bytes of data is written to address 3016 format 4 HardwareBreak 30 WRITE WORD You can abbreviate WRITE to W Specify BYTE or B to stop execution when 1 byte of data is written to address 3016 If not specified the default size is BYTE This also applies to other formats Enter the following to stop program execution when a value of 5016 is written to 3016 format 5 HardwareBreak 30 WRITE 50 As with other formats is assumed if data is specified for comparison but no condition is specified This also applies to other formats Enter the following to stop program execution when a value of 123416 is written to 3016 format 5 HardwareBreak 30 WRITE WORD 1234 Enter the following to stop program execution when a value of 5016 or more is written to 3016 format 5 HardwareBreak 30 WRITE 50 gt 244 Table of Script Commands CoVerage CV Coverage Measurement Use the coverage measuring fun
66. 0 entries counted from the beginning of program execution 3 7 Virtual Interrupt Function This function defines interrupt generation Using this function you can generate timer interrupts and AD conversion interrupts in a simulated manner without having to actually generate them The following shows timings at which virtual interrupts can be generated 1 When program execution has reached a specified number of cycles 2 When the program has executed a specified address Virtual interrupts at the above timings can be defined from the I O Window Furthermore this function can be used in combination with the I O script function a function that allows you to define virtual port inputs and virtual interrupts For details refer to High end Debugging described later in this manual Using this I O script function you can specify more precise interrupt generation timings such as when the program reads or writes to memory or when the program has executed instructions a specified number of times PD79SIM User s Manual 3 7 1 Differences between Virtual Interrupts and Interrupts in Actual Chip Virtual interrupts differ from interrupts in the actual chip in the following points 1 About interrupt control register When a virtual interrupt is generated the interrupt control register s interrupt request bit is not set tol Theinterrupt priority specified in the interrupt priority level bit is not referenced either The priority of virtual inte
67. 00 018047 init 18048 018057 debug01 0180 018009 0180 0180ED 0180 018101 _debugl4 0181 01813E _debug05 0181 18196 _debuz02 _debug03 _debuz06 181 018209 _debuz0 182 018204 Function scope Coverage display Functiion name display area display area area When the target program is executed using a GO or STEP command the display in the Coverage column changes to To update the display press the Refresh button on the toolbar or select Option gt Refresh from the menu The coverage source window that allows you to reference for each source line whether the target program has been executed or not can be opened by double dicking on any desired line in the Function column The function scope display area can be turned on or off by selecting or deselecting Option gt Layout gt Address Area from the menu 86 Window function of PD79SIM 1 18 1 2 Structure of Coverage Source Window Program display area ooog 00009 00010 00011 00012 00013 US HOI L DD tot 018004 018008 OIsDIC 018020 COIS 01802E 01803C 01803F 23 debuel2 0 00013 018043 else Line No display area Address display area Thelines that have already been executed are displayed in light blue and those not executed are displayed in gray The lines where no code exist e g comment lines are displayed in white When executing the target program the lines where code
68. 08E HF display area 0003E sa 4 Address Bit number Input data display area display display area area Address display area It displays the memory address to which a virtual port is input Bit number display area It displays bit numbers of memory to which a virtual port is input Input data display area It displays the virtual port input data that has been set in chart mode in units of bits This means that memory bits are in the state of logic 1 eal This means that memory bits are in the state of logic 0 The short white lines appearing at the bottom of the input data display area indicate points at which data are input Toreference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area Cycle count display area It displays cycle counts 69 PD79SIM User s Manual 2 Graphic mode displayed in units of bytes The virtual port input that has been set is displayed in graphic mode in units of bytes Input cycle Cycle 0000010059 Data 0x60 Address 00000100200300400500600700300901001101201 Cyde coun E e D display area O003E1 t Address display area Input data display area Address display area It displays the memory address to which a virtual port is input Input data display area It displays the virtual port input dat
69. 1 5 Uploading From the PD79SIM Window menu select File gt U pload to open the Upload dialog box Enter the upload area and the name of the file to be saved You can specify files in the Motorola S format or Intel HEX format To save a file in the Motorola S format specify the mot attribute To save a file in the Intel HEX format specify the hex attribute If you specify an existing filename that file is overwritten 1 Specify the starting address Memory Save Area mn RE Save Filename Refer Cancel 2 Specify the end address 3 Specify the name of the file to be saved 4 Click the OK button 1 6 Saving Results of Disassembly From the PD79SIM Window menu select File gt Save Disasm to open the Save Disasm dialog box Enter the area to be saved and the filename Y ou can specify any filename and attribute If you specify an existing filename that file is overwritten 1 Specify the starting address UU mn Save Filename FO Refer Cancel 4 Click the OK button 2 Specify the end address 3 Specify the name of the file to be saved 96 Loading and Displaying the Target Program 1 7 Continuing to Display a Selected Program Position The Program Window always displays the target program at the position of the program counter and you cannot therefore choose to always display the same position You can do so however in
70. 10 7 5 1 Composition of L eft side E xpressions Left side expressions may be composed of the following Macro variable Memory variable Each part of left side expressions are described below 7 5 2 Macro Variables Macro variables are used by adding at the beginning of each variable name Variable names following the percent character may consist of alphanumeric characters and underscore _ However numbers cannot be used at the beginning of macro variable names The values that can be handled by an expression that is substituted for macro variables are integers in the range of OtoFFFFFFFFie If negative numbers are used they are handled as 2 s complements When specifying a repeat count for the while statement use of macro variables should prove convenient set val 0 Macro variable val is assigned 0 while Y val lt 10 while statement is repeated until val 10 waitc 10000 int Oxffee 5 set val val 1 Y val is incremented by 1 7 5 3 Memory Variables This variable is used when writing values in memory The following shows a format of memory variables address data size Expressions can be written in address Memory variables cannot be used 204 1 0 Script Function Specify data size as shown in the table below For word 2 byte size For long word 4 byte size If specification of data size is omitted the data size is assumed to be byte long Example 1 When writing
71. 2 Changing the Contents of Relsters A 111 3 3 Checking Changes in RAM During Target Program E vecution 113 3 4 Checking the Value at a Specified Address AA 114 3 5 TO SWIECH ee RER 117 3 6 Setting Data at a Specified Addrees AAA 117 3 7 Updating the Memory Display cece ee eeeceeeeeeeceeeeteaeeeeteeaaeeeteeaeeeete 119 3 8 Checking and Changing Memory Map Data 119 3 9 To change the acquisition mode of the Memory ceceeeeeeesteeeeettteeeeeeetaeees 119 4 Software Breaks 120 4 1 Opening the S W Break Point Setting Dialog Box 120 4 2 Setting a Break POM sets sesecs cosscecesesasececezesctecene dade cecedendutedees Hoetens Dede iese 121 4 3 Deleting a Break PONT aa a a ee 122 4 4 Temporarily Disabling Break Ponts 122 4 5 Temporarily Enabling Break Ponts 123 4 6 Setting a Break Point from Program Source WiNdOW ssssssessessssrsserrersees 123 4 7 Setting Breakpoints from the Todler 124 4 8 Saving Break Points ANEREN EEN 124 4 9 Loading Saved BreakPoint ccccecceeccceeeeeeeceeeeeeeeeeeeeaeeeeseaeeeeseeaaeeeeneaeees 124 5 Hardware Breaks 125 5 1 Opening the HW Break Point Setting Dialog Bo 125 PD79SIM User s Manual 5 2 Setting Hardware Break points cceeeeeeeee ee eeeee eee eeeaeeeeeecaeeeeeecaaeeeeneeaeeeete 126 5 3 Deleting a Hardware Breakpoint ccceceecceeeeeeeceeeeeeeeeeeeeeaeeeeeeaeeeeeteeaeees 129 6 CHECKING C VARIABLES 130 6 1 Checking eg EIER 130 6 2 To change the value of a
72. 56 b amp OxcO 0x40 set mr_AO_ cnt 64 gt Selects f64 else if Ox56 b amp OxcO 0x80 set Ymr_AO cnt 512 gt Selects f512 else set G t AU cnt 4096 gt Selects 4096 while 1 gt while statement if Ox40 b amp 0x01 0x01 gt Checks timer AO s count start flag waitc 0x46 w Y mr_AO_ cnt 1 gt Keeps execution of I O script waiting for the number of cycles equal to the divide by ratio that is set for timer AO int Oxffec 0x75 b amp 0x7 gt Generates a timer AO virtual interrupt Interrupt control register is referenced to determine priority elsef waiti 100 gt Keeps execution of I O script waiting for 100 instructions gt Terminates procedure 1 196 1 0 Script Function Definition of procedure 2 example for virtual port input gt Beginning of procedure 2 waitc 10000 gt Keeps execution of I O script waiting for 10 000 cycles set 0x2 0x20 gt Inputs 0x20 in address 0x2 waitc 10000 set 0x2 w 0x4143 gt Inputs 2 byte data 0x4143 from address 0x2 gt Terminates procedure 2 7 3 Composition of I O Script Following statements can be written in I O script Procedure e 1 0 script statement Judgment if else Execution statements are branched off by judging the evaluation result of expression Repeat statement while and Break statement Statements are executed repeatedly by judging the evaluation result
73. 695 absolute format files 4 1 4 Register Information File The register information file which is named PD79SIM rdf contains information of MCU registers register name and size etc PD79SIM automatically reads this file and uses the information to display the register window The register window does not open if this file does not exist This file is supplied with PD79SIM The user cannot edit it 4 1 5 Script File The script file is for automatic execution of script commands This file which is read from the Script Window takes the attribute scr 4 1 6 Help File The help file contains help messages for PD79SIM This file which is supplied with PD79SIM takes the attribute hlp 12 PD79SIM Input and Output Files 4 1 7 Environmental Setup File The environmental setup file which is automatically generated by PD79SIM and cannot be directly created or edited by the user stores information about the environmental setup of PD79SIM The filename is pd79sim ini and sim79 ini The environmental setup file is saved to the Windows directory the directory in which you have installed Windows 4 1 8 MCU File This file contains the information inherent to the target MCU The MCU file is included with product The file name is M379xx MCU 4 1 9 Coverage Measurement Information File This is a binary file that contains the results of coverage measurements The file attribute is cov This file can be saved and load
74. 7 PD79SIM User s Manual 1 1 2 PD79SIM Window Toolbar Go button Break button Executes target program Sets the position of the cursor Step button in the window as the software One step execution breakpoint of target program Return button SW button Runs the program up SN SE to the higher routine ra e HI SlsSlAl E Rst SW HW Com button Stog button Executes the target program Stops execution of the Wi butt from the value in the program target program utton counter to the position of the Sets a hardware cursor in the window breakpoint Over button Step over Reset button function subroutine call Resets the target program 1 1 3 PD79SIM Window Menu The menus in the PD79SIM Window can be classified as basic menus and extended menus Debugging menu Edit menu Environment menu Optional items Optional Window menu l l File Edit View Environ Debug Option BasicWindow OptionalWindow Help Filemenu View menu Debugging menu Window menu Help menu basic debugging Basic Men nd Exten Men The sub menu items of the optional menus in PD79SIM automatically change according to which window is active in the main display area of the PD79SIM window The optional menus are called extension menus In contrast the items on all menus other than the optional menus remain the same no matter which window is active These are called basic
75. 9 than that 226 Real time OS Debugging Function Interrupt count Activity status of cycle start handler In CHY mode the status bar is not displayed The following are displayed in the Status area TCY ON Cycle handler enabled TCY OFF Cycle handler disabled Each display area can have its display width changed by dragging the mouse to the desired position In CYH mode the horizontal scroll bar is not displayed To display the alarm handler status Click the ALH button on the toolbar of the MR Window or select the following from the menu Option gt Mode gt Alarm Handler The following shows the configuration of the MR Window in alarm handler status mode TSK RQ TIM FLG SEM MBX CYH ALH MPL Remain Handler 3 Now System Clock Count OO000H 0000H 0A6EH ID Sta amp ddr name Warmim 2 008159H alarm 0000H 0000H ABCDH 1 008153H alarml 0000H ABCDH 1000H 2 00315FH alarm3 OO0CDH 0003H 0003H The following items are displayed in ALH mode The items are displayed in order of starting time for all alarm handlers defined in configuration that have currently not been started mp OS ID No of alarm handler StaAddr Starting address of alarm handler Name of alarm handler Starting time of alarm handler In ALH mode the status bar shows the following Remain Handler The number of alarm handlers waiting to be started and the current system clock count Each display area can
76. C variable 133 7 SCRIPT COMMANDS 134 7 1 Executing Script Commande cece eee eeee settee eee teaeeeeeecaaeeeeneaaeeeete 134 7 2 Logging the Results of Executing Script Commande 135 7 3 Executing Script Commands in Batch Mode 138 8 EXITING PD79SIM 140 ST Exiting e RS E EE 140 9 MISCELLANEOUS 141 9L IME ASSEN TER 141 92 Starting Up Mak EE 143 9 3 Searching for Character Strings in Target Program 144 9 4 Changing Window Proportt ons 145 9 5 Switching Over Active Windows ssssssssssserrssssrrssstinnsstinnsntinnsnttnnnnnnnnnsnnnn nnt 146 9 6 Displaying the Version Of PD ZOGIM teense eeeenaeeeeeeeaaeeetteaeeeete 146 9 7 To Configure the operation of the PD79SIM o oo eeceeeeeeeeeeeeneeeeeeeeeeeeeeaeeeetee 146 9 8 TO Open the E Gitor citi dee ieee 147 HIGH END DEBUGGING 149 1 Setting Virtual Port Inputs in 1 0 Window 151 Ee EE 151 1 2 Setting Cycle synchroniZed NDUtS ec eee teen e eects ee etetae eee teeaaeeetteaaeeeetee 151 1 3 Setting Read AcCees zvnchrontzeilnputs cece cceeeee teense eeeeneeeeeeeeaeeeeeeaaes 154 1 4 Setting I nterrupt synchroniZed NPUts 0000 cee eee e ee eeeeeeeteeaeeeeeteaaeeeetee 156 2 Setting Virtual Port Outputs in 1 0 Window 159 2 Ba VE 159 2 2 Setting Virtual Port Outpouts NENNEN 159 3 Setting Virtual Interrupts in 1 0 Window 161 3 LS OVERVI CW eege E de a eel deeded teeta iene 161 3 2 Setting Cycle synchroniZed Interrupt 0 0 0 cceceeceeeeeeeeeeeeeeeeeeeeeeeesaeeeeeseaaeees 161
77. D79SIM User s Manual 1 17 MR Window Use the MR Window to display the status of the real time OS You can only use the MR Window when you have downloaded a program that uses the real time OS if the downloaded program does not use the MR nothing is displayed in the MR Window when it is opened Note that MR Windows can be opened for each of the display modes currently 9 max Notes If the downloaded program does not use the MR you cannot select a display mode from a menu 1 17 1 Structure of MR Window The following shows the screen configuration of the MR Window Toolbar Current Run Task 1 _main YW ID Sta amp ddr name Pri Sans wup_count timeout Fle ptm fle mode 018000H main RUN 0000H 018143H _task2 RDY 000 O181ACH _task3 SUS 000 0181B5H _task4 WAT SLP 000 0181C2H _task5 WAT CSLP SUS WAT CDLY 000 O181CFH _task6 0181DFH tas WAT CDLY SUS 000 0181EFH WAT CFLG 000 TWF_ORW 018211H WAT FLG SUS 000 TWF_ORW 018233H WAT CSEM 000 018243H WAT SEM SUS 000 018253H WAT MBX 000 WAT MBX SUS 000 DMT 018271H tas 01828FH _tas WAT CSLP TMO 000 WAICSLP TMO SUS 000 west Zen lecht Sec zs esch re ee a sech eh RE AA ll 018298H LC ia 0182A48H _task16 1 2 3 4 5 6 H 8 9 10 11 12 13 14 15 16 1 17 2 MR Window Toolbar TSK _RQ TM FLG SEM MBX CYH ALH MPL The following table shows the information displayed in the MR Win
78. DATA gt Drag to resize Address LABEL DATA QOFOOOC start B7 DEOOOD D4 ASM Watch Window You can change the relative proportion of the expression display area lt Expr gt Drag to resize Addr Bit Expr z Rdx Data OFOOOC start BR Hex wii OFOI2B min BY Hex 7C Coverage Window You can change the relative proportion of the function name display area lt F unction gt Drag to resize Funct ion Start main 00829D 00 talint 0083D1 00 145 PD79SIM User s Manual 9 5 Switching Over Active Windows PD79SIM requires that the window to be operated on is active In addition to using the mouse to switch over the active windows by clicking on a desired window you can switch over the active windows from the keyboard To switch over the active windows from the keyboard enter the keys as follows Ctrl TAB Hold down the Shift key while you enter the above keys and the active windows will be switched over in reverse order 9 6 Displaying the Version of PD79SIM Select the following from the PD79SIM Window menu Help gt About The About dialog box which shows the PD79SIM version is displayed PD79SIM Version A PD 9SIM Ver 3 20 COPYRIGHT C 1997 1996 1999 2000 2003 RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED Press OK to dose the About dialog box 9 7 To Configure the operation of the PD79SIM Se
79. R STK TSK task ID number 252 Writing Script Files 2 Writing Script Files PD79SIM allows you to run script files in a Script Window The script file contains the controls necessary for automatically executing the script commands 2 1 Structural Elements of a Script File You can include the following in script files Script commands Assign statements Conditional statements if else endi Program execution branches to the statement s to be executed according to the result of the conditional expression Loop statements while endw A block of one or more statements is repeatedly executed according to the expression break statement Exits from the innermost loop Comment statements You can include comments in a script file The comment statements are ignored when the script commands are executed Specify only one statement on each line of the script file You cannot specify more than one statement on a line or write statements that span two or more lines 2 1 1 Script Commands You can use the same script commands that you enter in the Script Window You can also call script files from within other script files nesting up to 5 levels 2 1 2 Assign Statements Assign statements define and initialize macro variables and assign values The following shows the format to be used macro variable expression You can use alphanumerics and the underscore _ in macro variable names H owever you cannot use a nu
80. S cee eect eee tene eee tecaee ee etcaaeeeeneaaeeeeteaeeeeeeaaes 11 4 PD79SIM Input and Output Files 12 AUN put UE 12 EE eene 14 4 3 Temporary Files cocesecstecececstocesecstoceceecineeeeauterecesuterececueetareeazeeanenatecareeetetereeereearendes 15 SETUP 1 Setup 19 Nau UEL Le RE 19 PD79SIM User s Manual 1 2 Starting PO79SI Mee e arroen aaea AEN EE EELER 19 1 3 pd79sim SAUP EE 20 LA SIMO SUP tisha a HANAN HANNE NANBHAHAN A 22 WINDOW FUNCTION 1WINDOW FUNCTION OF PD79SIM 27 LD The ERGOE EE 27 T2 Program Window EE 33 1 3 Source WINdOW dia aaia aaa aaar a a i anaa aana aaaea akh 38 1 4 Register WINdOW ek 41 I5 Memory lte lee sf ces cerccesseeteveestetetececerececetecececetenatenstenataeevenateeetenereneteruteeetetetaters 43 1 6 DUMmp Klee 45 1 7 RAM Monitor Window gsineinonendocnon i G ae G E GE R 47 1 8 ASM Watch Wind 50 1 9 e Wath WNdOW E 53 let Be ec tele E 56 el Is CHA Window siitis dace dedindadin dad ndadindadadediadndindndindndinns 58 1 12 Global WINDOW assinei runa nna aranana nananana nanaawan aau ENEAN NE UNEEN AN NANA NNA 60 ege WINGOW see 26 25 hove heehee teehee eee Tea ete eta et PE etait 61 LIANO WINTON 2 ca cn sata eh 63 1 15 GU Fl nput WINGOW tege eee eet 80 1 16 GUL elle E 82 LL MR WINTON A AAKAAA AA AAA AAA ANA LARAMAN Aa APER EAR AEREE R AAE R araa Mie 84 1 18 Coverage WindOw EE 86 1 19 S W Break Point Setting Dialog BOX 0 ec eeeeee cence eteeeeeeeteeaeeeetetaeeeeeeeaaeees 89
81. SIM User s Manual 1 2 Tables of Commands In the following tables of commands commands shown with half tone screening can be executed at run time The abbreviated forms of commands are shown in parenthesis after the full command See the PD79SIM on line help for details of each command To display on line help enter the following from the PD79SIM Window menu Help gt Index 1 2 1 Execution Commands Command format Go G Go_ start address SE GoF ree colossus adie ooo erop O Leon el Stop target program isis target program STATUS STATUS Display status of target program execution Step number of steps Step execution at source level Se SE StepInstruction number of steps Step execution at machine language level OverStep O OverStep number of steps Over step execution at source level OverStepl nstruction Ol OverStep I nstruction number of steps Over step execution at machine language level RETurn RET Return execution at source level RETurntnstruction RETI RETurnInstruction Return execution at machine language level RESET RESET Reset target program 1 2 2 File Operation Commands Command format area to hex file area to mot file 1 2 3 Register Operation Commands Command format Register R 1 Register register name 1 Check value of specified register 2 Register register name set value 2 Set value of specified register 238 Table of Script Com
82. Setting GUI Input Window 2 Tochange the setup contents of a button Choose the GUI Input Window menus Option gt Set or the lt button asin 1 above Then point to the button whose setup contents you want to be changed and double click the left mouse button The dialog box shown below will appear Set Button Dialog Button Name Input a button name Select Button Type e Input Interrupt elt and Interrupt Spat head aot po fared Ryde ae eee eed when you press the button Input Address Input the address to which virtual port is input Data Input data for virtual port input Interrupt Input the vector address of virtual Vector interrupt Input the priority of virtual IPL interrupt Cancel Here change the setup contents of the selected button 5 5 Copying buttons Follow the procedure below to copy buttons 1 Choose the GUI Input Window menus Option gt Copy 2 Next move the mouse cursor into the GUI Input Window s input panel display area at which time the mouse cursor will have its shape changed to a cross 3 Whilein this state point to the button you want to copy and click the left mouse button 4 Next choose the GUI Input Window menus Option gt Paste A new button will be copied on to the button you ve selected with the left mouse button Or choose the GUI Input Window menus Option gt Set or the lt button After choosing the
83. Specify data length Byte Display in 1 byte units Wad Display in 2 byte units Dwad Display in 4 byte units Specify radix Display in decimal Display in hexadecimal Display as ASCII characters Display as SJ IS code Display as J IS code Refresh display Clear access attribute Layat Set layout Ae Turn on off ASCII strings RAM Monita Area Set RAM monitor area eet H Set color of access attribute display eg 2 Sampling pericd Set sampling period for RAM monitor P 49 PD79SIM User s Manual 1 8 ASM Watch Window The ASM Watch Window allows you to check the values at any specified address You can specify the point to watch as an address symbol or global variable as an address and bit No or as a bit symbol The display is updated after each command is executed 1 8 1 Structure of ASM Watch Window Toolbar Data display area wa Watch Window Add BirAaa Set Del De1Au Hex Dec Bin Expression display area Radix display area Address Bit No display area Data length display area The cursor position is indicated by a red mark in the address display area and data display area Click either area or use the up and down cursor keys to move the cursor e Double click the radix Rdx display area to switch the current radix for the data displayed in that area as follows gt hex decimal gt binary gt hex Provided the watchpoint is within the RAM monitor a
84. Symbols and labels can consist of up to 255 characters Uppercase and lowercase letters are unique You cannot include the assembler as79 structured instructions pseudo instructions macro instructions operation code or reserved words SECTION BYTE switch if etc You cannot use strings that start with two periods for symbols or labels Note 1 Local label symbol and scope PD79SIM supports both global label symbols which can be referenced from the whole program area and local label symbols which can only be referenced within the file in which they are declared The effective range of local label symbols is known as the scope which is measured in units of object files files with the r79 attribute The scope is switched in PD79SIM in the following circumstances When a command is entered The object file that includes the address indicated by the program counter becomes the current scope When the SCOPE command is used to set the scope the specified scope is the active scope During command execution The current scope automatically switches depending on the program address being handled by the command Note 2 Priority levels of labels and symbols The conversion of values to labels or symbols and vice versa is subject to the following levels of priority Conversion of address values Local labels Global labels Local symbols Global symbols Local labels outside current scope Local symbols outside curren
85. TE mm READ Se i Wang O01 EXTE wee READ gt 2 Click the Del button strl matt 002 BYTE 0012 z all g C 3 Click the Close button 1 Click the breakpoint to be deleted Click the Del All button to delete all breakpoints You can also click the breakpoint to be deleted then press the Delete key 129 PD79SIM User s Manual 6 Checking C Variables 6 1Checking C Variables 6 1 1 Checking C Variables in Source Program display The value of the C variable is displayed when the mouse cursor stand still about 0 5 seconds on the strings of the variable in the Program display PD79SIM C Usr mina PD PD79SIM Sample ncortO x79 Program Window To cl oj zl File Edit View Environ Debug Option ow OptionalWindo Help la xi l lala zl eje swi Mew sre Mix 91s Line Address Source E main int ES int jis int Zi char ch 0 char delta 1 strl b 5 strl c 10 forl i 0 i lt strl c i stri b Aga The value of the strl dLi e C variable is ae EEE displayed 130 Checking C Variables 6 1 2 Checking C Variables in Cwatch display PD79SIM has four windows for checking the C variables declared in the target program Local Window File Local Window Global Window C Watch Window The Local Window displays the values of variables that are valid only within a function To open the Local Window select the following
86. The following shows a description format while conditional expression statement or break statement If the conditional expression is true the statement is executed repeatedly If the conditional expression is false program execution exits from the loop Thewhile statement can be nested in up to 32 levels A break statement is used if it is necessary to forcibly exit the while statement If the while statement is nested program execution exits from the innermost loop Right side expressions can be used for the conditional expression The conditional expressions written in I O script are calculated as unsigned type Therefore if negative values are compared in an while statement the operation to be performed by PD79SIM is indeterminate 7 3 5 Comment Statements Comment statements are used to write comments in I O script The following shows a description format character string A comment statement starts from a semicolon A range of statement from the semicolon till the end of the line is handled as a comment Lines of comment statements are ignored when executing I O scripts 200 1 0 Script Function 7 4 Method for Writing Right side Expressions Right side expressions can be used to write the number of machine instructions or cycles vector addresses priority levels input values conditional expressions or pass counts in I O script statements as well as write expressions in if a
87. To our customers Old Company Name in Catalogs and Other Documents On April 1 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 17 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry w N E SAS 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is gran
88. Window 1 Setting Virtual Port Inputs in 1 0 Window 1 1 Overview The Virtual Port Input function allows you to simulate data inputs and similar other operations performed on the ports defined in the SFR Data can be input to memory at one of the following timings 1 If you want data to be input to some memory location with the lapse of time Data can be input when program execution has reached a specified number of cycles In this case set cycle synchronized inputs 2 If you want data to be input when some memory location is read Data can be input when the program accesses a specified memory location for read For example this method can be used in cases where you want a variable e g global variables located at fixed addresses to be assigned a value when it is read In this case set read access synchronized inputs 3 If you want data to be input when some virtual interrupt occurs Data can beinput when a specified virtual interrupt is generated F or example this method can be used in cases where memory for the SFR is referenced in an interrupt handler In this case set interrupt synchronized inputs 1 2 Setting Cycle synchronized Inputs To set cycle synchronized virtual port inputs choose the O Window menus Option gt Setup or the Setup button The dialog box shown below will appear Setup Dialog Select Type Set Virtual Port Input Set this item Set Virtual Port Output Set Virtual Interrupt
89. _AO_cnt 1 gt Keeps execution of I O script waiting for the int Oxffec 0x75 b amp 0x7 else waiti 100 number of cycles equal to the divide by ratio that is set for timer AO gt Generates a timer AO virtual interrupt Interrupt control register is referenced to determine priority gt Keeps execution of I O script waiting for 100 instructions gt Terminates procedure Once this I O script is registered in PD79SIM using the O window menus Option gt Load you can simulate the MR79 applications 216 Real time OS Debugging Function 2 Real time OS Debugging F unction 2 1 Checking Real time OS Information To check the Real time OS information either open the MR Window or execute the MR command from the Script Window See Section 7 1 Executing Script Commands in the Basic Operation Guide for details of using script commands Note Please use the startup file crtOmr a79 start a79 whose contents matches with the version of MR79 when you make downloaded program The MR window and MR command will not run properly if the startup file you uses don t match with the version of MR79 The following shows the configuration of the MR Window 217 PD79SIM User s Manual To display the task status Click TSK on the toolbar in the MR Window or select the following from the menu Option gt Mode gt Task The following shows the configuration of the MR Windo
90. a software break to break target program execution at a specified line address Use the S W Break Point Setting dialog box to set a software break point When you set a software break execution of the target program stops immediately before the software break point You can set up to 64 software break points If you set multiple software break points the target program stops as soon as execution reaches any of the software break addresses 4 1 Opening the S W Break Point Setting Dialog Box Click the SW button on the PD 79SIM Window toolbar Press function key F 7 to open the software breakpoint setting dialog box wie leis al BZ i aa Click the SW button You can also open the S W Break Point Setting dialog box by selecting the following from the PD79SIM Window menu Debug gt Break Point gt S W Break Point See Section 1 19 S W Break Point Setting Dialog Box in the Introduction for the structure of the S W Break Point Setting dialog box 120 Software Breaks 4 2 Setting a Break Point To specify an address as a break point In the S W Break Point Setting dialog box specify an address or label in the Address field as follows 2 Specify the address 1 Click the Address button mines 3 Click the Add button 4 Click the Close button To specify a line No as a break point In the S W Break Point Setting dialog box specify a filename and a li
91. a that has been set in graphic mode The peaks in this graph represent data values derived by equally dividing the height of the data displaying area by 255 maximum value of 1 byte data The short white lines appearing at the bottom of the input data display area indicate points at which data are input To reference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area Cycle count display area It displays cycle counts 70 Window function of PD79SIM 3 Hexadecimal mode The virtual port input that has been set is displayed in hexadecimal mode Input cycle Address i Address display area Input data display area Cycle count display area Address display area It displays the memory address to which a virtual port is input Input data displ r It displays the virtual port input data that has been set by hexadecimal numbers To reference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area Cycle count display area It displays cycle counts 71 PD79SIM User s Manual 1 14 5 2 Screen structure for read access synchronized inputs When you ve set virtual port inputs that are synchronized to memory accesses for read a display screen configured as shown below
92. address each time the conditional expression is established Left side expressions can be used to specify the memory address and right side expressions can be used to specify the conditional expressions and input values Specifications of left side and right side expressions are described later For example if following statements are written set sfetch Oxf0000 0x3 0x10 0x20 Hisfetch becomes true established when the program executes a specified address data 0x10 and 0x20 are sequentially input to memory address 0x3 each time the program executes address Oxf0000 Namely data 0x10 is input to memory address 0x3e1 when address Oxf0000 is executed first and data 0x20 is input when the address is executed next Format 3 set macro variable right side expression Function The right side expression is placed in a specified macro variable Specification of macro variables is described later For example following macro variables can be written set val 10 Macro variable val is initialized to 10 set val val 1 Value of the macro variable is incremented by 1 5 pass statement Format pass conditional expression pass count Function Execution of the next statement is skipped a number of times as specified by the pass count until the conditional expression is met Right side expressions can be used to specify the conditional statement and pass count Specification of right side expressions is described later For e
93. alog box A dialog box for setting up virtual port input timings will appear Setup Dialog Data Input Timing Read Access C Cycle C Interrupt Expressions can be input here Input Address Read Address Siani cycle End cycles VECO lt Prev Cancel First choose Read Access in the Data Input Timing column Next enter an address for virtual port input in the Input Address column the address to which you want data to be input using a hexadecimal number Then enter the address to be accessed for read to read data from memory in the Read Address column Virtual port inputs are executed when the memory address you ve specified here is accessed for read Then press the Next button Or press the Prev button here if you want to return to the previous dialog box 154 Setting Virtual Port Inputs in 1 0 Window A matrix dialog box for setting the virtual port input data will appear Read access counts Setup Dialog Finds the previous data you ve set UP or the next data DOWN The setup example in this element specifies that data 0x90 be set when memory is accessed for read 9 times Double click on an element you want and set the desired input value in it In this dialog box set the data you want to be actually input to memory F ollow the procedure below to set data 1 Move the mouse cursor to the read access counts location called an element where you want d
94. ame and custom window programs custom window s program 2 Add a specified custom command and custom window program custom window s program ccustom window program ccustom window programs MACROPATH MPATH 1 MACROPATH 1 Refrence the search directory that is set 2 MACROPATH directory_name 2 Set the directory where to search for custom command and custom window programs 1 2 17 Utility Commands Command format RADIX 1 RADIX 1 Check radix for input of constants 2 RADIX 2 8 10 16 2 Set radix for input of constants ALIAS 1 ALIAS 1 Check definition of command alias 2 ALIAS new name command name 2 Define command alias UNALIAS UNALIAS new name Delete specified alias UNALIASALL UNALIASALL Delete all aliases VERsion VER Display PD79SIM versions DATE DATE Display current date and time yymmdd and time ECHO ECHO MESSAGE Display specified parameter QUIT QUIT Quit PD79SIM CD 1 CD 1 Checks the current directory 2 CD directory name 2 Sets the current directory 242 Table of Script Commands 1 2 18 Supplementation explanation of Script Commands H ardwareBreak HB Setting and Checking Hardware Breaks Input format Format 1 Format 2 Format 3 Format 4 Format 5 H ardwareBreak H ardwareBreak address FETCH passes HardwareBreak address access condition passes H ardwareBreak address access condition passes size HardwareBreak address acc
95. as 195 7 2 Method for Writing I O Script 195 7 3 Composition Of 1 O Grip 197 7 4 Method for Writing Right side Expressions ccscceeeeeseeeeeeeeeeeeeteeeeeeeeeaaeees 201 PD79SIM User s Manual 7 5 Method for Writing Left side Expressions ceceeeeteeeeeeeeteeeeteteeeeeeenaeeeenee 204 8 Coverage Information 206 8 1 Referencing Coverage ENEE 206 8 2 Updating Coverage Display 206 Gebai EEN 206 8 4 Saving Loading Coverage Measurement Information 207 9 Customize F unction 208 9 1 About Customize FUNCION 20 cect e etter teeter eee teae ee eteaeeeettaaeeeeneaaeeeete 208 REAL TIME OS DEBUGGING 213 1 Executing MR79 Application Programs 215 1 1 Setting Timer Interrupts eect eee eeee ee eeetaee ee eeaeeeeeeaaeeeeteaeeeeeneaeeeeneaes 215 2 Real time OS Debugging F unction 217 2 1 Checking Real time OS Information 217 2 2 Measuring Sizes of System and Task Stacks Used AA 230 REFERENCE 235 1 Table of Script Commands 237 HEN Mulle en EI 237 13 2 Tables of ComMandS TE 238 2 Writing Script Files 253 2 1 Structural Elements of a Script File 253 2 2 Ui elle HE el ER 255 3 C Expressions 259 3 1 Writing Le e ET 259 3 2 Display Format of C EXPreSSiONs ecceceeeene eee eenee ee eeeceeeeeteaeeeeeeeaaeeeeteaeeeene 262 4 Error Messages 267 INDEX vi Introduction PD79SIM Introduction 1 PD79SIM Introduction The PD79SIM isa simulator debugger for Windows which simulates the 7900 series operation of
96. ata to be set then double click the left mouse button Or you can scroll the screen to go to the desired location 2 Input data in the selected place using a hexadecimal number The data size that can be input is one byte from 0x0 up to OxFF 3 Repeat steps 1 and 2 as many times as the number of data you want to set When you finished entering all data press the Next button A dialog box for saving the virtual port input data you ve set to a file virtual port input file will appear File name finput scr Save as type Script Files zc 7 Cancel 155 PD79SIM User s Manual Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into PD79SIM back again by using the I O Window menus Option gt Load or the Load button When you ve input a file name press the Save button Thus you ve finished setting the read access synchronized virtual port inputs 1 4 Setting Interrupt synchronized Inputs To set interrupt synchronized virtual port inputs choose the I O Window menus Option gt Setup or the Setup button The dialog box shown below will appear Setup Dialog Select Type l Set Virtual Port Input Set this item Set Virtual Port Output Set Virtual Interrupt Cancel Here choose the item Set Virtual Port Input and press the Next button Or press the Cancel button if you want cancel the setup session and close
97. atch points also in the pop up menu BitAdd ASM Watch of the Program Window 1 Click the BitAdd button to open the following dialog box Add Bir Aaa Set Del DerAn Hex Dec Bin 2 Spedfy the bit symbol If none has lt De defined Specify the address pat and bit No in the next fields Global Local 3 It is possible to select either the assembler s global symbol or gt local symbol Address Bit ance 4 Click the OK button To change the value at a specified address Select the watch point to change in the ASM Watch Window then click the Set button on the toolbar of the ASM Watch Window 2 Click the Set button Addr Bit Expr 000400 400 000400 datal LW Hex 4040404 000401 ata2 B Bin 0000 0100 000400 0 bit0 Bit 0 000500 500 B Hex 4 1 Click the watch point to be changed The Set dialog box opens Enter the new value 115 PD79SIM User s Manual To delete a watch point Select the watch point to be deleted in the ASM Watch Window then click the Del button on the toolbar of the ASM Watch Window 2 Click the Del button Add BirAaa Set Del DeiAu Hex Dec Bin Addr Bit Expr Rdx Data 000400 400 Hex 404 000400 datal LW Hex 4040404 000401 data2 B Bin 0000 0100 000400 0 bro Bit 0 000500 500 B Hex 4 1 Click the watch point to be deleted To delete all watch points click the DeAll
98. ater to map this part of memory 3 1 4 Interrupts In the actual MCU peripheral I O including external interrupt signals are generating factors for interrupts However PD79SIM has nothing corresponding to peripheral 1 0 PD79SIM provides another method in place of this which allows you to generate interrupts in a simulated manner virtual interrupt function Virtual interrupts can be generated at any time e g in a specified cycle or at an executed address 3 2 Operation of Instructions 3 2 1 WIT STP Executed as an NOP instruction Other instructions operate the same as those of the actual MCU PD79SIM User s Manual 3 3 Resetting TheS register is initialized to OFFFie For the PS register only the flag is set to 1 The reset vector is set to a value CO00i6 immediately after startup so that the program counter value immediately after PD79SIM has been invoked is OOCO0016 All other registers are initialized to 0 The SFR area is nonexistent in PD79SIM so the initialization as in the actual chip is not performed The cycle count is initialized to 0 Note that the device is reset when PD79SIM is invoked 3 4 Memory 3 4 1 Types of Memory The whole memory area 00000016to F FF FF F 16 is processed as RAM Areas except a space range from 000000i to OOF F FF isand a space 64 KB containing the interrupt vector area are not allocated to memory initially Use the map function to map memory to this area Spec
99. ay area of the Program Source Window to open the Disp Address dialog box 99 PD79SIM User s Manual Changing the display position at the line No level When the Program Source Window is in source display mode click the Address button from the Disp Area dialog box Click the Address button to open the Address dialog box Click the Line button in the Address dialog box to enter the new line No 1 Click the Line button 2 Specify the line No 3 Click the OK button To open the Address dialog box select the following from the PD 79SIM Window menu Option gt View gt Address You can also double click the address display area of the Program Source Window to open the Address dialog box Changing the position of the program counter Click the PC button in the Disp Area dialog box When you click the PC button the display position changes to the position of the program counter Change the position of the program counter select the following from the PD79SIM Window Option gt View Program Counter 100 Loading and Displaying the Target Program 1 9 Checking Source Programs in Other Directories You can specify the search path for source files This is helpful when the source files for target programs are stored in multiple subdirectories or not in the current directory This function allows you to check these source files and set software breakpoints etc from the Program or
100. ayed or erased when some value is written to a specified memory address or according to logic 1 or O in a bit LED LEDs are lit when some value is written to a specified memory address or according to logic 1 or 0 in a bit For details on how to create and set up an output panel refer to High end Debugging described later in this manual The screen configuration tool bar and menus of the GUI Output Window are explained here 1 16 1 Screen Configuration of GUI Output Window ES GUI Output Window Label LED Grid Load Save Output panel display area You can create edit or move labels and LEDs in the output panel display area The output panel you ve created can be saved to a file GUI output file 82 Window function of PD79SIM 1 16 2 Tool Bar of GUI Output Window Grid button Shows hides grid line Label button Save button Creates label Saves GUI output file l k Label LED Grid Load Save Set button Load button Edits or moves parts Loads GUI output file LED button Creates LED 1 16 3 Extended Menu of GUI Output Window If the GUI Output Window is active among the windows brought up in the main display area of PD79SIM the Option menu has the following menu items assigned to it Shattatkey e Edsomepts Ee D Joes co Jmgem Pete Patespts oa a Make Lag Crenteslabe Make LE Jeep Display Grid Line __ Shonshiesgidline 1 GE sae aeoe 83 P
101. be changed 4 1 1 Changing Setup Data of Virtual Port Inputs To change the setup data choose the menus Option gt Modify or the Modify button A dialog box like the one shown below will appear Modify Dialog Select this item Select Type SSS CG Modify Virtual Port Input C Modify Virtual Interrupt Cancel 166 Other Functions of 1 0 Window Here choose the item Modify Virtual Port Input and press the Next button Or press the Cancel button if you want cancel the session and close the dialog box A dialog box for selecting the virtual port input whose settings you want to be changed will appear Modify Dialog First choose the type of virtual port input you want to be changed in the Data Input Timing column When selected the currently set virtual port inputs are listed in the Select Data column Here choose the virtual port input you want to be changed Then press the Next button Or press the Prev button here if you want to return to the previous dialog box 167 PD79SIM User s Manual A matrix dialog box for changing virtual port inputs will appear Setup Dialog Here change the data for the selected virtual port input as necessary Data can be changed in the same way that data is set Refer to Section 1 Setting Virtual Port Inputs in 1 0 Window After changing the data press the Next button A dialog box for saving the virtual port inp
102. bles and C expressions in C source files You can use the ASM Watch Window to view labels and symbols in assembler source files You can use labels and symbols to specify the addresses of breakpoints etc First local then global labels and symbols are converted to values When you specify variables or functions defined in a C source file add the underbar _ before the name of the variable or function In the case of functions whose arguments are passed via registers specify See the Rules for Calling Functions in the nc79 User s Manual for specifications of functions whose arguments are passed via registers 2 8 On Demand Method PD79SIM supports the on demand method whereby a temporary file is created when a target program has been downloaded and the required debugging information is read into memory as required This method conserves memory However by default pd79sim uses the on memory method in which all debugging information is stored in memory Use the pd79sim setup to select the on demand or on memory method of storing debugging information See Section 1 3 pd79sim Setup in the setup section of this manual for details Temporary files are created with the filename pdb_xxxx tmp where xxxx is a 4 digit hexadecimal value in the directory containing the downloaded files Temporary files are deleted immediately before downloading and when you quit PD79SIM Select the on memory method if there is any file with t
103. board shortcut for command com located in the Windows directory For the keyboard shortcut thus created assign a file name xxxx pif xxxx denotes a name specified by the user and copies the file into the directory that contains makefile Thisfile becomes a pif file Don t specify a suffix pif when changing a file name Open a property dialog box for this file and input the same command in the command line of this dialog box that was input from the DOS window MS DOS Prompt Properties 2 xi Program Font Memory Screen Misc MS MS DOS Prompt LKS Cmd line Nmake exe makefile Working c WINS5US Batch file Shortcut key None Run N ormal window e IT Close on exit Input a command line Uncheck Advanced OK Cancel Apply To open the property dialog box choose Property from the menu that is displayed when you dick the right mouse button after selecting a pif file using the explorer etc 143 PD79SIM User s Manual 2 Register the pif filein PD79SIM Choose menus Debug gt Entry to bring up the dialog box shown below Use this dialog box to register the pif file Nake eene FF nut the directory to Argument which the pif file has been l Cancel copied Input a pif filename 3 Start up Make When you choose menus Debug gt Make the contents specified by the pif file are executed 9 3 Searching for Character Strings in Targe
104. bute is gof By reading this file from the GUI output window you can set up the output panel you ve created newly again 13 PD79SIM User s Manual 4 2 Output Files PD79SIM outputs the following files 4 2 1 Intel HE X format Files The Intel HEX format files store machine language data These files which are saved using PD79SIM s upload function take the attribute hei Files saved in the Intel HEX format can be downloaded by PD79SIM 4 2 2 Motorola S format Files The Motorola S format files contain machine language data These files which are saved using PD79SIM s upload function take the attribute mot Files saved in the Motorola S format can be downloaded by PD79SIM 4 2 3 Disassemble Files Disassemble files store the results of disassembling program memory These files which are reference text files take the attribute txt Disassemble files cannot be reassembled or downloaded 4 2 4 Log File The log file is a text file containing the results of executing the script commands This file which takes the attribute log contains the results from the logon point to the logoff point 4 2 5 View File The view fileis a text file that contains the contents of the script window In PD79SIM the last 1000 lines of the results of executing the script commands are stored in the view buffer The view file which takes the attribute viw contains the contents of the view buffer 4 2 6 Coverage Measurement Informat
105. cal Window Toolbar button Adds specified variable name to C watch window button button Sets SSES watch point dee of display cardinal number Cwatch Cwatch ge Cance Cancel button ence specified watch point button Adds specified variable name to C watch window by pointer You can register variables selected by clicking in the data display area as C watchpoints in the C Watch Window or change their values You can use C expressions to set the values For details of tokens that can be used in C expressions see Section 3 1 Writing C Expressions in the Reference part The addresses for pointers etc are displayed in hexadecimal regardless of the display radix See Section 3 2 Display Format of C Expressions in the Reference part for details of display formats 1 10 3 Extended Menus in the Local Window When one of the Local Window is active in the PD79SIM main display area the Option menu contains the following items Operations related to C function Register selected C variable as C watch point Register pointer of selected C variable as C watch point Set new value for selected C variable Cancel selection of C variable Change contents of display Change radix Layout Turn on off type name Sort Display String Display the string Display character 5 7 PD79SIM User s Manual 1 11 File Local Window The File Local Window lists local variables in the C file with their values The
106. can be input here Eeselen 10000 d 100000 a fee E7 Een Ca First choose Cycle in the Interrupt Generation Timing column Next specify the cycles at which you want a virtual interrupt to be started and ended for Start cycle and End cycle respectively using decimal numbers Then specify the vector address of the virtual interrupt to be generated in hexadecimal and the interrupt priority in decimal for Vector and Priority respectively Then press the Next button Or press the Prev button here if you want to return to the previous dialog box 162 Setting Virtual Interrupts in 1 0 Window A matrix dialog box for setting virtual interrupts will appear Setup Dialog Finds the previous data you ve set UP or the next data DOWN Up Down hi El Kl Edel rd el rel ee ea i l i E Bee cobb The setup example Toc a es ee ee ee ee in this element Ty a a r specifies that ii ee s virtual interrupt ai ae tele lel ei ae a ala a be generated at lt lt alata etal aleed delet detail eed tated detail a the 10 007th WW e PNC yde NR NN 10090 OoOO O o Point to the desired element and click the mouse button The selected element is marked by an asterisk lt Prev Next gt Cancel Next gt In this dialog box set the virtual interrupts you want to be actually generated Follow the procedure below to set virtual interrupts 1 Move the mouse curs
107. cle counts 771 PD79SIM User s Manual 1 14 7 2 Screen structure for executed address synchronized interrupts When you ve set virtual interrupts that are synchronized to executed addresses a display screen configured as shown below will appear Interrupt address _ e Ee Address Yeo Bet 1111 2131 41 5 6 718 9 10 w Execution 004444 X ki i 1X ce display i I Executed Vector Priority level Virtual interrupt display area address address display area display display area area Execut r ispl r It displays the fetch address the address where the program is executed at which time a virtual interrupt is generated Vector address display area It displays the vector address of a virtual interrupt Priority level display area It displays the priority level of a virtual interrupt Virtual interrupt display area It displays timings by an asterisk at which the virtual interrupt you ve set is generated When an asterisk is indicated it means that a virtual interrupt is generated When an asterisk is not indicated it means that a virtual interrupt is not generated Execution count display area It displays execution counts or a number of times the program has executed a specified address 78 Window function of PD79SIM 1 14 8 1 0 Window Tool Bar Delete button Deletes setup data Modify button Mode button Color button Changes setup data Changes display mode
108. ction to check addresses accessed during execution The coverage measurement function is realized using the CoVerage CV script command For details of using script commands see Section 7 1 Executing Script Commands in the Basic Operation part Input format Format 1 Format 2 Format 3 Format 4 Format 5 Function CoVerage CoVerage LOCAL GLOBAL TOTAL J starting_address ending_address CoVerage FUNC CoVerage CLEAR CoVerage DISP starting address for displaying the results of coverage The coverage function records addresses that have been accessed during execution of the target program CO coverage Torun coverage measurement and log access details Run the target program See Section 2 1 Starting and Stopping in the Basic Operation for details To check accessed addresses Use formats 2 and 3 You can check addresses from 00000016 to FF FFF F 16 Enter the following to check the results of coverage measurements between address 800016 and 8FFFiein 1 byte units format 2 CoVerage LOCAL 8000 8FFF Enter the following to check the results of coverage measurements between address 800016 and 8FFFiein 4 byte units format 2 CoVerage GLOBAL 8000 8FFF Enter the following to check the results of coverage measurements between address 800016 and 8F FF ie displayed as a percentage format 2 CoVerage TOTAL 8000 8FFF Enter the following to check the results of coverage measurements displayed as perc
109. d expression contains a syntax error it is displayed as follows str p lt syntax error gt all Radices where str p is the syntax error 265 PD79SIM User s Manual 3 2 10 Structure and Union Types When the result of calculation is a structure or union type the address is displayed in hex as follows Data v 0x1234 all Radices If as in structures and unions the C expression consists of members a is displayed to the left of the type name tag name indicating structure or union struct a strl 0x40E unsigned long b 15 signed int c 10 unsigned char 10 d 0x414 aaaaaaaaaa signed int signed i signed i signed i signed int i You can double click on lines indicated by a to see the members of that structure or union The changes to a while the members are displayed To return to the original display double dick the line now indicated by the This function allows you to check the members of structures and unions 3 2 11 Register Variables When the result of calculation is a register variable register is displayed to the left of the type name as follows register signed int j 100 266 Error Messages 4Error Messages The following tables list thePD79SIM error messages Can t open more name window The maximum number of the specified window is already open Can t Create name window Cannot open the specified window
110. d setting a button 8 To create another button repeat steps 1 to 7 above 5 3 Saving Buttons You ve Created When you ve finished creating buttons you can save the data setup contents and layout of the buttons you ve created to a file GUI input file The saved GUI input file can be loaded into PD79SIM back again by using the menus Option gt Load F ollow the procedure below to save the button data Choose the GUI Input Window menus Option gt Save or the Save button When selected the dialog box shown below will appear Save ButtonFile 24 x Save in a 10_Samples x Lei cel i File name finpanel btn Save as type Button Files btn 7 Cancel Here enter the directory and file names in which you want the button data to be saved When you ve input a file name press the Save button 183 PD79SIM User s Manual 5 4 Changing Button Position or Settings after Creating Button After creating buttons you can change their positions or setup contents 1 To change the position of a button Choose the GUI Input Window menus Option gt Set or the lt button Then point to the button whose position you want to be changed and click the left mouse button cou GUI Input Window The button is placed in a selected state when you ve clicked as shown above When in this state hold down the left mouse button while you drag the button to a position where you want it 184
111. d symbol for example it is recorded as an inactive C watchpoint Inactive C watchpoints are not included in the display of calculated results However if an inactive C watchpoint is recalculated and the result is valid it becomes an active C watchpoint Note that values cannot be assigned in the following C watchpoints Floating point type variables Bit field type variables Register variables C watchpoints that do not indicate addresses e Double click the radix Rdx display area to switch the current radix for the data displayed in that area as follows gt hex decimal gt binary gt hx gt e When RAM monitor function is effective and the C watch points are within the RAM monitor area the displayed values are updated during execution of the target program And the values of the accessed variables are colored The selecting the menu Option gt RAM Monitor gt Enable makes RAM monitor function effective or not 53 PD79SIM User s Manual Information about set C watchpoints is stored in the C watchpoint information file when you close the C Watch Window or exit PD79SIM When you re open the C Watch Window previously set C watchpoints are automatically restored AC watchpoint information file is created for each loaded object file and includes information on the name of the loaded object file When you set a new C watchpoint the program first searches for a C watchpoint information file w
112. ddress You can use the RAM Monitor Window to monitor the RAM monitor area PD79SIM Features 2 6 Break Functions PD79SIM has the following two break functions 2 6 1 Software Break Software breaks allow program execution to be stopped before the command at the specified address The point at which this break occurs is called the software breakpoint You can set software breakpoints from the S W Break Point Setting dialog box You can also easily set them from the Program Window and Source Window PD79SIM supports up to 64 software breakpoints You can set and read in the software breakpoint file via the S W Break Point Setting dialog box 2 6 2 Hardware Break Hardware breaks allow program execution to be stopped on detection of data being written to memory read from memory or an instruction being fetched The point at which this break occurs is called the hardware breakpoint You can set hardware breakpoints from the H W Break Point Setting dialog box PD79SIM supports up to 64 hardware breakpoints 2 7 Source Level Debugging Function You can display source files and perform source level debugging such as setting break points in the source lines and performing step execution PD79SIM allows debugging at the C language level and at the assembly language level You can use the Program Window and Source Window to view source files You can use the C Watch Window Local Window File Local Window and Global Window to view the C varia
113. display area Eat Change font The value changed is displayed in red 42 Window function of PD79SIM 1 5 Memory Window The Memory Window displays the contents of contiguous memory in address label and data contents of memory formats The display is updated after each command is executed Data can be displayed in binary decimal hexadecimal and ASCII You can open up to 10 Memory Windows You can use the Memory Windows to modify the contents of memory and also to fill and move specified blocks of memory 1 5 1 Address display area Structure of Memory Window ASCII SUIS JIS Refresh Cache lt Todbar Displayed when the address isSor DPR DPR LDPR JLDPR3 J 3 Contents of memory display area Label display area Double click the address display area to change the display starting address Double click a label or the memory display area to change the contents of memory The start and end address in the FILL and MOVE Dialog Box can be specified by selecting data in the data display area After the selecting when selecting the menu Option gt Debug gt Move or Option gt Debug gt Fill the start and end address of selected area are set in the MOVE or FILL Dialog 1 5 2 Memory Window Toolbar H ex button Displays data in hexaded mal default Bin button SJ IS button Refresh button
114. displays the contents of contiguous memory in dump format The display is updated after each command is executed You can open up to 10 Dump Windows You can use the Dump Windows to modify the contents of memory and also to fill and move specified blocks of memory 1 6 1 Structure of Dump Window Toolbar gt fa SMM SE E Een E B B B 3 1 1 09911 LHRH LLL CARRELLI 908 LLL weep ELH LL GA m Address display area Contents of memory display area GC de leede e Double click the address display area to change the display starting address Double click a label or the memory display area to change the contents of memory e The start and end address in the FILL and MOVE Dialog Box can be specified by selecting data in the data display area After the selecting when selecting the menu Option gt Debug gt Move or Option gt Debug gt F ill the start and end address of selected area are set in the MOVE or FILL Dialog Box 1 6 2 Dump Window Toolbar Hex Ibutton Displays data in hexaded mal default SJ IS button Refresh button Displays data in SJ IS code Refresh display Dec Hex ASCII SUS JIS Refresh Cache Dec button J 1S button Cache button Displays data in dedmal Displays data in J IS code Usethecacheof memory ASCII button Displays data in ASCII code
115. dow allows you to implement the user target system s simple output pane in a window The following parts can be arranged in this output panel Label character string User specified character strings are displayed or erased when some value is written to a specified memory address or according to logic 1 or O in a bit LED LEDs are lit when some value is written to a specified memory address or according to logic 1 or O in a bit Maximum number of parts that can be arranged Thetotal number of addresses that can be set for the parts created is 20 including addresses of all parts Therefore if the addresses set for each part all are different the maximum number of parts that can be arranged in the output panel is 20 f the number of addresses set for each part is less than 20 there is in effect no limit to the maximum number of parts that can be arranged The following explains how to create parts for the GUI Output Window 187 PD79SIM User s Manual 6 2 Creating Labels Follow the procedure below to create labels 1 Choose the GUI Output Window menus Option gt Make Label or the Label button 2 Next move the mouse cursor into the GUI Output Window s output panel display area at which time the mouse cursor will have its shape changed to a cross 3 Whilein this state click the left mouse button at a position where you want to create a label Hold down the left mouse button while you move the mouse curs
116. dow when you dick each of the above buttons respectively RQ Ready queuestatus Window function of PD79SIM 1 17 3 Extended Menus in the MR Window When the MR Window is active in the PD79SIM main display area the Option menu contains the following items GE G Change font EC Ra Ready Q Timeout Q Event Flag Semaphore Malo CydicHander AlarmHandler Memay Pad MR Context Layout Status Bar Switch display mode Display Task status Display Ready queuestatus Display Timeout queuestatus Display Event flag status Display Semaphcrestatus Display Maillbax status Display Cydehandler status Display Alarmhandler status Display Memory pod status Display Context Set Layout Switch display or non display of status bar 85 PD79SIM User s Manual 1 18 Coverage Window This window is used to measure the coverage CO coverage of each function in the currently downloaded C language program There are two types of coverage windows a coverage window that allows you to reference the start end addresses and the coverage of each function and a coverage source window that allows you to reference for each source line whether the target program has been executed or not 1 18 1 Structure of Coverage Window 1 18 1 1 Structure of Coverage Window Toolbar Coverage scope display area cou Coverage Window Coverage Base Address 000000 FEEF P Funct jon Start End main 180
117. dress display area to change the display starting address If the specified starting address is outside the RAM monitor area the RAM monitor area also changes The refresh rate during execution of the target program is displayed in the refresh rate display area Address is displayed when the target program is not running Note that due to the operating conditions the refresh rate may be slightly slower than that specified The following items have a great influence on the refresh rate Performance of and load on the host computer Window size amount of memory display The number of rewrites required the number of memory addresses at which values have been changed The background color for the display of data and ASCII code changes according to the access attribute as follows the background color is white if there is no access Areas accessed by READ Green Areas accessed by WRITE Red You can change the background color by selecting Option gt Color The display of access attributes is cleared the addresses are displayed as if not accessed when you select Option gt View gt Clear and after downloading a target program 47 PD79SIM User s Manual Note e Thereal time RAM monitor function acquires the data of the bus access Therefore changes in the RAM SFR area without the access by the target program are not reflected f you are displaying data in the RAM monitor area in 2 byte or 4 byte units
118. e Number of times a virtual interrupt is Data input to address 3 generated 65 PD79SIM User s Manual 1 14 2 Virtual Port Output Virtual Port Output is a function that when data is written to some memory address by the program allows the written data value to be recorded along with the cycle in which the data was written The recorded data can be displayed for your reference in chart numeric or graphic mode The maximum number of data that can be recorded by this function is 30 000 entries counted from the beginning of program execution For example if data is written to port 0 address 2 by executing a program like the one shown below pragma ADDRESS port 2H char porto out_port char data portO data Data is output to port 0 the data written to address 2 is recorded along with the cycle count in which the data was written 1 14 3 Virtual Interrupt This function defines interrupt generation Using this function you can generate timer interrupts or AD conversion interrupts in a simulated manner without having to actually generate them There are following three types of virtual interrupts 1 Cycle synchronized interrupt A specified virtual interrupt can be generated when program execution has reached a specified number of cycles The diagram below shows an example of a virtual interrupt that is synchronized to machine cycles Example where virtual interrupt of vector address Oxffec timer AO
119. e FLG line and select Layout gt gt Hide FLAGs The radix in the flag item will not change Liv yuu LITA Flag register item The name of the currently set flag is displayed Also IPL is displayed as a decimal number Hide DPR1 3 The radix item does not appear in Layout the pop up menu displayed over Font the register window 112 Checking and Setting Register Data and Memory Contents Toadjust column width The width of each of the Name Value and Radix columns in the register window can be adjusted Drag the separator to doso Also double clicking on the separator will automatically adjust the width to the length of the longest character string 3 3 Checking Changes in RAM During Target Program E xecution Use the RAM monitor function to check changes in the contents of memory while the target program is running Check the changes in memory during execution using the RAM Monitor Window To open the RAM Monitor Window select the following from the PD79SIM Window menu Basic Window gt RAM Monitor Window See Section 1 7 RAM Monitor Window in the Window Functions for details of the RAM Monitor Window To change the RAM monitor area PD79SIM has a 1KB RAM monitor area which by default is mapped to 0 to 3F Fie If you want to check another area you must change the RAM monitor area To do so dick the Area button on the toolbar in the RAM Monitor Window or make sure the RAM Mon
120. e PD 79SIM Window menu Debug gt Stop Note If when the target program stops the program counter is in an area with no source line data the Program Window automatically switches to MIX display mode To start the target program from a specific address Select the following from the PD 79SIM Window menu Debug gt Go gt Go Option The Go dialog box opens Enter the starting address To check if the target program is running The current execution status is displayed at the right end of the status bar in the PD 79SIM Window MCU RUN Target program is running MCU STOP Target program is running 106 Starting and Stopping Target Program Execution 2 2 Step Execution Click the Step button on the PD 79SIM Window toolbar Or press F 3 HI lslal m kel swi Click the Step button When the Program Window is in source program mode each line of the source program is executed step by step When the Program Window is in disassemble mode each instruction is executed step by step You can also start step execution by selecting the following from the PD 79SIM Window menu Debug gt Step gt Step To execute subroutines as single instructions in sten mode Executing subroutines as single instructions in step mode is called as over step execution Click the Over button on the PD 79SIM Window toolbar Or press F 4 sjef Asia sl zl sw Click the Over button Y
121. e Virtual Interrupt C Delete I O Script File To delete virtual port inputs that have been set choose Delete Virtual Port Input To delete virtual port outputs that have been set choose Delete Virtual Port Output To delete virtual interrupts that have been set choose Delete Virtual Interrupt To delete I O script files that have been set choose Delete I O Script File When you ve selected one follow the procedure bel ow to delete 171 PD79SIM User s Manual 4 2 1 Deleting Virtual Port Input After selecting Delete Virtual Port Input press the Next button to bring up the dialog box shown below Delete Dialog First choose the type of virtual port input you want to be deleted in the Data Input Timing column When selected the currently set virtual port inputs are listed in the Select Data column Here choose the virtual port input you want to be deleted Then press the Delete button Or press the Prev button here if you want to return to the previous dialog box Thus the virtual port input is deleted Press the Close button to close the dialog box 172 Other Functions of 1 0 Window 4 2 2 Deleting Virtual Port Output After selecting Delete Virtual Port Output press the Next button to bring up the dialog box shown below OOO3EO Here choose the virtual port output you want to be deleted Then press the Delete button Or press the Prev button here if you want to return to
122. e at the program counter is highlighted in yellow The Program Window is automatically opened in the main display area of the PD79SIM Window when you start PD79SIM The Program Window can be used for executing the target program up to the cursor position set or cancel software breakpoints using the mouse and displaying reverse assembles of the target program etc Double click the software breakpoint display setting area to set or cancel software breakpoints By choosing menus Option gt Line Assemble after clicking on a program display area you can perform line assemble beginning with the position you have clicked 1 2 1 Structure of Program Window The Program Window has three display modes source disassemble and mixes source with disassemble The structure of the Program Window is described for each display mode below 1 2 1 1 Structure of Program Window in Source Display Mode The source display mode is provided for debugging at the source level You can check the source files of the target program in source display mode File name display Toolbar Current program counter ES Program Window sample c View SRC MIX DIS Address H p _dir Dit ent_start 0x01 up_down 0x01 Lal moche 0x10 timer_a taQ_icon asm tCL1 while 1 Source line Software breakpoint display setting area display area Address display area Program display area The line No
123. e displayed However if the third argument is omitted e measurement results displayed for all tasks information on only the first line is displayed First line Task ID number task name the start and end addresses of the task stack area and the result of stack usage measurement indicated in percent Second line The size of the actually used stack in bytes Third line The size of the entire stack area in bytes 232 Real time OS Debugging Function gt mr stk tsk lt RET gt 1 _main 000922H 000985H 20 00 2 _task2 000986H 0009E 9H 56 00 3 _task3 QOO9EAH 000A4DH 32 00 4 _task4 OOOA4EH O000AB1H 22 00 5 _task5 OOOAB2H 000B 15H 1 0 00 gt mr stk tsk 3 lt RET gt 3 _task3 OOO9EAH 000A4DH 32 00 Stack size used is 32 bytes Stack size whole is 100 bytes gt If the measurement result is 100 a comment is displayed to the right of the stack usage measurement result indicated in percent to the effect that the stack may have overflowed gt mr stk tsk lt RET gt 1 _main 000922H 000985H 1 100 00 overflow 2 _task2 000986H O009E 9H 56 00 3 _task3 OOO9EAH 000A4DH 100 00 overflow 4 _task4 000A4EH 000AB1H 22 00 5 _task5 OOOAB2H 000B 15H 1 0 00 gt mr stk tsk 3 lt RET gt 3 _task3 OOO9EAH 000A4DH 100 00 overflow Stack size used is 100 bytes Stack size whole is 100 bytes gt If the task stac
124. e identical to those of the Program Window See Section 1 2 4 Extended menu in the Program Window under Window Functions for details 40 Window function of PD79SIM 1 4 Register Window The Register Window shows the contents of the registers and flags The display is updated after each command is executed You can click the buttons corresponding to registers in the Register Window to quickly change the values of the registers and flags 1 4 1 Structure of Register Window Register names The value of the registers Radix of the values You double click to change register values Display the shot cut menu when dicked the right button of the mouse Flag display area You can click these buttons to change flag 1 4 2 Extended Menus in the Register Window When the Register Window is active in the PD79SIM main display area the Option menu contains the following items Turn on off DPR1 3 registers display area Set layout Turn on off radix Hide FLAGs Turn on off flags display area Fat Change font 41 PD79SIM User s Manual 1 4 3 Shortcut Menu of the Register Window Press the right button of the mouse on the register display area in Register Window to display shortcut menu Right click Display in hexadecimal Display in decimal Display in binary HideDPR1 3 Turn on off DPR1 3 registers display area Layout Set layout Hide Radix Turn on off radix Hide FLAGs Turn on off flags
125. e left mouse button Or you can scroll the screen to go to the desired location 2 Input data in the selected place using a hexadecimal number The data size that can be input is one byte from 0x0 up to OxFF 3 Repeat steps 1 and 2 as many times as the number of data you want to set When you finished entering all data press the Next button A dialog box for saving the virtual port input data you ve set to a file virtual port input file will appear File name finput scr Save as type l Script Files scr Cancel 157 PD79SIM User s Manual Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into PD79SIM back again by using the I O Window menus Option gt Load or the Load button When you ve input a file name press the Save button Thus you ve finished setting the virtual interrupt synchronized virtual port inputs 158 Setting Virtual Port Outputs in 1 0 Window 2 Setting Virtual Port Outputs in 1 0 Window 2 1 Overview The Virtual Port Output function allows data values written to some memory address by a program to be recorded along with cycles at which data was written Therecorded data can be displayed for verification in graphic or numeric form The maximum number of data that can be recorded by this function is 30 000 entries counted from the beginning of program execution 2 2 Setting Virtual Port Outputs To set vir
126. e window then select the following from the PD79SIM Window menu Option gt View gt Refresh 3 8 Checking and Changing Memory Map Data Execute the map command MAP from the Script Window to check memory map data F or details of using script commands see Section 7 1 Executing Script Commands in the Basic Operation part To check memory map data Simply enter the MAP command Memory map data is then displayed in the Script Window gt MAP To change memory map data Enter the following to map memory space from address F 1000016 to F 1100016 gt MAP F 10000 F 11000 The PD79SIM simulator divides the memory space between 00000016 and FF FFF F 16 into sixteen parts so that memory can be in 64KB blocks The above command therefore maps memory form F 1000016 to F 1F FFF 16 Note Memory that has been mapped cannot be deleted 3 9 To change the acquisition mode of the memory The Memory Window and the Dump Window have internal cache storing the 512 Kbytes memory data for quick displaying When the window is resized or scrolled within this 512 K bytes memory area the memory of the area is not accessed To disable this caching click the Cache button or select the menu Option gt CacheOn When the memory cache is disabled the memory out of the display is not accessed and if the display area changes by scrolling and resizing the memory is accessed 119 PD79SIM User s Manual 4 Software Breaks Use
127. e with time out double wait The following are displayed in the flg_mode area TWF ANDW Waiting for all bits specified in wait bit pattern to be set AND wait TWF_ANDW TWF_CLR When an AND wait has occurred and the task is in the wait status the event flag is cleared to 0 TWF ORW Waiting for any bit specified in wait bit pattern to be set OR wait TWF_ORW TWF_CLR_ When an OR wait has occurred and the task is in the wait status the event flag is cleared to 0 Each display area can have its display width changed by dragging the mouse to the desired position In TSK mode the horizontal scroll bar is not displayed In TSK mode you can double click the mouse in the Real time OS status area to display the Context dialog box The Context dialog box contains context information about the task of the line in which the mouse was double clicked See To display task context for details of the Context dialog box 1 These states are supported by MR79 V 2 00 or later These states are not displayed for the target programs using earlier versions of MR79 than that 219 PD79SIM User s Manual To display the status of the ready queue Click the RQ button on the toolbar of the MR Window or select the following from the menu Option gt Mode gt Ready Q The following shows the configuration of the MR Window in ready queue status mode el MR Window TskJ RQ TiM FLG sem Mpx cyH ALH MPL Current Run Task 18
128. ea provided the script file is not being executed The Script Window can record the history of the executed commands to a file This function is not the same as the log function This function records not the result but only the executed commands so the saved files can be used as the script files 6l PD79SIM User s Manual 1 13 2 Script Window Toolbar button button Closes script file Clears view buffer button button button ape script file ely log file Stop Recording the executed commands Run Step ep Chore Close PA Log0ff View Clear RecOn eclit Open button utton Opens script file Gd view buffer RecOn button button Log button p the executed commands to a file Step executes script file u log file 1 13 3 Extended Menus in the Script Window When the Script Window is active in the PD79SIM main display area the Option menu contains the following items Script file operations Open script file Run script file Stop execution of script file One step execution of script file Close script file View buffer operations Save view buffer file Clear view buffer Log file operations Open log file Start output to file Close log file stop output to file Record theexeauted cammancs Record theexeauted cammancs toa file Stoo Recording the exeauted commands 62 Window function of PD79SIM 1 14 1 0 Window This window is used to set and display virtual port input outputs or virtual interrupts
129. ear Before data Next data 179 PD79SIM User s Manual When you choose Before data here data is searched backward from the position you ve specified by dicking the mouse button If you choose Next data here data is searched forward from the position you ve specified by dicking the mouse button 4 7 Listing Registered I O Script Files The registered I O scrip files can be listed on the screen For details about I O script files refer to Chapter 7 I O Script Functions The following shows how to list Click here and 1 O script files will be listed I O Script File v t KumiFtimer 4 8 Regarding Evaluation Timings of Virtual Port Inputs Virtual Interrupts and I O Script Files Set The virtual port inputs virtual interrupts and I O script files you ve set are evaluated at the following timings Evaluation timings When program is executed continuously when come is executed When program is single stepped When program is overstepped When control is returned Processing when program is reset The virtual port inputs virtual interrupts and I O script files that you ve set are reevaluated Namely when a program is reset the virtual port inputs virtual interrupts and 1 O script files you ve set are set newly again Processing when I O Window is closed If the I O Window is closed the virtual port inputs virtual interrupts and I O script files that you ve set are not evaluated This case i
130. ecution of the Assemble command the command input area of the Script Window changes toa mnemonic input field See Section 7 1 Executing Script Commands in the Basic Operation for details of how to use script commands Enter the mnemonic for line assembling The following shows the Script Window when waiting for a mnemonic to be input STOP pen Close Log0n Les View Clear Log 0001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ADDRESS 0 1 2 3 4 5 6 7 8 9 A B C 4D E F ASCII 000200 00 S Ga 0000 ADDRESS gt LABEL PROGRAM F0000 db 100 200 map idb 100 200 Wiel Enter command data Mnemonic input field To exit the line assemble mode Specify Enter in the mnemonic input area The Script Window changes back to the status in which it waits for a script command to be entered 142 Miscellaneous 9 2 Starting Up Make The operation conventionally used to Make the target program after entering commands from the DOS window can be performed from PD79SIM The following shows the procedure for performing Make in PD79SIM 1 Create a pif file Follow the procedure below to create the pif file a b LO Create a key
131. ed from and into the coverage window 4 1 10 ASM Watch Point Data File The ASM watch point data file contains data on the ASM watch point that is input from the ASM Watch window The file extension is wpt and the file itself can be read from the ASM Watch window 4 1 11 C Watch Point Data File The C watch point data file which is created automatically by PD79SIM stores information on the C watch points recorded in the C Watch Window The file attribute is cwp This file is stored in the Windows directory the directory in which you installed Windows It cannot be created or edited by the user 4 1 12 Software Breakpoint File The software breakpoint file which takes the suffix ork contains the software breakpoint settings You can read in this file via the SW Breakpoint dialog box to set the software breakpoints 4 1 13 1 0 Script File This file contains a description of virtual port inputs and virtual interrupts The created I O script file is read from the I O Window Thefile attribute is scr 4 1 14 GUI Input File This file contains definitions of the key pane created in the GUI input window that have been saved toa file The file attribute is btn By reading this file from the GUI input window you can set up the panel key you ve created newly again 4 1 15 GUI Output File This file contains definitions of the output panel created in the GUI output window that have been saved to a file Thefile attri
132. eed Reliability cannot therefore be placed on the results of execution after an error has been detected 2 2 Writing Expressions PD79SIM allows you to use expressions for specifying addresses data and number of passes etc The following shows example commands using expressions gt DB TABLE1 gt DB TABLE1 20 2 2 1 Elements of Expressions You can use the following elements in expressions Constants Symbols and labels Macro variables Register variables Memory variables Line Nos Character constants Operators The following describes the respective elements 2 2 2 Constants x 0x None hH None oo Ing Examples OxAB24 1234 12340 10010 AB24h 10010b vo can only specify when the predetermined radix is hexadecimal e fyou are inputting a radix that matches the predetermined radix you can omit the symbol that indicates the radix excluding binary 255 PD79SIM User s Manual Use the RADIX command to set the predetermined value of a radix However in the cases shown below the radix is fixed regardless of what you specify in a RADIX command Line No Dec No of executions No of 2 2 3 Symbols and labels You can include symbols and labels defined in your target program or symbols and labels defined using the Assemble command You can include alphanumerics the underscore _ period and question mark in symbols and labels However do not start with a numeric
133. elect Option gt Refresh from the menu The display of the coverage source window is automatically updated when the program has stopped 8 3 Initializing Coverage Toinitialize the coverage measurement information press the Clear button on the toolbar or select Option gt Clear fromthe menu All coverage figures are cleared to 0 206 Coverage Information 8 4 Saving Loading Coverage Measurement Information The coverage measurement information can be saved to a file and the saved information can be loaded from a file into the computer In this way measurement can be started immediately following the previous one To save coverage measurement information To save coverage information select the following from the PD79SIM window menu when the coverage window is active Option gt File gt Save A coverage save dialog box will appear when the above are selected from the menu A path can be added to the file name that is specified here If a file name extension is omitted the default file extension cov is added If an existing file name is specified for the file name here the file will be overwritten A file selection dialog box appears when you click on the lt Refer gt button A file name can be specified in this dialog box also The coverage information is saved to the specified file when you click lt OK gt To load coverage measurement information To load data from a file that contains the c
134. emporary file is created when you download the target program and the required debugging information is read from that file into memory as it is required When you select Environ gt Init from the PD 79SIM and select On Memory or On Demand from the Init dialog box the specified method is valid from the next time you download a target program Specifying temporary directory in on demand mode PD79SIM creates a temporary file when the target program has been downloaded using the on demand method This temporary file is created in a specified directory If no directory is specified the temporary file is created in the directory where the downloaded file exists Switches of Init dialog box ON OFF of restarting Specify whether the I nit dialog box should be opened when restarting PD79SIM Check Next Hide to stop the nit dialog box being opened when you next start pd79sim If you want to display the I nit dialog box when you next start pd79sim select I nit gt Environ from the PD 79SIM Window menu then uncheck Next Hide in the nit dialog box You can also force the I nit dialog box to be displayed when you start up by pressing and holding the Ctrl key when starting pd79sim ON OFF of Ending State Resume F unction Specify whether or not you want PD79SIM to be started up in its previously terminated window display state If you check Resume check box PD79SIM starts up in the same window display state as it was terminated previ
135. ent of substitutive auxiliary circuits ii use of nonflammable material or iii prevention against any malfunction or mishap Notes regarding these materials These materials are intended as a reference to assist our customers in the selection of the Renesas Technology product best suited to the customer s application they do not convey any license under any intellectual property rights or any other rights belonging to Renesas Technology Corporation Renesas Solutions Corporation or a third party Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage or infringement of any third party s rights originating in the use of any product data diagrams charts programs algorithms or circuit application examples contained in these materials All information contained in these materials including product data diagrams charts programs and algorithms represents information on products at the time of publication of these materials and are subject to change by Renesas Technology Corporation and Renesas Solutions Corporation without notice due to product improvements or other reasons It is therefore recommended that customers contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor for the latest product information before purchasing a product listed herein The information described here may contain technical inaccuracies or typo
136. ent statement gt Beginning of procedure gt Initializes divide by cycle setup variable gt Keeps execution waiting until a write to count start flag is performed gt Checks timer As count start flag gt Selects timer A clock divide by value that is set in timer A clock division specifying register gt Selects count source that is set in timer AO mode register gt Selects f2 else if 0x56 b amp Oxc0 0x40 set mr_AO cnt 16 gt Selects f16 else if 0x56 b amp OxcO 0x80 set Ymr_AO cnt 64 else set Ymr_AO cnt 512 Jelse if 0x45 b amp 0x03 0x1 if Ox56 b amp OxcO0 0x0 set Dom AU cnt 1 gt Selects f64 gt Selects f512 gt Selects f1 else if 0x56 b amp OxcO 0x40 set Dom AU cnt 16 gt Selects f16 else if 0x56 b amp OxcO 0x80 set Ymr_AO cnt 64 else set Y mr_AO cnt 4096 Jelse if 0x45 b amp 0x03 0x2 if Ox56 b amp OxcO0 0x0 set Dom AU cnt 1 gt Selects f64 gt Selects f4096 gt Selects f1 else if 0x56 b amp OxcO 0x40 set Ymr_AO_ cnt 64 gt Selects f64 else if 0x56 b amp OxcO 0x80 set Ymr_AO cnt 512 else set Y mr_AO_ cnt 4096 while 1 if 0x40 b amp 0x01 0x01 gt Selects f512 gt Selects f4096 gt while statement gt Checks timer AO s count start flag waitc 0x46 w Y mr
137. entages of subroutines functions format 3 CoVerage FUNC To initialize the previous results of coverage measurements Use format 4 Enter the following to initialize the results of coverage measurements CoVerage CLEAR PD79SIM User s Manual To check and set the starting address for displaying the results of coverage measurements Use format 1 or format 5 If you omit the starting or ending address when checking the results of coverage measurements the system displays 1KB of results from the display starting address Enter the following to check the display starting address for the results of coverage measurements CoVerage Enter the following to specify address CO0000 6 as the starting address for displaying the results of coverage measurements CoVerage DISP C0000 If without specifying a starting or ending address you check the results of coverage measurements after setting the display starting address to C000016 the display extends from C0000i6 to CO400i16 246 Table of Script Commands MR Display status of real time OS MR79 Input format Format 1 MR TSK Displays the task status Format 2 MR RQ R Displays the ready queue status Format 3 MR TIM TOUT T Displays the timeout queue status Format 4 MR FLG FLAG F Displays the event flag status Format 5 MR SEM S Displays the semaphore status Format 6 MR MBX M Displays the mailbox status Format 7 MR CYH CYC C Displa
138. er Displaying active tasks Useformat 9 Enter the following to display active tasks MR RTSK Displaying system clock count Use format 10 Enter the following to display the system clock count MR STIM If the system clock is not used the following message is displayed System Time is not used Displaying task context Use format 11 Enter the following to display the context of task 1 MR CTX 1 If task Lis running RUN the following message is displayed TaskID 1 is Running status If task 1 is dormant DMT the following message is displayed Task ID 1 is Dormant status 250 Table of Script Commands To display the memory pool status Use format 12 Enter the following the display the status of the memory pool MR MPL The following items are displayed ID Ip No of memory pool Base address of memory pool Block size of memory pool Total Total block count of memory pool Free Number of unused blocks and information on unused memory blocks bit information Because of the differences between fixed length and variable length the contents of the ID area differ as follows Fixed length F is displayed with the memory pool ID No Variable length V is displayed with the block ID NO In this case the block ID is enclosed in parentheses In the case of variable length memory pools nothing is shown in the Total area is displayed No bit information is shown in the Free area either
139. er names You can specify either 2 2 6 Memory variables Use memory variables to use memory values in expressions The format is as follows address data size You can specify expressions in addresses you can also specify memory variables The data size is specified as shown in the following table Word 2 byte length Double word 4 byte length 257 PD79SIM User s Manual The default data size is word if not specified Example 1 Referencing the contents of memory at address 800016 in bytes 8000h B Example 2 Referencing the contents of memory at address 800016 in words 8000h W Example 3 Referencing the contents of memory at address 800016 in double words 8000h D 2 2 7 Line Nos These are source file line Nos The format for line Nos is as follows 2 2 8 line_no line_no source file name Specify line Nos in decimal You can only specify line Nos in which software breaks can be set You cannot specify lines in which no assembler instructions have been generated including comment lines and blank lines If you omit the name of the source file the line Nos apply to the source file displayed in the Program Window Include the file attribute in the name of the source file Do not include any spaces between the line No and name of the source file Character constants The specified character or character string is converted into ASCII code and processed as a constant 2 2 9
140. ertain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electro
141. es a syntax error results 3 2 Display Format of C Expressions C expressions in the data display areas of the C Watch File File Local and Global Windows are displayed as their type name C expression variable name and result of calculation value as shown below unsigned char gcpp Ox4E4F ABC signed short int gsho 32768 signed char vi gscp 0x4E5 1 TC r E S JI 7 d F Sech S A nsigned char guc igned char gc Result of calculation value C expression variable name The following describes the display formats of the respective types 262 C Expressions 3 2 1 Enumeration Types When the result value of calculation has been defined its name is displayed DATE date Sunday all Radices If the result value of calculation has not been defined it is displayed as follows DATE date 16 when Radix is in initial state DATE date 0x10 when Radix is hex DATE date 0000000000010000B when Radix is binary 3 2 2 Basic Types When the result of calculation is a basic type other than a char type or floating point type it is displayed as follows unsigned int i 65280 when Radix is in initial state unsigned int i OxFF00 when Radix is hex unsigned int i 1111111100000000B when Radix is binary When the result of calculation is a char type it is displayed as follows unsigned char c Idi when Radix isin initial state unsig
142. ess condition passes size reference data Comparison condition The following table shows the values that can be specified for access condition size and comparison condition READ R WRITE W RW BYTE B WORD W Comparison condition lt gt lt gt l5 Function Hardware breaks allow you to stop target program execution on detection of data being read from or written to memory or on detection of an instruction fetch PD 79SIM allows a maximum of 64 hardware breakpoints to be set Touse hardware breaks use the BreakM ode command as shown below to enable the break BreakMode ON Checking hardware break settings Use format 1 Enter the following to display the contents of the hardware break setting HardwareBreak Stopping program execution on execution of the instruction at the specified address Use format 2 Enter the following to stop execution of the target program on execution of the instruction at address 8000016 HardwareBreak 80000 FETCH Enter the following to stop execution of the target program on 10th execution of the instruction at address 8000016 HardwareBreak 80000 FETCH 10 If not specified the default number of passes is 1 This also applies to other formats 243 PD79SIM User s Manual Stopping program execution when data at the specified address is accessed Use formats 3 4 or 5 The following table shows the differences between the respective formats Use
143. eter Turn on off line No area Address Area Turn on off address area 88 Window function of PD79SIM 1 19 S W Break Point Setting Dialog Box The S W Break Point Setting dialog box allows you to set software break points Software breaks stop the execution of instructions immediately before the specified break point You can also enable and disable each of those break points 1 19 1 Structure of S W Break Point Setting Dialog Box Loads a breakpoint Saves a breakpoint information file information file Field for specifying a break address if specifying an address fee E break point Fields for specifying Pass Leet searches for filename filename line No Closes dialog box if specifying filename line No SN Break Point WB bactes specified break point Deletes all break points 008I0C VJ sarple c E 42 sanple c Enables specified break point Enables all break points EE Disabies specified break point d TAER EIS tt Disables all break points 018000 el samele c 018050 Area for setting software break points You can set up to 64 software break points in PD79SIM f you have set multiple software breakpoints program execution stops when any one software break address is encountered OR conditions You can continue to set software breakpoints until you click the lt Close gt button to close the S W BreakPoint setting dialog box You can dear enable or disable softwa
144. exist are displayed in gray The executed non executed information in the program display area is automatically updated when the program has stopped If you want to see some other function double dick on the desired function in the coverage window The window can be scrolled through functions providing that they exist in the same source file Theline No display area and address display area can be displayed or hidden by selecting or canceling Option gt Layout gt Line Area and Option gt Layout gt Address Area Note that by default the address display area is hidden 1 18 2 Coverage Window Toolbar button Update displayed coverage measurement Refresh Clear button Initialize coverage measurement 87 PD79SIM User s Manual 1 18 3 Extended Menus in the Coverage Window 1 18 3 1 Extended Menus in the Coverage Window When the Coverage Window is active in the PD79SIM main display area the Option menu contains the following items Menu Menu options Taste Barerta G Change fot a pa Lemmer O o KEE aa Input output coveragemeasurement result files Savecoverage measurement result file Load average mesurament result file Set layout ee Turn on off address area 1 18 3 2 Extended Menus in the Coverage Source Window When the Coverage Source Window is active in the PD79SIM main display area the Option menu contains the following items EE SEELEN ma st oot aa Set layout
145. expressions can be used to specify the number of cycles Specification of right side expressions is described later For example if following statements are written waitc 10000 set 0x800 0x10 the set statement is executed only after executing the program 10 000 cycles 3 int statement Format int vector address priority Function The virtual interrupt of a specified vector address is generated in a specified order of priority Right side expressions can be used to specify the vector address and priority Specification of right side expressions is described later For example if following statements are written int Oxffec 5 a timer AO vector address Oxffec interrupt is generated at priority level 5 4 set statement There are following three formats for the set statement Format 1 set memory address input value Function The input value is input to a specified memory address virtual port input to memory Left side expressions can be used to specify the memory address and right side expressions can be used to specify the input value Specifications of left side and right side expressions are described later For example if following statements are written set 0x2 Oxl1d data 0x1d is input to memory address 0x2 198 1 0 Script Function Format 2 set condition expression memory address input value 1 input value 2 Function The input value 1 input value 2 etc are sequentially input to a specified memory
146. f type name Sort Display String Display the string Display character RAM Monita Display RAM monitor Enable Turn on off RAM monitor area RAM Monita Are Set RAM monitor area Cda Set color of access attribute display Sampling pericd Set sampling period for RAM monitor Clear Clear access attribute 55 PD79SIM User s Manual 1 10 Local Window The Local Window lists local variables in the C function with their values The display is updated after each command is executed 1 10 1 Structure of Local Window Function name which File name which contains contains program counter Toolbar program counter Scope display area Filename char c GI unsigned char _near_const_volatile_uchar 0x9 unsigned char _near_const_volatile_char OxB Cunsigned char ne unsigned char _near_volatile_char 0x10 char _near_const_schar 0x0 unsigned char _near_const_uchar Ox unsigned char _near_const_char 0x9 char _near_schar 0x10 unsigned char _near_uchar 0x10 unsigned char _near_char 0x10 Display of variabletype Dispaly of variable value Data display area Dispaly of variable name When performing step execution etc and there is a change in the function that includes the address specified by the program counter previously displayed variables are cleared and the local variables in the new function are automatically displayed 56 Window function of PD79SIM 1 10 2 Lo
147. f you agree to each article in the Software License Agreement please fill out and return your Registration Fax Contents Contents INTRODUCTION 1 PD79SIM Introduction 3 2 PD79SIM Features 4 2 1 Multi Windowing Function 00 0 eect e eee eee eeeee ee eteaaeeeeteaaeeeeteaaeeeeeecaaeeeeneaaeees 4 22 O Simulation F UNCEH ON teint Aids 4 2 3 Interrupt Simulation Functon cece ee eenee etter cece ee eeeaeeeeteaaeeeeecaaeeeecaeeeeeeaes 4 2 4 Simplified System Simulation F UNCON 000 e ee eecee ee eeeeeeeeteaeeeeteaeeeeeeaes 4 2 5 RAM Monitor FUNCCION 00 0 cece eee eece ee eee e ee ee eeaaee ee ecaeeeeenaaeeeeneaaeeeeneaeeeeeeaae 4 26 Te Die e E 5 2 7 Source Level DebuootngFuncion eect cette ee eeneeeeeeeaeeeeteeaeeeeeteaaeeeeneaeeeeeeaes 5 2 8 On Demand Method 2 tedden didi tin i eee 5 3 PD79SIM Simulation Specifications 6 3 1 Main Differences to Actual MCU ooo cece ee eeneeeeeeeeeeeeteaeeeeteaeeeeeecaaeeeeneaaeees 6 3 2 Operation of Instructions eect eect ee tece cette tea ee ee eteaaeeeeecaaeeeetcaaeeeeteaaeeeeecaaeees 7 EH eg TL DEE 8 314 MOMORY EE 8 3 5 Virtual Port Input FUNCION netini a aei Ae AA AA Ias 9 3 6 Virtual Port Output Function sssssssssssessssrsssssirrssrrrnssriinnsstinnsntinnnntnnnnninnnsnnnnnnnn nnn 9 3 7 Virtual Interrupt Fundion ennnen en 9 ER EUR Dal el lgl at Elo ele e i a aaa aa a E A AA E AEE EENE AKENE E 10 ERC REIBEL ge EE 10 B 10 1 O SGrIptF UMGEION EEN 10 3 11 Unique Simulator FUNCION
148. files are nested the current script file is closed and the next higher level script file iS opened To execute a script file on PD79SIM startup Specify the name of the script file to be executed on startup in the I nit dialog box which is displayed when you start PD79SIM Init File Reter TABCI S2 E Font FreedSys Sie 11 Font Debug Information Specify the name of the script file to be executed on startup On Memory On Demand f pm CC lt 7 lt CC F Net Hide Resume r AutoDownload ee Cancel 139 PD79SIM User s manual 8 Exiting PD79SIM 8 1 Exiting PD79SIM Select the following from the PD79SIM Window menu File gt Exit A confirmation dialog box is displayed Click OK to exit K Do you really want to exit SS E Click the OK button 140 Miscellaneous 9 Miscellaneous 9 1 Line Assemble There are two methods for line assembling the source program one using a line assemble dialog box and one using a script command 9 1 1 Line Assembling from Dialog Box Click on a position in the Program Source Window that you want to be line assembled and choose menus Option gt Line Assemble A line assemble dialog box like the one shown below will appear If you do not specify a position input the desired address in this dialog box after it is open NOP insertion ooog Address input field Code input fidd X flag M
149. flag Program display area Input the address you want to be line assembled and the assemble instruction in the address input and the code input fields then hit the return key The line that is highlighted in the program display area of this dialog box is the address to be line assembled Ifthe number of instruction bytes input is fewer than that of instruction bytes before the change insert a NOP instruction to make the number of bytes matched If the number of instruction bytes input is greater than that of instruction bytes before the change a warning dialog box is opened Press the OK button in this dialog box and the instruction you have input will be written to the program If you press the Cancel button PD79SIM abandons writing the instruction If NOP insertion is turned off no NOP instruction is inserted even when the number of instruction bytes input is fewer than that of instruction bytes before the change If warning output is turned off the instruction you have input is forcibly written to the program without bringing up a warning dialog box By dicking on a line in the program display area of this dialog box you can choose the line to be line assembled 141 PD79SIM User s Manual 9 1 2 Line Assembling from Assemble Command Execute the assemble command Assemble A from the Script Window for line assembling Specify the address for line assembling after the command gt Assemble assembl e address On ex
150. from the PD79SIM Window menu Basic Window gt C Watch Window gt Local Window The File Local Window displays the values of variables that are valid only within the file To open the File Local Window select the following from the PD79SIM Window menu Basic Window gt C Watch Window gt File Local Window The Global Window displays the values of global variables To open the Global Window select the following from the PD79SIM Window menu Basic Window gt C Watch Window gt Global Window The C Watch Window displays the values of any variables To open the C Watch Window select the following from the PD79SIM Window menu Basic Window gt C Watch Window gt C Watch Window You cannot select the referenced C variables in the Local Window File Local Window or Global Window The variables displayed in the respective windows change with the current position of execution of the target program Local Window The variables displayed change according to the function currently being executed File Local Window The variables displayed change according to the currently executing source file Global Window This lists the C global variables regardless of the execution position Use the C Watch Window to check C variables Use the C Watch Window to check C variables Note Thereis a possibility that compiler arranges a different variable in the same address for optimization
151. gram Window which follows the program counter the Source Window is not updated until you specify Use the Source Window to check what is happening in specific subroutines and tasks You can open up to 10 Source Windows Other functions are the same as in the Program Window 1 3 1 Structure of Source Window The Source Window has three display modes source disassemble and mixes source with disassemble The structure of the Source Window is described for each display mode below The Source Window has the same structure as the Program Window See Section 1 2 1 Structure of Program Window under Window Functions for details 1 3 1 1 Structure of Source Window in Source Display Mode The source display mode is provided for debugging at the source level You can check the source files of the target program in source display mode File name display Toolbar TUE Function timer_aQint Q interrupt section KEREN oid near timer_adint port0 Oxff indicate Source line Software breakpoint display setting area display area Address display area Program display area 38 Window function of PD79SIM 1 3 1 2 Structure of Source Window in MIX Display Mode In MIX display mode the source program is displayed with the results of its disassembly The source program is displayed in a different color from the results of disassembly File name display Toolbar ES Souro ow Vie SRC MIX DIS Line Address BRK Ob
152. graphical errors Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage liability or other loss rising from these inaccuracies or errors Please also pay attention to information published by Renesas Technology Corporation and Renesas Solutions Corporation by various means including the Renesas home page http www renesas com When using any or all of the information contained in these materials including product data diagrams charts programs and algorithms please be sure to evaluate all information as a total system before making a final decision on the applicability of the information and products Renesas Technology Corporation and Renesas Solutions Corporation assume no responsibility for any damage liability or other loss resulting from the information contained herein Renesas Technology semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake Please contact Renesas Technology Corporation Renesas Solutions Corporation or an authorized Renesas Technology product distributor when considering the use of a product contained herein for any specific purposes such as apparatus or systems for transportation vehicular medical aerospace nuclear or undersea repeater use The prior written approval of Renesas Technology Corporation and Renesas Solutions Corporation is necessary to reprint or re
153. have its display width changed by dragging the mouse to the desired position In ALH mode the horizontal scroll bar is not displayed 227 PD79SIM User s Manual To display the memory pool status Click the MPL button on the toolbar of the MR Window or select the following from the menu Option gt Mode gt Memory Pool The following shows the configuration of the MR Window in memory pool status mode ee MR Window ID FEA Blk size Total Blix ent Free Blk_ent map F 1 002000H 80 2 l F 2 002400H 10 10 9 111111111 F 3 002600H 30 16 15 1111111111111110 VIC 001AF6H 24 SS 2 000000H 56 VI 000000H 120 VJ 4 O01CD6H 248 The following items are displayed in MPL mode The items are displayed in order of ID No for all memory pools defined in configuration fixed length first followed by variable length ID 1 ID No of memory pool BaseAddr Base address of memory pool Block size of memory pool Total Blk ot Total block count of memory pool Free Blk_cnt map Number of unused blocks and information on unused memory blocks bit information In MPL mode the status bar is not displayed Because of the differences between fixed length and variable length the contents of the ID area differ as follows Fixed length F is displayed with the memory pool ID No Variable length V is displayed with the block ID NO In this case the block ID is enclosed in parentheses
154. he items required for setting up the operating environment Start am Startup function settings TESA smie open Custarizedialog box RS 1 1 3 5 Debugging Basic The Debug menu in PD79SIM contains the items for basic debugging such as starting and stopping and one step execution of the target program Start target program Run from current program counter Run from specified address Step execution Execute one step Step Option Execute specified No of steps Over step execution E xecute one over step Over Option Execute ene ified No of over steps be Fseoneun raven rmurene strane F5 Break Point Set break point SMW Break Point Open S W Break Point Setting dialog box F 7 H W Break Point Open H W Break Point Setting dialog box Shift F 7 Break Set cancel software break at cursor Sen beanmsaen IER Stoo stop target proram T EE Som Emery makete O O O Make Make target program SSS 30 Window function of PD79SIM 1 1 3 6 Debugging Option The extended menus in PD79SIM contains the items for operating the various PD79SIM windows The items on the extended menus differ according to which window is active The functions of the items on the extended menus are described under the respective windows Menu Jwen options __ Function Shortcut keys This menu contains the extended menus for the various PD79SIM windows 1 1 3 7 Window Operations The BasicWindow menu has assigned to it the men
155. he left of the type name indicating pointer type Te Watch Window Add Add Del Delai Set Cancel Radix FAfunsigned char x ecpp Ox4E4F ABC signed short int gsho 32768 signed char x gscp 0x4E51 C signed long gl 2147483647 unsigned char gcp CIA struct _GSDATA sch 0x5D59 unsigned char sc 71 unsigned char guc signed char gsc 73 3 You can double click on lines indicated by a to see the members of that structure or union The changes to a while the members are displayed To return to the original display double click the line now indicated by the 3 2 4 Array Types When the result of calculation is an array type other thanachar type the starting address is displayed in hex as follows signed int 10 z 0x1234 all Radices When the result of calculationisachar type it is displayed as follows unsigned char 10 str 0x1234 Japan all Radices If the string contains a non printing code prior to the code to show the end of the string 0 it is displayed up to the non printing character and the closing quote mark is not displayed unsigned char 10 str 0x1234 Jap all Radices Also if the string contains more than 80 characters the closing quote mark is not displayed When the C expression is an array type as same as pointer type a is display to the left of the type name You can see
156. he same name as the temporary file Temporary files are created in the directory specified from the nit dialog box If the specified directory contains a file of the same name as the temporary file change the directory where you want the temporary file to be created or choose the on memory method PD79SIM User s Manual 3 PD79SIM Simulation Specifications 3 1 Main Differences to Actual MCU This section describes the main differences between PD79SIM and the actual MCU See later sections for details 3 1 1 Realtime Timings Time management by PD79SIM is performed in cycles However the following differs from the actual chip Here the number of cycles are indicated by values stipulated in 7900 Series Software Manual The bus width queue and wait states are not considered when measuring the number of cycles e PD79SIM starts counting cycles immediately after a reset Cycles immediately after a reset are 0 Thenumber of cycles needed to execute one machine instruction are added on for each instruction executed See Figure 3 1 shown below If four cycles are required for the LDA instruction cycles are added at this point in time If two cycles are required for the CMP instruction cycles are added at this point in time CMP instruction 0 1 2 3 4 5 6 7 8 9 Execution cycles LDA instruction Figure 3 1 Method for measuring In the above example no cycles are added while the LDA or CMP instruction is bei
157. hoose the arrow before double clicking on the button you ve created 6 A dialog box for setting the action to be performed by the button like the one shown below will appear For this button action set one of virtual port input virtual interrupt or virtual port input plus virtual interrupt Set Button Dialog Button Name Key 1 Input a button name Select Button Type c Input c Interrupt Specify the action to be performed when you press the button Input Address Input the address to which virtual port is input Data Input data for virtual port input Interrupt mm Input the vector address of virtual Vector Tee interrupt la a_i ooo interrupt en 1 Assign the button a name Input your desired name in the Button Name column 182 Setting GUI Input Window 2 Specify the action to be performed when you press the button in the Select Button Type column Choose Input for virtual port input Choose Interrupt for virtual interrupt Choose Input and interrupt for simultaneous generation of virtual port input and virtual interrupt 3 If you ve selected virtual port input enter the address to which you want data to be input and the data to be input in the Input column If you ve selected virtual interrupt enter the vector address and the priority IPL of the virtual interrupt in the Interrupt column 7 Press the OK button in the dialog box Thus you ve finished creating an
158. icient memory Quit other applications or increase ad a DEE program is running 1410 Start address is larger than end address o 01 Fr eem 1412 Can t find sourcelines which include that There is no source line information at the address specified address 1413 That command has not yet supported ee 1418 Specified times of number is over than 65535 1421 Memory alignment error 1422 j lllegal register is specified 272 Error Messages 1500 There was sent undefined data from simulator 1501 Can t read write because there are no Use the MAP command to allocate memory memory at that area 1502 Number of points exceeds the limit num No more points can be set 1503 _ Point already set Fae 1504 Breakpoint of other type already set No hardware breakpoint set at specified address 1506 Can t get enough memory Can t set more I O script file Max 20 Only a total of 20 1 0 script file procedures virtual port inputs and virtual interrupts ca be registered in I O window Can t set more virtual output Max 20 The maximum number of virtual port output that can be registered is 20 1510 Specified level of priority out of range a e o Le mpewe Jl DECHE 1704 The connection with the target isn t created ee 1705 _ Can t connect with the target eee 1707 Time Out ERROR A time out error occurred in communication with the target system Communication ERROR Connection to the
159. ify the interrupt vector area in the MCU file See Section 1 3 pd79sim Setup in the Setup for details of how to specify MCU file 3 4 2 Memory Structure and Initial Values Immediately after Starting The memory is set up as follows immediately after starting PD79SIM 00000016 to 0000F F 16 SFR area Filled with 0016 00005F 16 Set to 3Ci6 00010016 to OOF FF F 16 Filled with 7416 NOP interrupt vector area Filled with 7416 NOP reset vector area Set to C0001656 other area No memory immediately after starting 3 4 3 The Map Function MAP Command The PD79SIM simulator divides the memory between 00000016 and FFF FFF into 256 equal parts so that the memory space can be mapped in 64K B blocks Memory spaces which contain a map having the lowest ordered addresses 00000016 and OOF FF Fig and the interrupt vector area are allocated to memory when the simulator starts Use the MAP command to map the simulator memory Memory mapped using this command is initialized with the value 7416 NOP immediately after being allocated When downloading a target program the memory is mapped automatically Note Memory space that has been mapped cannot be deleted 3 4 4 Accessing an Area Without Memory If you access an area which is not allocated to memory the system issues an error of Improper access to memory and interrupts execution of a program or a command whichever is specified Note that if this occurs when executing a program no err
160. ing and ending addresses of the source area and the starting address of the destination area When the Move Dialog Box open after selecting the area by mouse in the Memory Window or in the Dump Window the start and end address of the area are set in this Dialog box Start Address End Address L Enter the starting address of the source area 2 Enter the ending address of the source area 3 Enter the starting address of the destination 4 Click the OK button Move Address 118 Checking and Setting Register Data and Memory Contents 3 7 Updating the Memory Display When you execute a command setting filling moving memory stopping execution or step execution etc that changes the contents of memory the memory display in the Memory Window and Dump Window is automatically updated However if an area such as I O which is changed without any relationship to MCU execution is displayed there may be a discrepancy between the data displayed and the actual contents of memory In this case you can display the latest contents of memory in the Memory Window by dicking the Refresh button on the toolbar in the Memory Window or making the Memory Window the active window then selecting the following from the PD79SIM Window menu Option gt View gt Refresh To display the latest contents of memory in the Dump Window click the Refresh button on the toolbar in the Dump Window or make the Dump Window the activ
161. ing the members of structures and unions using the comma Example struct S int member1 char member2 struct S STRUCT struct S STRUCT_P In this case STRUCT member1 STRUCT_P member correctly checks the members 260 C Expressions 3 1 7 Member Reference Using Arrow You can only use variable_name gt member_name for checking the members of structures and unions using the arrow Example struct S int member1 char member2 struct S STRUCT struct S STRUCT_P In this case STRUCT gt member1 STRUCT_P gt member2 correctly checks the members 3 1 8 Parentheses Use the and to specify priority of calculation within an expression 3 1 9 Arrays You can usethe and tospecify the elements of an array You can code arrays as follows variable name element_Noor variable variable name element_Noor variable element_Noor variable etc 3 1 10 Casting to Basic Types You can cast to C basic types char short int and long and cast to the pointer types to these basic types When casting to a pointer type you can also use pointers to pointers and pointers to pointers to pointers etc Note that if signed or unsigned is not specified the default values are as follows Basic type Default Dos stones Note You cannot cast to floating point C basic types float and double You cannot cast register variables 3 1 11 Casting to typedef T
162. ints at which data are output To reference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area Cycle count display area It displays cycle counts 74 Window function of PD79SIM 2 Graphic mode displayed in units of bytes Virtual port output results are displayed in graphic mode in units of bytes Output cycle Cycle 104642904620 49505280561059406270860069305 O003EO Cycle count display area EE LCrCt Address Output data display area display area Address display area It displays the address to be monitored for virtual port output tput data displ r It displays the data as virtual port output results in graphic mode in units of bytes The peaks in this graph represent data values derived by equally dividing the height of the data displaying area by 255 maximum value of 1 byte data The short white lines appearing at the bottom of the output data display area indicate points at which data are output To reference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area Cycle count display area It displays cycle counts 15 PD79SIM User s Manual 3 Hexadecimal mode Virtual port output results are displayed in hexadecimal mode Ou
163. ion File This is a binary file that contains the results of coverage measurements The file attribute is cov This file can be saved and loaded from and into the coverage window 4 2 7 ASM Watch Point Data File The ASM watch point data file contains data on the ASM watch point that is input from the ASM Watch window The file extension is wpt and the file itself can be read from the ASM Watch window 4 2 8 Software Breakpoint File The software breakpoint file which takes the suffix ork contains the software breakpoint settings You can save this file via the SW Breakpoint dialog box to set the software breakpoints 14 PD79SIM Input and Output Files 4 2 9 1 0 Script File This file contains definitions of virtual port inputs and virtual interrupts set or created in the I O Window that have been saved to a file 4 2 10 GUI Input File This file contains definitions of the key panel created in the GUI input window that have been saved toa file The file attribute is btn This file is saved from the GUI input window 4 2 11 GUI Output File This file contains definitions of the output panel created in the GUI output window that have been saved to a file Thefile attribute is gof This file is saved from the GUI output window 4 2 12 Virtual Port Output File This file contains the results of virtual port outputs specified in the O Window that have been saved toa file This file is referenced by PD79SIM whe
164. is displayed in the Context area An error dialog box is displayed if you specify a non existent task ID in the Task ID area You can also enter a task ID No in the Task ID area then click the lt Get gt button to open the Set Context dialog box Use the Set Context dialog box to set the context values of the specified task When you dose the Set Context dialog box the Context area is updated to show the context information with the new settings See To change the task context for details of the Set Context dialog bog An error dialog box is displayed when the task entered in the Task ID area is in the RUN or DMT state or you specify the ID No of a task that does not exist Click the lt Close gt button to close the Context dialog box 229 PD79SIM User s Manual To change the task context Enter the task ID No in the Task ID area of the Context dialog box then click the lt Get gt button to open the Set Context dialog box Use the Set Context dialog box to change the value of the specified context register of the specified task The following shows the configuration of the Set Context dialog box Set Context Data Task ID 9 Register DP1 D Cancel The task ID No you entered in the Task ID area of the Context dialog box is already displayed in the Task ID area of the Set Context dialog box when it is opened Specify the name of the register for which the value is to be set in the Regi
165. ister value will open up Lu yuuYy LISA When the flag window is not open P 0 Either click on the line where FLG is displayed or select the line and press the Enter key Flag values can be changed in the same way as register values IPL IN Vim x DJTjZ c 0 00000100 To Change Register Window Layout Changing window size When window size is changed the contents of the window are laid out to fit the new window size Eg Register Wind Bisi EZ A scroll bar is added where necessary Flags are assigned depending on window and font size 111 PD79SIM User s Manual To hide the radix item With the Register Window active either select Option gt gt Layout gt gt Hide Radix from the menus or click the right mouse button on the register window list area and select Layout gt gt Hide Radix Mei x Eg Registe WAR Olx PGP 004000 Hex PG 00 Hex PC 4000 Hex DT 00 Hex F FFFF Hex To hide the DPR1 3 Register item With the Register Window active either select Option gt gt Layout gt gt Hide DPR1 3 from the menus or click the right mouse button on the register window list area and select Layout gt gt Hide DPR1 3 DPI 0000 Hex OPO 0000 Hex DP 000 Hex IZ IP Il E B BB fex BD Lt Bin a I Bin To hide the flag item With the Register Window active either select Option gt gt Layout gt gt Hide F LAGs from the menus or click the right mouse button on th
166. ith information on a file with the same name as the currently loaded object file If an appropriate file is found C watchpoints are restored from the information in that file 1 9 2 C Watch Window Toolbar Set button Sets specified C watch point Add button button button Adds a C watch point Deletes specified C watch point Cancels specified C watch point _ Add Add Del DelAll Set Cancel Radix f button j DelAll button button Adds a C watch point by pointer Delete all C watch points Switch of display cardinal number You can delete or set new values for C watchpoints selected by clicking in the C watchpoint display area You cannot delete only additional information such as the members of structures displayed when recording C watchpoints The addresses for pointers etc are displayed in hexadecimal regardless of the display radix See Section 3 2 Display Format of C Expressions in the Reference part for details of display formats 54 Window function of PD79SIM 1 9 3 Extended Menus in the C Watch Window When the C Watch Window is activein the PD79SIM main display area the Option menu contains the following items rete C watch point SECH Register C watch point Add Pante Register C watch point pointer Delete selected C watch point Set new value for selected C watch point Cancel selection of C watch point Delete all C watch points Change contents of display Change radix Layout Turn on of
167. itor Window is active then select the following from the PD79SIM Window menu to open the RAM Monitor Area dialog box Option gt RAM Monitor Area Enter the starting address of the RAM monitor area The RAM monitor area is also changed when you double click the address display area in the RAM monitor window to change the display starting address In this case if the specified display starting address is not within the current RAM monitor area a confirmation dialog box is displayed asking whether or not to adjust the RAM monitor area Click the OK button to adjust the area To change the sampling period The contents of memory displayed in the RAM Monitor Window are automatically updated at regular intervals The default sampling period is 100 ms To change the sampling period make sure the RAM Monitor Window is active then select the following from the PD79SIM Window menu to open the Sampling Period dialog box Option gt Sampling Period However depending on operating conditions updating may be slower than specified 113 PD79SIM User s Manual 3 4 Checking the Value at a Specified Address Use the watch function to check the value at a specified address Check the value at the specified address in the ASM Watch Window The address is called as the watch point To open the ASM Watch Window select the following from the PD79SIM Window menu Basic Window gt ASM Watch Window If the specified watch
168. jcode Label Source Mnemoniic S DOIT E x DEMO m EEN int sub int i asm nop 04 sub NOP asm nop 04 NOP asm nop 04 DI 04 0013 nop Label display area Source line Object code display area display area Sass Ol Sl Kai Cd BS Fal Ae IRS IS SS im jo IC o Software breakpoint display setting area Address display area Program display area 1 3 1 3 Structure of Source Window in Disassemble Display Mode The disassemble display mode is provided for debugging at the instruction level You can check the results of disassembling the target program in disassemble display mode Toolbar Address display Label display area arga Object code display area Software breakpoint display setting area Program display area 39 PD79SIM User s Manual 1 3 2 Shortcut menus in the Source Window The Source Window shortcut menus is similar to that of the Program Window See Section 1 2 2 Shortcut Menus of the Program Window under Window Functions for details 1 3 3 Source Window Toolbar The Source Window toolbar is the same as that in the Program Window See Section 1 2 3 Program Window Toolbar under Window Functions for details 1 3 4 Extended Menus in the Source Window When the Source Window is active in the PD79SIM main display area extended menus for the Source Window are allocated to the Option menus The extended menus of the Source Window ar
169. k area is out of the scope of stack usage measurement no stack usage measurement result is displayed gt mr stk tsk lt RET gt 1 _ main 000922H 000985H KKK 2 _task2 000986H 0009E9H x0 3 _task3 0009EAH 000A4DH 0 4 _task4 QO0A4EH O00AB1H 5 _task5 000AB2H 000B15H gt mr stk tsk 3 lt RET gt 3 _task3 0009EAH 000A4DH 0 gt If a nonexistent task D number is specified in the third argument an error message Task ID is out of range will be displayed gt mr stk tsk lt RET gt 1 _main 000922H 000985H 20 00 2 _task2 000986H 0009E 9H 56 00 3 _task3 0009EAH 000A4DH 32 00 4 _task4 OOOA4EH O00AB1H 22 00 5 _task5 OOOAB2H O00B 15H 0 00 gt mr stk tsk 6 lt RET gt ERROR 1221 Task ID is out of range gt 233 PD79SIM User s Manual MEMO 234 Reference 236 Table of Script Commands 1 Table of Script Commands 1 1 Input Format The format for entering PD79SIM script commands is as follows 1 Insert one or more spaces or tabs between the command and its parameter s 2 You can use uppercase and lowercase letters and numerics for the command Description of symbols used in command format Command format XXXX XXXX must be input XXXX XXXX is optional X1 X2 X3 One of X1 X2 or X3 must be input X1 X2 X3 Input can be omitted or you can input one of X1 X2 or X3 237 PD79
170. le 1025 The operandis able tobe opposites 1 nos Kat Stesel er Thearray varibleisilegat JI 1026 rne essential number of array Eilen SS 029 The operand must be an addressvaiue O OOOO 269 PD79SIM User s Manual 1030 Type casting for register variable is notbe supported 1031 _ The type of type casting is illegal fe 1032 Type casting for that type is notbe su ported 1033 This expression can not be exchanged for some address value 1100 Address value is out of range Specified address exceeds MCU s maximum address of FF FFFFh for Description ofAsserbly anguageisiie 1 e AdoressvalueforJ UMP is out ofrange o e operand valueis out ofrange O O OoOO 1108 Description of expression siege 1 1105 Addressing mode specified is aerer mor loperandvalueisundefine Jl a eit symbotisin expression JI Iaaupranpdeg JI p10 symbol valueisnot enger La sameitems are mutiplespeatied 1 La samexing items aremultipespecite Lo characters existinexoressin OOOO p14 Format speciiedisnot appropriate FER ne 1116 invalid reservedword exstinpwrand OOOO pire Reserved woraismisng 1 Los fno space after mnemonic or direaive 1 DEE EC 1124 operand sizeis EE 1125 operand typeis nat appropriate y ai size or format specfiedis not appropriate o y ps2 sizespeciiedismissing JI va stringvalueexst in sores 1 DEER p35 symbol ismuttipledeined JI E ai symbol ismuttipiedeined OOOO 1138 invalid operand exist in instrudio
171. lect the following from the PD79SIM Window menu Option gt Debug gt Set When the Set dialog box opens enter the address to be changed and the new data Address 1 Specify the address Data 2 Specify the new data length Byte 7 3 Select the data length Byte Word or DWord 4 Click the OK button You can also double click the data display area in the Memory Window or Dump Window to open the Set dialog box 117 PD79SIM User s Manual Tofill a specified area with data With the Memory Window or Dump Window active select the following from the PD79SIM Window menu Option gt Debug gt Fill When the Fill dialog box opens enter the area to be filled and the fill data When the Fill Dialog Box open after selecting the area by mouse in the Memory Window or in the Dump Window the start and end address of the area are set in this Dialog box Fill x Start Address 1 Specify the starting address of the area to be filled End Address 2 Specify the ending address of the area to be filled Data 3 Specify the fill data 4 Select the data length Byte Word or Dword 5 Click the OK button Length To move the contents of a specified area to another area With the Memory Window or Dump Window active select the following from the PD79SIM Window menu Option gt Debug gt Move When the Move dialog box opens enter the start
172. lect the following from the PD79SIM Window menu Environ gt Customize The Customize dialog box to configure the operation of the PD79SIM Customize Open the confirmation dialog box when exit M Exit debugger when the error occurs m Display full path file name in Program Source Window F Try to change your selected display mode on the program window when stop Cancel Open the confirmation dialog box when exit Exit debugger when the error occurs Display full path name in Program Source Window Try to change your selected display mode on the program window when stop 146 Miscellaneous 9 8 To Open the Editor The following show how to open the editor which you usually use 1 Registering the Editor Select the pop up menu Entry Editor in the Program window and specify the editor program and their parameters in the following dialog box You can specify the parameters of F asthefilenameand L as the line number to the editor if the editor is possible About parameters of the editor you use refer the manual of the editor Editor Option Editor Ic Program Files MEGASOFT MIW Miw exe Refer Specify the editor Parameter Pea Specify the parameter kemmer F Number L i Cancel 2 Opening the Editor Select the pop up menu Open Editor in the program window 147 PD79SIM User s Manual MEMO 148 High end Debugging 150 Setting Virtual Port Inputs in 1 0
173. loading automatically even if the target program is updated 1 4 Changing Program Display Position Immediately After Downloading When you download a target program in PD 79SIM The Program Window displays the source program at the position of the program counter after the target program has been reset If there is no source line data at this program counter position the startup program for example has no source line data the program is displayed in disassemble mode If after downloading a target program you want to automatically display a source program such as the main function you must first specify the name of that function From the PD 79SIM Window menu select Environ gt StartUp to open the StartUp Dialog box Specify the name of the function to be displayed Startup Function main Cancel 1 Specify the name of the function 2 Click the OK button Even when you display the function specified in the StartUp dialog box in the Program Window the program counter remains at the same value it held immediately after downloading To advance the program counter to the function you specified in the StartUp dialog box perform Come execution See Section 2 4 Program Execution to Specified Location in the Basic Operation for details 95 PD79SIM User s Manual Note This setting is ignored if thereis source line data at the position of the program counter immediately after downloading
174. log box 169 PD79SIM User s Manual A matrix dialog box for changing virtual interrupts will appear Setup Dialog 1 X e es 1X 1X Here change the data for the selected virtual interrupt as necessary Data can be changed in the same way that data is set Refer to Section 3 Setting Virtual Interrupts in 1 O Window After changing the data press the Next button A dialog box for saving the virtual interrupt data you ve set virtual interrupt file will appear Save in eng ipn File name hen scr Save as type Script Files scr Cancel Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into PD79SIM back again by using the 1 O Window menus Option gt Load or the Load button When you ve input a file name press the Save button Thus you ve finished changing virtual interrupt data 170 Other Functions of 1 0 Window 4 2 Deleting Virtual Port Inputs Virtual Port Outputs Virtual Interrupts or 1 0 Script Files Set The virtual port inputs virtual port outputs virtual interrupts or I O script files you ve set using the Setup menu can be deleted To delete one of these settings choose the menus Option gt Delete or the Delete button A dialog box like the one shown below will appear Delete Dialog Select Type Delete Virtual Port Input C Delete Virtual Port Output C Delet
175. log box Exit button Exits sim79 Note that you cannot exit sim79 while connected to pd79sim 23 PD79SIM User s Manual MEMO 24 Window function 26 Window function of PD79SIM 1 Window function of PD79SIM 1 1 The PD79SIM Window The PD79SIM Window is the main window for PD79SIM This window displays the main commands on a toolbar You can click on the buttons on this toolbar to run the target program in normal or one step mode The main display area accommodates windows such as the Target Program Window 1 1 1 PD79SIM Window Screen Configuration Menu for executing commands Main display area Toolbar with main command buttons ox File Edit View Environ Debug Option BasicWindow OptipnalWindow Help E A EE E Jeer SW HW Address 018008 e int Ki int j E int z 018012 char hett 18014 es char delta 1 018017 strl b 5 018021 018026 forl i 0 i lt stri c i Vf JOf x Dec Hex ASCII suis JIS Area Clear Refresh Address 000000 00 00 00 00 00 00 00 00 00 00 000010 00 00 00 00 00 OD OD 00 00 00 00 00 00 00 00 00 000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000030 00 00 00 00 OO 00 00 00 BE 00 00 E o0 co 000040 00 00 00 00 00 00 00 00 00 00 00 00 00 OO OO 00 e d Ready MCU STOP 5 Displays help on how to use windows and menus Displays status of execution of target program 2
176. lt is 100 a comment is displayed to the right of the stack usage measurement result indicated in percent to the effect that the stack may have overflowed gt mr stk sys lt RET gt System Stack 000522H 000921H 100 00 overflow Stack size used is 1024 bytes Stack size whole is 1024bytes gt If the system stack area is out of the scope of stack usage measurement no stack usage measurement result is displayed gt mr stk sys lt RET gt System Stack 000522H 000921H AKKO gt To reference the size of the stack used for each task 1 Measure the size of the stack used for each task 2 Display the result of task stack usage measurement using F ormat 2 To do this display input a command as follows MR STK TSK To display the measured size of the stack used for a specific task only input a command as shown below Note that the data in the third argument is handled as being represented in decimal MR STK TSK task ID number lt Displaying measurement results gt If the third argument task ID number is omitted the measured sizes of the stacks used for all tasks are displayed If atask ID number is specified in the third argument the measured size of the stack used for the specified task is displayed If the third argument is omitted e measurement results displayed for all tasks the measurement results being displayed can be finished in the middle by pressing the STOP button Following contents ar
177. mands 1 2 4 Memory Operation Commands Command format DumpByte DB DumpByte start address end address Display contents of memory in 1 byte units DumpWord DW DumpWord start address end address Display contents of memory in 2 byte units DumpDword DD DumpDword start address end address Display contents of memory in 4 byte units SetM emoryB yte M B setMemoryByte address set value Change contents of memory at specified address in 1 byte units Enter to stop SetM emoryWord MW setMemoryWord address set value Change contents of memory at specified address in 2 byte units Enter to stop l SetMemoryDword MD setMemoryDword address set value Change contents of memory at specified address in 4 byte units Enter to stop 1 byte units 2 byte units 4 byte units destination address address2 destination address in 2 byte units 1 2 5 Assemble Disassemble Commands MODule MOD Display all modules object names 2 SCOPE module name 2 Set scope to specified module SECtion SEC isplay section information BIT Display all bit symbols Display global bit symbols BIT GLOBAL G L bit symbol 1 1 2 2 3 BIT LOCAL L bit symbol 3 Display local bit symbols 4 4 BIT GLOBAL G bit symbol data Set value of bit showed by specified global bit symbol 5 BIT LOCAL L bit symbol data 5 Set value of bit showed by specified
178. menu point to the button you want to copy and click the left mouse button to select it Then press the Ctlr C key combination and Ctrl V key combination 185 PD79SIM User s Manual 5 6 Deleting buttons Follow the procedure below to delete buttons 1 Choose the GUI Input Window menus Option gt Del 2 Next move the mouse cursor into the GUI Input Window s input panel display area at which time the mouse cursor will have its shape changed to a cross 3 Whilein this state point to the button you want to delete and click the left mouse button Or choose the GUI Input Window menus Option gt Set or the lt button After choosing the menu point to the button you want to delete and click the left mouse button to select it Then press the Delete key 5 7 Displaying Grid Lines The GUI Input Window has a function to display grid lines at a position where buttons can be located Use this function when you place buttons To display grid lines choose the menus Option gt Display Grid Line or the Grid button When selected grid lines like the one shown below are displayed E GUI Input Window h Make Grid Load Save ae a TIT r E E Grid line GEET 186 Setting GUI Output Window 6 Setting GUI Output Window 6 1 Overview The GUI Output Win
179. meric to start a macro variable name You can specify any expression of which the value is an integer between e and FFFFFFFFie to be assigned in a macro variable If you specify a negative number it is processed as twos complement You can use macro variables within the expression Always precede macro variables with the sign 253 PD79SIM User s Manual 2 1 3 Conditional Statements if endi else In a conditional statement different statements are executed according to whether the condition is true or false The following shows the format to be used if expression statement 1 else statement 2 endi If the expression is true other than 0 statement 1 is executed If false 0 statement 2 is executed You can omit the else statement If omitted and the expression is false execution jumps to the line after the endi statement if statements can be nested up to 32 levels 2 1 4 Loop Statements while endw and Break Statement In loop statements execution of a group of statements is repeated while the expression is true The following shows the format to be used while expression statement endw Ifthe expression is true the group of statements is repeated If false the loop is exited and the statement following the endw statement is executed You can nest while statements up to 32 levels Usethe break statement to forcibly exit a while loop If while statements are nested b
180. mple if you change the scale to 50 when displaying a virtual port input in chart mode the data is displayed for 50 cycles in one screen Note however that when displayed in numeric form the maximum scale is 50 177 PD79SIM User s Manual 4 5 Changing Colors of Display Screen The colors of the virtual port input virtual port output or virtual interrupt display screen can be changed You can change four colors in each data display area grid lines graph lines text and background Graph line Grid line Input cycle _Add fess B Cycle 040100501 00601007010080 009010100 DEEL UC 4 HD Output cycle Cycle Address eem ENEE 40340640 84084084 1B HOUSE f Text display characters 00 Background To change the display colors choose the menus Option gt Color or the Color button A dialog box like the one shown below will appear Color Dialog Reset to default color Input pon Interrupt Grid line color gt Grid mo Graph ine lor nel wll pell Text color Neal _ Text Text Background gie Back m Bac Wi i E D Other Functions of 1 0 Window The following explains how to change colors in each display screen 1 To change the colors of the virtual port input display screen Press the button for the item whose color you want to be changed in the Input column A dialog box for selecting colors will appear Use
181. n SS es 1139 Syntax error in expression 2 0 Error Messages DEES iar operand expression is not comarta OoOO ma roomany operand o o o vo Iammaesg II au Undefnedsymbol dst JI mas valueis aut frange LI mas Duseben oOo mas f ismsi S S SSCS ma Um le mso emeng O ms ismsis S SC SSSCSCSCSCSC S DER msa acte DEE ps6 cant get enough memo JI DEE ve rm oo pice absoute saar sing isna 1 Ve oireet aaaressing isna JI 1166 Invalid addressing mode declaration included 1167 Syntax error in indexed addressing expression 2 1 PD79SIM User s Manual 1203 You can register the only command name for alias 1204 Cant use the command now You cannot use the specified command while the EN program is running 1205 1207 Cant set break point in this function ee 1208 The start address larger than the end address 1209 rnis commands notsupportainow 1 ais Cant register that token foralias 1 pai cant nafile filename SCiSSSSCSCSC S S S S Le ota valuets out ofrange le 1400 Address value is out of range Specified address exceeds the MCU s eo address of FFFFFFh 1401 Target program is already stopped 1402 Thenumber of break point is over the limit o limit 1403 The break point iantt defined at that z ie 1406 Cant read write because there are no Use the MAP command to allocate memory memory at that area 1407 Cant get enough memory Insuff
182. n it displays the results of virtual port outputs in the I O Window 4 3 Temporary Files 4 3 1 Files Created When Using On Demand Method A temporary file is created when you specify on demand reading of debugging information when downloading a target program Temporary files are created with the filename pdb_xxxx tmp where SN s a 4 digit hexadecimal value in the directory containing the downloaded files Temporary files are deleted immediately prior to downloading and when you quit PD79SIM 4 3 2 Files Created in 1 0 Window Temporary files are created when you set virtual port inputs or virtual interrupts or I O script files in the I O Window PD79SIM creates these temporary files in the directory in the files that contain virtual port input or virtual interrupt settings are stored or the directory in which the I O script files arestored Therefore unless these directories are permitted for access an error may occur when an attempt is made to read files from the directory using the I O Window menus Option gt Load 15 PD79SIM User s Manual MEMO 16 Setup 18 Setup 1 1 Installation See the Release Notes provided with the product for how to install PD79SIM 1 2 Starting PD79SIM Click the start button then select program P gt RENESAS TOOLS gt PD79SIM V X XX Release X gt PD79SIM This operation starts pd79sim the simulator debugger front end and simultaneously starts sim79 the simula
183. n the target program stops the program counter is in an area with no source line data the Program Window automatically switches to disassemble display mode Note If the beginning line of the currently displayed source file does not match the PC value when switching over the display mode between Mix and Disasm in the program source window a dialog box for selecting the M and X flags appears Torevert from disassemble display to source program display mode Click the SRC button on the Program or Source Window toolbar You can also switch to source program display mode by selecting the following from the PD 79SIM Window menu Option gt Mode gt Source Mode To revert from disassemble display to MIX display mode Click the MIX button on the Program or Source Window toolbar You can also switch to source program display mode by selecting the following from the PD 79SIM Window menu Option gt Mode gt MIX Mode Note If there is no source line data in the first line in the program display area of the Program or Source Window you cannot switch from disassemble display or MIX display mode to source display mode the SRC and MIX button is inoperable In this case use the vertical scrollbar or Up Down cursor keys to move the starting address of the program display area to a position where there is source line data 103 PD79SIM User s Manual 1 12 Changing Display Colors To change display
184. nable all break points You can also double click the breakpoint to be enabled An asterisk is deleted 4 6 Setting a Break Point from Program Source Window You can also set break points in the Program or Source Window To do so double click the break point setting display area BRK column indicated by for the line in which you want to set the break s BRK Source maint static char i j whileC 1 for i O i lt OxFF i forl j 0 j lt OxFF j sub10 m Om Double click here Lines in which a software break point have been set are marked by a B in place of the in the break point setting display area BRK column You can delete the break point by double clicking again in the BRK column 123 PD79SIM User s Manual 4 7 Setting Breakpoints from the Toolbar You can set breakpoints from the toolbar in the PD 79SIM Window In the Program Source Window click the program display area of the line in which you want to set the break lines for which is displayed in the corresponding breakpoint display area To set the breakpoint click the Break button in the PD 79SIM Window toolbar Hilt zlsldl m 2 pst all Click the Break button You can also set a breakpoint by selecting the following from the PD 79SIM Window menu Debug gt Break Point gt Break The mark on the lines set as software breakpoints changes from to B in the breakpoint displa
185. nction This function implements the user target system s simple output panel in a window The output panel is created in the GUI input window The following parts can be arranged on this output panel e Character string User specified character strings are displayed or erased when some value is written to a specified memory address or according to logic 1 or 0 in bits e LED LEDs are lit when some value is written to a specified memory address or according to logic 1 or 0 in bits 3 10 1 0 Script Function This function allows you to write virtual port input and virtual interrupt settings to a file in script form Therefore it provides a more flexible way to define virtual port inputs and virtual interrupts than can be set from the I O Window Specifically this includes for example reading the divide by N ratios you ve set in the timer register and generating a timer interrupt periodically For details about I O scripts refer to High end Debugging described later in this manual 10 PD79SIM Simulation Specifications 3 11 Unique Simulator Functions 3 11 1 Stack Utilization Monitor The StackMonitor SM Command Use the StackM onitor command to check the maximum and minimum addresses of the stack and to determine how much the program has used of what part of the stack The stack monitoring continues from the time that a Go or GoFree command is invoked until it is interrupted the maximum and minimum values being recorded for the
186. nd Example gt MACROPATH c usr project custom lt RET gt PD79SIM User s Manual MEMO 212 Real time OS Debugging 214 Executing MR79 Application Programs 1 Executing MR79 Application Programs When executing application programs in PD79SIM that have been created using the real time OS MR79 the following setup is required before you can execute the program 1 1 Setting Timer Interrupts TheMR79 sets the system clock referenced by cyclic and alarm handlers get_tim and dly_tsk system calls etc Therefore please specify the timers used by MR79 and intervals at which timer interrupts are generated in the configuration file as shown below clock mpu_clock 10MHz timer AO IPL 4 unit_time 1ms H ms initial_time 0 0 0 In this example timer AO is used for the system s timer interrupt and intervals at which the timer AO interrupt is generated are set to 1ms Before executing the M R79 application programs in PD79S1M you need to set up the timers used by M R79 in this case timer AO This can be accomplished by writing the necessary settings in an I O script The following shows an example of a script description 215 PD79SIM User s Manual Example of a definition of timer AO set Gm AU cnt 0 while 1 pass swrite 0x40 1 if Ox40 b amp 0x01 0x01 if Ox45 b amp 0x03 0x0 break if Ox56 b amp OxcO 0x0 set mr_AO cnt 2 gt Comm
187. nd while statements The following shows an example of an I O script statement written using right side expressions waitc LABEL waiti 0x800 20 if Ox1ff 0x30 while isfetch 0xf0000 7 4 1 Composition of Right side Expressions Right side expressions may be composed of the following Constant Symbol and label Macro variable Memory variable Character constant Operator isfetch Hsint Hsread swrite Each part of right side expressions are described below 7 4 2 Constants Binary decimal and hexadecimal numbers can be input The radix of numerals is discriminated by a symbol added at the beginning of a numeric value oxox None OxAB24 1234 10010 7 4 3 Symbols and Labels The global symbols and global labels defined in the target program can be used Symbol and label names may consist of alphanumeric characters underscore _ period and question mark However numbers cannot be used at the beginning of symbol and label names Symbol and label names can be written in up to 255 characters Symbol and label names are discriminated between uppercase and lowercase letters The structured instructions pseudo instructions macro instructions and reserved op code words of assembler as79 cannot be used in symbol and label names These for example include SECTION BYTE switch and if Character strings that begin with cannot be used in symbol and label names 201
188. ne No as follows 1 Click the Filename button bet Sam 4 Click the Add button 2 ify the fil Zi BE i a a De wi 5 Click the Close button 3 Specify the line No SW Bresk Pointi mim C a smole c mice 4 x wle 121 PD79SIM User s Manual 4 3 Deleting a Break Point In the S W Break Point Setting dialog box delete the break point as follows 3 Click the Close button 2 Click the Del button 1 Click the break point to be deleted gt Click DelAll to delete all break points You can also click the breakpoint to be deleted then press the Delete key 4 4 Temporarily Disabling Break Points In the S W Break Point Setting dialog box disable the break point as follows tests es me Tei oo po O 3 Click the Close button Swak Bek KG 1 Click the break point to be disabled gt ES OOO 2 Click the Disable button Click AllDisable to disable all break points You can also double click the breakpoint to be disabled An asterisk is displayed 122 Software Breaks 4 5 Temporarily Enabling Break Points In the S W Break Point Setting dialog box enable the break point as follows Jet JI Ses e Ca Rate Fano ter Une DS 3 Click the Close button SAK Br bak Poke 1 Click the break point to be enabled gt mi5 Swa e 2 Click the Enable button Click AllEnable to e
189. ned char c 0x4A when Radix is hex unsigned char c 10100100B when Radix is binary When the result of calculation is a floating point it is displayed as follows double d 8 207880399131839E 304 when Radix is in initial state double d 0x10203045060708 when Radix is hex double d 0000000010 1000B when Radix is binary indicates abbreviation 3 2 3 Pointer Types When the result of calculation is a pointer type to other than a char type it is displayed in hexadecimal as follows unsigned int p 0x1234 all Radices When the result of calculation is a char type you can select the display format of the string or a character in the menu Option gt View gt Display String string types unsigned char str 0x1234 Japan all Radices character types unsigned char str 0x1234 74 J all Radices 263 PD79SIM User s Manual When the result of calculation is a char type it is displayed as follows unsigned char Si str 0x1234 Japan all Radices If the string contains a non printing code prior to the code to show the end of the string 0 it is displayed up to the non printing character and the closing quote mark is not displayed unsigned char str 0x1234 Jap all Radices Also if the string contains more than 80 characters the closing quote mark is not displayed When the C expression is an pointer type a is displayed to t
190. ng Virtual Interrupts in 1 0 Window 3 1 Overview The Virtual Interrupt function allows you to generate interrupts in a simulated manner without having to actually generate them Using this function you can generate timer interrupts or AD conversion interrupts in a simulated manner Virtual interrupts can be generated at one of the following timings 1 Ifyou want virtual interrupts to be generated with the lapse of time Virtual interrupts can be generated when program execution has reached a specified number of cycles In this case set cycle synchronized interrupts 2 If you want virtual interrupts to be generated when the program executes a specified address Use this method if you want virtual interrupts to be generated when some specific function is executed In this case set executed address synchronized interrupts 3 2 Setting Cycle synchronized Interrupts To set cycle synchronized virtual interrupts choose the I O Window menus Option gt Setup or the Setup button The dialog box shown below will appear Setup Dialog Select Type C Set Virtual Port Input Select this item C Set Virtual Port Output 161 PD79SIM User s Manual Here choose the item Set Virtual Interrupt and press the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box A dialog box for setting up virtual interrupt timings will appear Setup Dialog 2 oi Expression
191. ng executed The cycles required for each instruction are added after instruction execution Note that the virtual port input output and virtual interrupt functions are processed after instruction execution is completed PD79SIM Simulation Specifications 3 1 2 Peripheral 1 0 Peripheral I Os other than the CPU core on the actual chip such as timers DMAC and serial I Os are not supported In PD79SIM the SFR area 00000016 to OOOOF F 16 to which peripheral I Os are connected is handled as RAM However bit 1 of the processor mode register 1 00005F 16 shown below is handled as a direct addressing mode select bit Processor mode register 1 00005F 16 b7 b6 b5 b4 b3 b2 b1 b Direct addressing select bit D Only one line of DPRO is used Four lines of DPRO 3 are used When bit 1 is set to 1 in a program addressing based on DPRO 3 is enabled Other bits do not have any effect in PD79SIM This register is initialized to 3C 6 when reset For serial I Os the virtual port input output function described later can be used as a pseudo serial I O 3 1 3 Memory Space There is no processor mode If mapped for memory the whole 16MB of memory from 00000016 to FFF FFF 6 can be read from and written to as RAM However if you try to access an area which is not allocated to memory an error occurs If this occurs while a program is running the program will stop with an illegal memory access error Use the map function described l
192. nics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics tENESAS C 7 D me d lt D D M3T PD79SIM V 3 20 User s Manual Simulator Debugger for 79xx Series Renesas Electronics com Rev 1 00 2003 05 www renesas co e Microsoft MS DOS Windows and Windows NT are registered trademarks of Microsoft Corporation in the U S and other countries e IBM and AT are registered trademarks of International Business Machines Corporation e Intel and Pentium are registered trademarks of Intel Corporation e Adobe Acrobat and Acrobat Reader are trademarks of Adobe Systems Incorporated e All other brand and product names are trademarks registered trademarks or service marks of their respective holders Keep safety first in your circuit designs Renesas Technology Corporation and Renesas Solutions Corporation put the maximum effort into making semiconductor products better and more reliable but there is always the possibility that trouble may occur with them Trouble with semiconductors may lead to personal injury fire or property damage Remember to give due consideration to safety when making your circuit designs with appropriate measures such as i placem
193. nly bytes 1 O scripts allow for virtual port inputs in words or long words 195 PD79SIM User s Manual Definition example of I O script file gt Comment statement Definition of procedure 1 example for virtual interrupt gt Beginning of procedure 1 set mr_AO cnt 0 gt Initializes divide by cycle setup variable while 1 pass swrite 0x40 1 gt Keeps execution waiting until a write to count start flag is performed if 0x40 b amp 0x01 0x01 gt Checks timer Ae count start flag break if Ox45 b amp 0x03 DND gt Selects timer A clock divide by value that is set in timer A clock division specifying register if 0x56 b amp OxcO 0x0 gt Selects count source that is set in timer AO mode register set Dom AU cnt 2 gt Selects f2 else if Ox56 b amp OxcO 0x40 set Ymr_AO cnt 16 gt Selects f16 else if Ox56 b amp OxcO 0x80 set Ymr_AO cnt 64 gt Selects f64 else set mr_AO_ cnt 512 gt Selects f512 Jelse if 0x45 b amp 0x03 0x1 if Ox56 b amp OxcO 0x0 set Ymr_AO cnt 1 gt Selects f1 else if Ox56 b amp OxcO 0x40 set mr_AO cnt 16 gt Selects f16 else if Ox56 b amp OxcO 0x80 set Ymr_AO_ cnt 64 gt Selects f64 else set G t AU cnt 4096 gt Selects 4096 Jelse if 0x45 b amp 0x03 0x2 if Ox56 b amp OxcO0 0x0 set Ymr_AO cnt 1 gt Selects f1 else if Ox
194. ods to show in the following to use the custom window made with CB79SIM 1 Register the custom window in the menu and open from the menu 2 Register the custom window with the MACRO command and open with the MACRO command Show the way of registering to the menu in the following Refer to the following To use custom command and custom window programs for the registration with the MACRO command and the open 208 Customize Function How to register for the menu To register the custom window in the menu select the following from the PD79SIM Window menu Optional Window gt Custom Window gt Option Then the following dialog opens Custom Window Option regs_win 1 Open the custom window registration dialog Custom window launcher dialog 2 lnput the program file name with the extension p of the custom window with absolute pass File path Title 3 Input the title of menu e eh menu bar 4 Choose display non display to the menu 5 Click Ok button Custom window registration dialog Note If you want to start the Custom window from the Script window register the Custom window with the macro command in advance 209 PD79SIM User s Manual The change of contents of registration To change contents of registration open the custom window registration dialog with the following process Then change contents of registration Custom Window Option
195. omment Statement 254 COMM e 200 Conditional Statement AAA 254 L elen EEN 255 coverage measurement information file 13 14 Coverage measurement information 206 Coverage Source Window sses 86 Coverage VWindow 86 Customize Dialog BOX AA 146 Customize Fungion vo eeeeeeeestteeeeeeeeeeeees 208 Cydecommand essseeseerrrrsserrrrrrrrrssrrreees 11 Cycle synchronized Input 63 Cycle synchronized interrupt seee 66 D Disassemble le 14 Display lors 104 Downloading A 93 Dump Window eet eeee 45 117 E CSG ited dash E 254 le 254 Index e UE 254 environmental setup file 13 Error Messages 0 cccccteceeeeeseteeeeeeeeeeenseteeaees 267 Executed address synchronized interrupt 67 Se Perce 140 F File Local Wimdow 5 58 131 G Global label symbol AAA 256 Global Window 5 60 131 Ee dl Tee RE 105 GUI Input Eilen 16 GUI Input Window neser 80 181 GUI TAPU rn aupuru nenen iore tue 10 GUI Output File 16 GUI Output WiNdOW eee 82 187 GUV e uge LEE 10 H H W Break Point Setting dialog box 90 125 Hardware break oomt eee 90 Hardware BreakS AA 125 Nap file tactician ie 12 l ege giel GIE 15 regele GET 10 195 O WIKAN EE 63 EEE 695 absolute format file 12 93 Eo e eine hai a aadaaien ee 200 254 Init Dialog Box 20 139 nit TE e iiss elect Mavi aed 20 Intel HEX format file ee 12 14 96 el EEN 198 Interrupt synchronized Input 65 L kabalen naa 5 256 Left side evpreeslonms 204
196. on gt Layout gt Line Area Option gt Layout gt Address Area and Option gt Layout gt Code Area Note that by default the address display area is hidden Doubleclick the line No display area to change the display source file Doubleclick the address display area to change the display starting address or the display starting line Theresult of the Coverage measurement is displayed by selecting On in the Menu Option gt Coverage 34 Window function of PD79SIM 1 2 1 3 Structure of Program Window in Disassemble Display Mode The disassemble display mode is provided for debugging at the instruction level You can check the results of disassembling the target program in disassemble display mode Toolbar Current program counter en iew SRC MIX DIS ddress RK Uj code D O00002H 2 Eh D DOUD A DDO09IH ERIOIS Camp IO 2801 Label display area Address displ Eadie isplay Object code display area Software breakpoint display setting area Program display area The address display area and object code display area can be displayed or hidden by selecting or canceling Option gt Layout gt Address Area and Option gt Layout gt Code Area Note that you cannot scroll backwards vertically until you have scrolled forwards When you scroll forwards the previous display address is stored in the internal buffer This address information is used when
197. opy parts 1 Choose the GUI Output Window menus Option gt Copy 2 Next move the mouse cursor into the GUI Output Window s output panel display area at which time the mouse cursor will have its shape changed to a cross 3 Whilein this state point to the part you want to copy and click the left mouse button 4 Next choose the GUI Input Window menus Option gt Paste A new part will be copied on to the part you ve selected with the left mouse button Or choose the GUI Output Window menus Option gt Set or the lt button After choosing the menu point to the button you want to copy and click the left mouse button to select it Then press the Ctlr C key combination and Ctrl V key combination 193 PD79SIM User s Manual 6 7 Deleting Parts Follow the procedure below to delete parts 1 Choose the GUI Output Window menus Option gt Del 2 Next move the mouse cursor into the GUI Output Window s output panel display area at which time the mouse cursor will have its shape changed to a cross 3 Whilein this state point to the part you want to delete and dick the left mouse button Or choose the GUI Output Window menus Option gt Set or the lt button After choosing the menu point to the part you want to delete and click the left mouse button to select it Then press the Delete key 6 8 Displaying Grid Lines The GUI Output Window has a function to display grid lines at a
198. or is output although the program execution is suspended PD79SIM Simulation Specifications 3 5 Virtual Port Input Function This function defines changes of the data that is input from external devices to a specified memory address Using this function you can simulate data inputs to the ports defined in SFR The following shows timings at which data can be input to memory 1 When program execution has reached a specified number of cycles 2 When a specified memory location is accessed for read by a program 3 When a specified virtual interrupt is generated The input data at the above timings can be defined from the 1 O Window Furthermore this function can be used in combination with the I O script function a function that allows you to define virtual port inputs and virtual interrupts For details refer to High end Debugging described later in this manual Using this I O script function you can specify more precise data input timings such as when the program fetches an instruction when the program writes to memory or when the program has executed instructions a specified number of times 3 6 Virtual Port Output Function When a data write to some memory address by the program occurs this function records the written data value and the cycle at which the data was written The recorded data can be verified in graphic or numeric format from the O Window The maximum number of data that can be recorded by this function is 30 00
199. or to expand its size and release the left mouse button where the size is what you want ES GUI Output Window b abel LED Grid Load Save Output panel display area Choose this button Drag the cross cursor to determine the rae of the label 4 When a frame in which to display the label appears double click somewhere in the frame CAUTION Before double dicking on the label you ve created check to see that the arrow lt on the tool bar is selected If not selected choose the arrow lt before double clicking on the label you ve created 5 A dialog box for setting a label like the one shown below will appear Here you can specify one of the following two methods for monitoring outputs Display erase a user specified character string according to logic 1 or 0 in memory bit Display erase a character string when some value is written to memory 188 Setting GUI Output Window 1 For displaying erasing a user specified character string according to logic 1 or Oin memory bit GUI Out Dialog Input the desired bat EE ess Bit Or Data Select Bit Bit Bit Num Data Name Memory bit number Input the character string to be displayed when memory bit 1 or 0 if you selected Negative Name2 Logic G Poit c Specify Positive Positive Negative or Negative Denes Input the character string to be displayed when memory bit 0 or 1 if
200. or to the cycles location called an element where you want a virtual interrupt to be generated then click the left mouse button Or you can scroll the screen to go to the desired location 2 The element is marked by an asterisk when you ve clicked Click at the same place again if you want the virtual interrupt you ve set to be canceled In this case the asterisk goes out 3 Repeat steps 1 and 2 as many times as the number of virtual interrupts to be generated When you finished setting all virtual interrupts press the Next button A dialog box for saving the virtual interrupts you ve set to a file virtual interrupt file will appear File name SE scr Save as type Script Files scr x Cancel 163 PD79SIM User s Manual Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into PD79SIM back again by using the I O Window menus Option gt Load or the Load button When you ve input a file name press the Save button Thus you ve finished setting cycle synchronized virtual interrupts 3 3 Setting Executed Address synchronized Interrupts To set executed address synchronized virtual interrupts choose the I O Window menus Option gt Setup or the Setup button The dialog box shown below will appear Setup Dialog Seba ho Set Virtual Port Input Select this item C Set Virtual Port Output Sg Here cho
201. ose the item Set Virtual Interrupt and press the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box A dialog box for setting up virtual interrupt timings will appear Setup Dislog Interrupt Generation Timing Executed Address C Cycle Expression can be input here Executed Address Eid cycle Vector Priority lt Prev Cancel First choose Executed Address in the Interrupt Generation Timing column Next specify the executed address i e the address at which a virtual interrupt is generated when it is executed for Executed Address Then specify the vector address of the virtual interrupt to be generated in hexadecimal and the interrupt priority in decimal for Vector and Priority respectively Then press the Next button Or press the Prev button here if you want to return to the previous dialog box 164 Setting Virtual Interrupts in 1 0 Window A matrix dialog box for setting virtual interrupts will appear Setup Dialog Finds the previous data you ve set UP or the next data DOWN The setup examplein this element specifies that virtual interrupt be generated when a specified address is executed 7 times Point to the desired element and click the mouse button The selected element is marked lt Prev Cancel by an asterisk In this dialog box set the virtual interrupts you want to be actually generated
202. ou can also start over step execution by selecting the following from the PD 79SIM Window menu Debug gt Over gt Over To specify the time of steps Select the following from the PD 79SIM Window menu Debug gt Step gt Step Option For over step execution select Debug gt Over gt Over Option Specify the time of steps in the displayed Step or Over dialog box To stop step execution Click the Stop button on the toolbar You can also stop step execution by selecting the following from the PD 79SIM Window menu Debug gt Stop This also applies to over step execution 107 PD79SIM User s Manual 2 3 Returning from Current to Calling Routine Click the Return button on the PD 79SIM Window toolbar called as Return execution You can also press F 5 Alz allaj zl ziel sw Click the Returen button You can also return toa calling routine by selecting the following from the PD 79SIM Window menu Debug gt Return To stop return execution Click the Stop button on the toolbar You can also stop return execution by selecting the following from the PD 79SIM Window menu Debug gt Stop 2 4 Program Execution to Specified Location Torun the target program to the specified position known as Come Execution first click the line at which you want the program to stop in the program display area of the Program Source Window to specify the cursor position Note
203. ously Automatic Download Function at Restart Specify whether or not you want the last target program previously loaded into the simulator to be loaded again when starting up PD 79SIM If you check AutoLoad check box the target program is automatically loaded when PD79SIM starts up 21 PD79SIM User s Manual 1 4 sim79 Setup When sim79 starts up itis registered in the system tray 1 4 1 sim79 When Running D Right clicking on the running sim79 and selecting Version from the menu bar will open up the Version Information dialog box 1 4 2 Structure of Version Information Dialog Box Version Information Sim 9 BEST simulator enc d ngine Sim 9 Version 2 20 00 ei COPYRIGHT C 1997 1998 2000 2003 RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED Application Information Interface Option JV Auto ext MCU Status Communication connection status sim79 version information OK button Simulator MCU Status RUN STOP Auto exit switch Exit button 22 Setup 1 4 3 Setting Up Auto Exit Switch Setting Check the Auto exit checkbox to automatically exit sim79 when you exit pd79sim Communications Connection Status CONNECT is displayed when connected to pd79sim CUT is displayed when there is no connection Simulator MCU Status RUN STOP RUN is displayed when the simulator MCU is running STOP when stopped OK button Closes the Version Information dia
204. overage measurement results saved by the Save menu command into the computer select the following from the PD79SIM window menu when the coverage window is active Option gt File gt Load A file selection dialog box will appear when the above are selected from the menu A path can be added to the file name that is specified here If a file name extension is omitted the default file extension cov is added e After entering a file name or single clicking on it in the file list press the lt Open gt button or double dck on the file name in the file list Coverage information will be loaded from the specified file into the computer 207 PD79SIM User s Manual 9 Customize F unction 9 1 About Customize F unction The Customize F unction allows you to add your own original functions to PD79SIM By loading custom command and custom window programs toPD79SIM you can extend the standard functions of PD79SIM To create custom command and custom window programs A special software called CB79SIM Custom Builder for PD79SIM is included with PD79SIM Use it to create custom command and custom window programs The custom command and custom window programs created with CB79SIM can be made available to use by registering them to PD79SIM usinga MACRO command For details on how to create custom command and custom window programs refer to the CB79SIM User s Manual To use custom window programs There are two meth
205. point is within the RAM monitor area changes during program execution can be monitored from the ASM Watch Window See Section 1 8 ASM Watch Window in the Window Functions for details of the ASM Watch Window Toregister a watch point Click the Add button in the menu bar in the ASM Watch Window to open the Add dialog box Input the address to monitor You can register the watch points also in the pop up menu Add ASM Watch of the Program Window 1 Click the Add button to open the following dialog box 4 Add BirAaa Set Del DeiAn Hex Dec Bin Add Il Address lt 2 Specify the address to monitor 3 It is possible to select either the Symbol Global Local assembler s global symbol or local symbol Size Byte Ja Select the data length Radix Hex Dec Bin 5 Select the data radix aa 6 Click the OK button The registered watchpoint is added at the current cursor position in the ASM Watch Window The cursor position is indicated by a red mark in the address display area and data display area You can move the cursor by dicking on either area or using the Up and Down keys 114 Checking and Setting Register Data and Memory Contents Toregister a specific bit as a watch point Click the BitAdd button in the menu bar in the ASM Watch Window to open the BitAdd dialog box Input the bit symbol or the address and bit No to monitor You can register the w
206. position where parts can be located Use this function when you place parts To display grid lines choose the menus Option gt Display Grid Line or the Grid button When selected grid lines like the one shown below are displayed Grid lines 194 1 0 Script Function 7 1 0 Script Function 7 1 Overview Settings of virtual port inputs or virtual interrupts can be written toa filein script form This script is called the I O script Also the files that contain a description of I O scripts are called the I O script file Using I O scripts you can set virtual port inputs and virtual interrupts in a more flexible manner than can be set from the I O Window For example you can make the following settings that cannot be made from the I O Window f you want to generate a cyclic virtual interrupt like timer interrupts you can use the while statement to specify a repetition of virtual interrupt generation You can specify that the priority levels set in the interrupt control register s interrupt priority level select bits be referenced to resolve the interrupt priority of virtual interrupts generated As conditions for entering virtual port inputs or generating virtual interrupts you can specify a combination of program fetch memory access for read write or memory comparison In addition to the
207. produce in whole or in part these materials el these products or technologies are subject to the Japanese export control restrictions they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination Any diversion or reexport contrary to the export control laws and regulations of Japan and or the country of destination is prohibited Please contact Renesas Technology Corporation or Renesas Solutions Corporation for further details on these materials or the products contained therein For inquiries about the contents of this document or product fill in the text file the installer generates in the following directory and email to your local distributor SUPPORT Product name SUPPORT TXT Renesas Tools Homepage __http www renesas com en tools Preface The PD79SIM is a simulator debugger for Windows which simulates the 7900 series operation of 16 bit microcomputer and evaluates the target program This user s manual describes the PD79SIM s features functions setting up and operational procedures Rights to the Program The right to use the program is granted according to provisions under a software license agreement The PD79SIM program can only be used for the purposes of product development by the user and cannot be used for any other purposes Note alsothat the information in this manual does not convey any guarantee or license for the use of software I
208. put Window menus Option gt Save or the Save button When selected the dialog box shown below will appear Save GUI Output Files Save in 10_Samples x ei cel ks File name Joutput gof Save as type aul Output Files C oof 7 Cancel Here enter the directory and file names in which you want the parts data to be saved When you ve input a file name press the Save button 192 Setting GUI Output Window 6 5 Changing Parts Position or Settings after Creating Parts After creating parts you can change their positions or setup contents 1 To change the position of a part Choose the GUI Output Window menus Option gt Set or the lt button Then point tothe part whose position you want to be changed and click the left mouse button Ss GUI Output Window b Paber LED Gezai Load Save The button is placed in a selected state when you ve clicked as shown above When in this state hold down the left mouse button while you drag the part to a position where you want it 2 To change the setup contents of a part Choose the GUI Output Window menus Option gt Set or the lt button as in 1 above Then point to the part whose setup contents you want to be changed and double click the left mouse button The dialog box you ve used when creating parts will appear Use this dialog box to change the settings of the selected part 6 6 Copying Parts Follow the procedure below to c
209. rams registered by a MACRO command remain intact until they are deleted from PD79SIM by a DELMACRO or DELMACROALL command They are retained even when you quit PD79SIM To find the custom command or custom window program thus registered PD79SIM searches its current directory one that has been set by a script command CD If these programs are stored in some other directory specify that directory according to an explanation of the search directory in the later section of this manual To delete custom command and custom window programs To delete the custom command and custom window programs registered to PD79SIM by a MACRO command use a DELMACRO command by specifying the registered file name of the program not induding the extension in it or a DELMACROALL command When using a DELMACRO command only the specified custom command or custom window program is deleted When using a DELMACROALL command all of the registered custom command and custom window programs are deleted Example gt DELMACRO custom lt RET gt gt DELMACROALL lt RET gt To set the search directory of custom command and custom window programs The custom command and custom window programs registered by a MACRO command are loaded into PD79SIM when they are executed The custom command and custom window programs to be loaded are searched for from the directory that has been set by aMACROPATH MPATH command Only one directory can be specified by aMACROPATH MPATH comma
210. re breakpoints selected by clicking in the software breakpoint display area You can also enable and disable software breakpoints by double dicking on them 1 19 2 Entries in List of Software Break Points Z oo0801C 39 SE aa Filename for break address Line No at break address Break address Indicates if break point is enabled disabled enabled f thereis no source line etc for the address only the address is displayed 89 PD79SIM User s Manual 1 20 H W Break Point Setting Dialog Box The HW Break Point Setting dialog box allows you to set hardware break points Hardware breaks are effected when data is written to or read from memory or an instruction is fetched from memory 1 20 1 Structure of H W Break Point Setting Dialog Box HAY Break HAW break CC Disable Enable enable disable area Address setting area p Address Pass Count WW e ouni seting Access condition gt Aecess Type E size setting area setting area 3 Data Compare e Check if no data r Nat Specify Comparison data comparison is to be l 1 setting area performed Data m l e Che rs rz C gt Ces lt Comparison WG a e Ee condition setting area p HAY Braak Point Add breakpoint Label Addr Got Size Data Tere Ore i Hardware breakpoint button display area Start 008000 001 BYTE va READ H ain OOSIOG 001 ax zx FETCH Clear specified
211. rea the contents of the display are regularly updated while the target program is executing information about set watchpoints is stored in the Init file when you close the ASM Watch Window or exit PD79SIM When you re open the ASM Watch Window the previously set watch points are automatically restored in the case of the ASM Watch Window the addresses of any previously set watchpoints are recalculated when you download a target program and the memory referenced using the new addresses Thus there is no need to respecify the watchpoint addresses even when they changeas a result of changes in the program When the addresses of inactive watchpoints indicated by lt not active gt are recalculated and the result is a valid address the watchpoints automatically become active again 50 Window function of PD79SIM 1 8 2 ASM Watch Window Toolbar button Adds a watch point address Set button button Sets specified watch point Displays watch point in decimal Del button Deletes specified watch point Del Den button Adds a watch point bit Displays watch point in binary button Displays watch point in hexadecimal DelAll button Deletes all watch points 51 PD79SIM User s Manual 1 8 3 Extended Menus in the ASM Watch Window When the ASM Watch Window is active in the PD79SIM main display area the Option menu contains the following items Register delete watch point Register watch point Regis
212. read the file saved by emulator debugger 10202 The Number of Macro constant is over the limit limit 10203_ Immediate value is out of range LS 10204 Prefix which gives radix of the constant is E illegal 10005 Description of ndireareterenceisiiega 1 0206 cant tind endofstringsistr JI 10207 Description of expression isiiega 1 0208 Macro constant macro yist defined SSCS 0209 symbol symbol jist geg OOOO 10210 Immediate value is illegal 10211 Divide by 0 10213 The value is over the maximum value of which can be treated by MCU 10214 Register nameis using for macro variable name 2 5 PD79SIM User s Manual 10400 Address value is out of range Specified address exceeds MCU s maximum address of FF FFFFh t find sub routin information Specify the option to output debugging information then recompile the target program 10405 Illegal character in the strings ee 10408 _ Multiple definition of symbol label TO 10409 Thereare no codeat that line No machine language has been generated at the address corresponding to the specified lineNo 10411 Can t find scopes t find section information Specify the option to output debugging information then recompile the target program EI oO BK O E O o 5 m O IN N O DI bei 10413 Can t find sourcelines which correspond to that address 10415 Can t find the scopes which include that address Loo oangien Il Lem
213. reak exits from the innermost loop 2 1 5 Comment statements You can include comments in a script file Use the following format character string Write the statement after a semicolon You can include only spaces and tabs in front of the semicolon Lines with comment statements are ignored when the script file is executed 254 Writing Script Files Notes You cannot include comments on the same lines as script commands You can nest script files up to five levels You can nest if statements and while statements up to 32 levels If statements must be paired with endi statements and while statements with endw statements in each script file Expressions included in script files are evaluated as unsigned types Therefore operation cannot be guaranteed if you use negative values for comparison in if or while statements You can specify up to 4096 characters per line An error occurs if a line exceeds this number of characters When ascript file containing illegal commands is automatically executed when you select Option gt Script gt Run fromthe Script Window menu after opening a script file or click the lt Run gt button in the Script Window execution of the script file continues even after the error is detected except when the script line itself cannot be read If an error is detected and the script file continues to be executed operation after detection of the error cannot be guarant
214. rmat 1 Displays the result of system stack usage measurement Format 2 Displays the result of task stack usage measurement Format 3 Prepares for measuring the stack usage Format 4 Initializes the result of stack usage measurement To measure the sizes of the system task stacks used 1 Prepare for measuring the stack usage using F ormat 3 Todo this preparation input a command as follows MR STK BASE 2 Initialize the result of stack usage measurement using Format 4 To do this initialization input a command as follows MR STK CLEAR 3 Execute the target program Then when the program execution is stopped PD79SIM measures the size of stacks used immediately after the previous measurement result is initialized To reference the size of the system stack used 1 Measure the size of the system stack used 2 Display the result of system stack usage measurement using Format 1 Todo this display input a command as follows MR STK SYS Displaying measurement results Following contents are displayed First line The start and end addresses of the system stack area and the result of stack usage measurement indicated in percent Second line The size of the actually used stack in bytes Third line The size of the entire stack area in bytes gt mr stk sys lt RET gt System Stack 00052H 000921H 1 46 Stack size used is 15 bytes Stack size whole is 1024 bytes PD79SIM User s Manual If the measurement resu
215. rrupts can be specified when you set virtual interrupts from the IO Window or in I O script Note that the 1 0 script function allows you to write statements to the effect that the interrupt request bit be set to 1 when an interrupt occurs 2 Special hardware interrupts cannot be generated as virtual interrupts Reset NMI DBC watchdog timer address match interrupts cannot be generated as virtual interrupts 3 If virtual interrupts of the same priority occur simultaneously If in the actual chip multiple interrupts of the same priority occur simultaneously they are resolved according to the priority levels set in hardware so that an interrupt of the highest priority is accepted For virtual interrupts however all interrupts belonging to one interrupt type eg peripheral I O interrupt are handled as having the same priority Therefore if virtual interrupts of the same priority occur simultaneously the order in which they are accepted is indeterminate 3 8 GUI Input Function This function implements the user target system s simple key input panel buttons in a window The key input panel is created in the GUI input window By pressing a button created in the GUI input window you can accomplish virtual port inputs and virtual interrupts Input data toa specified memory address virtual port input Generate a specified virtual interrupt Accomplish specified virtual interrupt and virtual port input simultaneously 3 9 GUI Output Fu
216. s must be enclosed with double quotations Character strings must be within 2 characters 16 bits in length If a character string consists of more than two characters only the last two characters written in the string are operated on For example if you write ABCD only the last two characters in this string i e CD are operated on the value of which is 43446 202 1 0 Script Function 7 4 7 Operators The following lists the operators that can be written in expressions The priorities of operators are such that level 1 is the highest and level 12 the lowest If operators in an expression have the same priority they are calculated sequentially from left to right EE _ Binarycomparisn st Level 7 BinaryexdusiveOR st Level po Binarylogical Op Level 10 S amp amp i y Logical AND Level 11 oOo Logical Op Level 12 7 4 8 isfetch isint isread iswrite These statements are used in conditional expressions of I O script statements and if and while statements 1 isfetch expression Format isfetch address Function The value of the expression becomes true 1 when the program s PC value goes to a specified address Otherwise the expression is false 0 For example the if statement below if sfetch Oxfc000 becomes true 1 when the program s address PC value becomes OxfcO00 isint expression Format isint vector address Function The value of the expression becomes true
217. s of C variables in the Local Window File Local Window Global Window or C Watch Window Click the variable to be changed then click the Set button on the toolbar to open the Set dialog box Enter the new value for the variable 1 Specify the new value 2 Click the OK button 133 PD79SIM User s Manual 7 Script Commands 7 1 Executing Script Commands Script commands are executed from the Script Window To open the Script Window select the following from the PD79SIM Window menu Window gt Script Window Enter script commands in the Command input area in the Script window Click the Command input area to locate the cursor in that field then enter the script command After executing the command the results are output to the execution result display area Mm E Run Step Open Close LogOn Loz0i View Clear RecOn Recor Script Log gt Execution result display area Command history display area Script file display area 4 Enter Command Tore execute a previously executed command The history of command execution is displayed in the command history display area Double click the command you want to execute again To quit a script command that is executing Click the STOP button which is displayed only while the command is being executed Command input area 134 Script Commands 7 2 Logging the Results of Executing Script Commands Use the logging function to log
218. s the program in source mode MIX button d Displays the program in MIX mode View SRC MIX DIS button Displays the program in disassemble mode button Changes the part of the program being displayed You can specify a source file a function an address or the position of the program counter 36 Window function of PD79SIM 1 2 4 Extended menu in the Program Window When the Program Window is active in the PD79SIM main display area the Option menu contains the following items View Change contents of display Source Display from specified source file or function Address Display from specified address or line No Program Counter Display from current program counter Mode Switch display mode Source mode Switch to source display mode Ctrl R Mix mode Switch to MIX display mode Ctrl R Disasm mode Switch to disassemble display mode Ctrl R Layout Set layout Line Area Turn on off line No area Address Area Turn on off address area Code Area Turn on off object code area LineAssarbe Open LineAsserbledialog Coverage Set Coveragemeasurement On Off Turn on off Measurenent result Clear Initializecoveragemeasurement result Refresh Updatedisplay of coveragemeasurement result 37 PD79SIM User s Manual 1 3 Source Window The Source Window is provided for dedicated display of the program being checked The line at the program counter is highlighted in yellow In contrast to the Pro
219. s the same as when their settings have been deleted 180 Setting GUI Input Window 5 Setting GUI Input Window 5 1 Overview The GUI Input Window allows you to create a simple key input panel buttons of the user target system in a window and execute virtual port inputs or virtual interrupts by pressing the buttons you ve created Here we ll explain how to create buttons 5 2 Creating Buttons Follow the procedure below to create buttons 1 Choose the GUI Input Window menus Option gt Make or the Make button 2 Next move the mouse cursor into the GUI Input Window s input panel display area at which time the mouse cursor will have its shape changed to a cross 3 Whilein this state click the left mouse button at a position where you want a button to be created Hold down the left mouse button while you move the mouse cursor to expand its size and release the left mouse button where the size is what you want Choose this button JI Input Window e Make Grid Load Save J Input panel display area Drag the cross cursor to determine the size of the E button 181 PD79SIM User s Manual 4 A button will be created as shown below E Gu JI Input Window hk Make Grid Load SAVE q 5 Next double click on the button you ve created CAUTION Before double dicking on the button you ve created check to see that the arrow on the tool bar is selected If not selected c
220. se pointer to the data position displayed in the D name area a window like the one shown below appears showing information about the task Same contents as shown in TSK mode Window to display detail information on task Each display area can have its display width changed by dragging the mouse to the desired position In TIM mode the horizontal scroll bar is not displayed To display the event flag status Click the F LG button on the toolbar of the MR Window or select the following from the menu Option gt Mode gt Event Flag The following shows the configuration of the MR Window in event flag status mode Fa MR Window TSK RQ TIMJFLG SEM MBX CYH ALH MPL ID fla ptn F aed 1 OOOOH 8 _task8 2 OOOOH 3 0000H 9 _task9 Cs The following items are displayed in FLG mode The items are displayed in order of ID No for all event flags defined in configuration iD OO O ID No of event flag Bit pattern of each event flag Task ID Nos and task names in the event flag queue In FLG mode the status bar is not displayed If the task pending in an event flag queue is further placed in a wait state with time out wait state due to twai_flg a character string tmo to indicate a wait state with time out is added after the character string displayed in the flagQ area for the targets using MR79 V 2 00 or later Normal display 26 _task26 Display when event flag wait state with time out 26
221. ssed as hexadecimals those with 0 as octals and those without either prefix as decimals Note You cannot register only immediate values as C watchpoints Immediate values are valid only when used in a C expression that specifies a C watchpoint and when specifying a value to be assigned 259 PD79SIM User s Manual 3 1 2 Mathematical Operators You can use the addition subtraction multiplication and division mathematical operators The following shows the order of priority in which they are evaluated 7 gt Note Thereis no support currently for mathematical operators for floating point numbers 3 1 3 Pointers Pointers are indicated by the asterisk al You can use pointer to pointers sx and pointer to pointer to pointers etc Examples variable_name variable_ name etc Note Immediate values cannot be processed as pointers That is you cannot specify 0xE000 for example 3 1 4 Reference References are indicated by the ampersand el You can only specify svariable name 3 1 5 Sign Inversion Sign inversion is indicated by the minus sign You can only specify immediate_value or variable name No sign inversion is performed if you specify 2 or any even number of minus signs Note Thereis no support currently for sign inversion of floating point numbers 3 1 6 Member Reference Using Comma You can only use variable name member name for check
222. ster area Select a context register name from the list of context registers for the specified task from the list in the combo box Enter the value to be set in the context register in the Value area After making the necessary settings click the lt OK gt button or press the Enter key to set the specified data in the specified context register of the specified task and simultaneously close the Set Context dialog box An error dialog box is displayed if an error is detected in the expression set in the Value area or if the value exceeds the allowable range for the specified register To cancel the settings in each field and close the Set Context dialog box click the lt Cancel gt button 2 2 Measuring Sizes of System and Task Stacks Used PD79SIM allows you to measure the size of the system stack used when executing a program and the size of the stack used for each task during this program execution The system task stack measurement function is implemented by a script command The command nameis MR STK N ote Please use the startup file crtOmr a79 start a79 whose contents matches with the version of MR79 when you make downloaded program The MR STK command will not run properly if the startup file you uses don t match with the version of MR79 230 Real time OS Debugging Function Input format Format 1 MR STK SYS Format 2 MR STK TSK task ID number Format 3 MR STK BASE Format 4 MR STK CLEAR Function Fo
223. t Program You can search for character strings in the target program when the Program Window or Source Window is active Make sure the target Program or Source Window is active then select the following from the PD79SIM Window menu Edit gt Find The Find dialog box is displayed Enter the search string then click Find Next to start the search 3 Check here to include wildcards in the search string Find What 4 1 Specify the search string vy Match Case wild Card A Click D t hth f d d s Click Down to search the program forwards irection c Up Down or Up to search backwards 5 Click Find Next to start the search 2 Check here if you want to differentiate between uppercase and lowercase letters 144 Miscellaneous 9 4 Changing Window Proportions You can change the proportions of the Program Window Source Window Memory Window and ASM Watch Window using the mouse as described below Program Window and Source Window When in disassemble display mode you can change the relative proportions of the object code display area lt Objcode gt and the two parts lt Label gt and lt Mnemonic gt of the Program display area Drag toresize N BRK Objcode Label Mnemonic Bi0400 start WU P 0 00 EB308000 LDC 0080 Memory Window You can change the relative proportions of the label display area 4 ABEL gt and the memory content display area lt
224. t scope AU EW 256 Writing Script Files Conversion of data values Local symbols outside current scope Local labels outside current scope 1 Local symbols 2 Global symbols 3 Local labels 4 Global labels 5 6 Conversion of bit values 1 Local bit symbols 2 Global bit symbols 3 Local bit symbols outside current scope 2 2 4 Macro Variables Macro variables are defined by assign statements in the script file See Section 2 1 Structural Elements of a Script File in the Reference part for details Precede variables with for use as macro variables You can specify alphanumerics and or the underbar _ in the variable name following the percent sign However do not start the names with a numeric You cannot use the names of registers as variable names Uppercase and lowercase letters are differentiated in variable names You can define a maximum of 32 macro variables Once defined a macro variable remains valid until you quit PD79SIM Macro variables are useful for specifying the number of iterations of the while statement 2 2 5 Register variables Register variables are used for using the values of registers in an expression Precede the name of the register with to use it as a register variable Use the following format register name You can use the following registers PG PC PGPC S DT DPO DP1 DP2 DP3 A B E X Y PS Uppercase and lowercase letters are not unique in regist
225. t startup These commands must have been saved as a script file Click the Refer button to open the file selection dialog box then use the mouse to select the script file to be executed at startup The selected script file is displayed after InitFile in the Init dialog box Setting of default TAB values Specify the default tab values for the Program Window Source Window You can specify TAB values between 1 and 32 Note You can set the tabs independently in each window With the target window active select Option gt TAB from the menu in the PD 79SIM Window to open the TAB Setting dialog box You can now Set the tabs for the active window Setting of default font size pd79sim Specify the default font for the characters displayed by pd79sim Click the Font button to open the F ont dialog box then specify the font and the font size Note You can set the font size independently in each window With the target window active select Option gt Font from the menu in the PD 79SIM Window to open the Font Setting dialog box 20 Setup You can now set the font size for the active window Selection of On Memory or On Demand method of downloading This selection determines whether the debugging information is fetched using the On Memory or On Demand method when a target program has been downloaded When you select On Memory all the debugging information is stored in memory When you select On Demand a t
226. target system was lost during communication with the target system 1712 1713 Communication ERROR A communications error occurred while sending data to the target system 1714 i i Communication ERROR A communications error occurred while receiving data from the target system 1717 _ Can t find Simulator Engine O eee 273 PD79SIM User s Manual 2400 _ Address value is out of range WE 2401 as value is out of range el 2402 Start Addressis larger than end address You specified an ending address that is less than the starting address 2403 Valueis under num Specify a value of num or more Address value is out range for scroll area The address specified as the scroll rangeis greater than the MCU s maximum address o FFFFFFh 5800 Sampling period value is out of range lt i C SS 5802 Can t change RAM monitor area when the Stop target program then change the RAM target program is running monitor area 5900 can t open Script File filename se 5901 om File filename is already opened Je 5902 Jamie sel Sa Cant open LogFile filenamey Jl EE EIERE 5905 cantopentgrile le EREECHEN 5907 arts View File filename fornewiadd OOOO OO O OOOO 274 Error Messages No Error Message Notes and Action 6000 _ Cannot find source file filename PO 6001 The number of lines of source file filename is over the limit line 6002 The Address value is out of range ee 6006 Cannot
227. ted hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document but
228. ter bit level watch point Set new data to be written to selected watch point Delete selected watch point Delete all watch points Change display radix Display value at selected watch point in binary Display value at selected watch point in decimal Display value at selected watch point in hexadecimal Layout Set layout Address Area Turn on off address bit area SizeArea Turn on off data size area Display RAM monitor Set sampling period for RAM monitor Set color of access attribute display Watch point save load Watch point save Watch point load 52 Window function of PD79SIM 1 9 C Watch Window The C Watch Window displays C expressions and their values results of calculations The C expressions displayed in the C Watch Window are known as C watchpoints The displays of the results of calculating the C watchpoints are updated each time a command is executed 1 9 1 Structure of C Watch Window Toolbar C watch point display area shan j igned char d Display of variable type Dispaly of variable value Dispaly of variable name You can use the following as C watchpoints C symbols Variable names and function names defined in the C source program Expressions including C symbols C expressions For details of tokens that can be used in C expressions see Section 3 1 Writing C Expressions in the Reference part f a C expression cannot be correctly calculated it includes an undefine
229. ters are omitted When you move the mouse pointer to the data position displayed in the semQ area a window like the one shown below appears showing information about the task same contents as shown in TSK mode Window to display detail information on task Each display area can have its display width changed by dragging the mouse to the desired position In SEM mode the horizontal scroll bar is displayed simultaneously when data is displayed Use this scroll bar to scroll the data contents displayed in the semQ area 4 These states are supported by MR79 V 2 00 or later These states are not displayed for the target programs using earlier versions of MR79 than that 224 Real time OS Debugging Function To display the mailbox status Click the MBX button on the toolbar of the MR Window or select the following from the menu Option gt Mode gt Mailbox The following shows the configuration of the MR Window in mailbox status mode we MR Window TSK RQ TIM FLG SEM MBX CYH ALH MPL ID Msg_cnt MAXmse WaitQueue Message 1 OOOOH 0010H Task 12 _task12 2 0002H 0020H Msg 0033H 0055H 3 0000H 0010H Task 13 _task13 s The following items are displayed in MBX mode The items are displayed in order of ID No for all mailboxes defined in configuration ID ID Noo off mailbox Number of messages in each mailbox contained in each mailbox task name of tasks waiting for messages
230. the RecOff button make the commands saved file closed Run Step Open Close Log0n Log0ff View Clear RecOn Rec0ff Click RecOff to stop recording the executed commands You can also select the following from the PD79SIM Window menu when the Script Window is active Option gt Record gt Off 137 PD79SIM User s Manual 7 3 Executing Script Commands in Batch Mode You can execute script commands in batches To do so use an editor to write the commands to be executed in a script file Script files take the scr attribute Script files are opened from the Script Window Click the Open button on the Script Window toolbar When the file selection dialog box opens select the script file to be executed Run Step Open Clesse Log0n Log0ff View Clear RecOn Reciff ij Click the Open button to open a script file You can also select the following from the PD79SIM Window menu when the Script Window is active Option gt Script gt Open The file list in the F ile Selection dialog box starts with files with the scr attribute However you can enter a full filename including the attribute directly into the filename input area to open a script file with an attribute other than scr You can nest script files up to 5 levels When a script file is read in the command history display in the Script Window changes into the script file display
231. the Contents of Registers Open the Register Window to check the contents of the registers The Register Window which lists the CPU registers is opened from the PD79SIM Window menu by selecting the following Basic Window gt Register Window See Section 1 4 Register Window in the Window Functions for details of the Register Window To Change the Display Radix of the Register Value The display radix can be changed for each register This is done with the following procedure 1 Click the right mouse button on the Name of the register whose display radix you want to change 2 Select the radix you want displayed from the menu A register valuein HEX A register valuein DECIMAL Hex Hex Hex Hex 110 Checking and Setting Register Data and Memory Contents 3 2 Changing the Contents of Registers To Change the Register Value Register contents can be changed with the following procedure Either double click on the register line you want to change or select the line and press the Enter key Value Lamp A dialog box for setting the register value and radix will open up therefore input the new value and radix Radix HEX Cancel To change the values of flags When flag window is open Click on the button of the flag you want to change The flag value will change ever time it is dicked on However for flags like IPL whose size is larger than 1 bit a dialog box for setting the reg
232. the dialog box A dialog box for setting up virtual port input timings will appear Setup Dialog Data Input Timing C Read Access C Cycle Interrupt Expressions can be input here Input Address Read Address Start cycle End cycles Vector lt Prev Cancel First choose Interrupt in the Data Input Timing column Next enter an address for virtual port input in the Input Address column the address to which you want data to be input using a hexadecimal number Then enter the vector address of a virtual interrupt that signals timing for virtual port input in the Vector column Or press the Prev button here if you want to return to the previous dialog box 156 Setting Virtual Port Inputs in 1 0 Window A matrix dialog box for setting the virtual port input data will appear Virtual interrupt counts Setup Dialog Finds the previous data you ve set UP or the next data DOWN i A E E saposa L The setup example ee Kee EE E E EE E EE in this element specifies that data OxF F be set when virtual interrupt occurs 7 times Double click on an element you want and set the desired input value in it In this dialog box set the data you want to be actually input to memory F ollow the procedure below to set data 1 Move the mouse cursor to the virtual interrupt counts location called an element where you want data to be set then double click th
233. the elements of the array by using this indicating for the details refer 3 2 4 Pointer types 264 C Expressions When the number of the array elements is more than 1000 the following dialog box open Specify the number of the elements in the dialog box Set Array Size Please set array area Sati 000 The elements from the index specified in Start to the index specified in End are displayed If you specify the value more than the max index of the array the value is regarded as max index of the array When you click the Cancel button the elements are not displayed 3 2 5 Function Types When the result of calculation is a function type the starting address is displayed in hex as follows void main OxF000 all Radices 3 2 6 Reference Types When theresult of calculation is a reference type the reference address is displayed in hex as follows signed int amp ref 0xD038 all Radices 3 2 7 Bit Field Types When the result of calculation is a bit field type it is displayed as follows unsigned int 13 s f 8191 when Radix is in initial state unsigned int 13 s f Ox1FFF when Radix is hex unsigned int 13 s f 1111111111111B when Radix is binary 3 2 8 When NoC Symbol is Found ifthe calculated expression contained a C symbol that could not be found it is displayed as follows x lt not active gt all Radices 3 2 9 Syntax Errors When the calculate
234. the key input panel of the GUI Input Window Virtual port input Virtual interrupt generation Simultaneous generation of virtual interrupt and virtual port input 1 15 1 Screen Configuration of GUI Input Window cou GUI Input Window EN Input pane display area You can create edit and move buttons in the input panel display area The buttons you ve created can be assigned labels button names e By pressing the buttons you ve created you can generate virtual port input virtual interrupt or virtual port input plus virtual interrupt The input pane you ve created can be saved to a file GUI input file 80 Window function of PD79SIM 1 15 2 Tool Bar of GUI Input Window Grid button Shows hides grid line Make button Save button Creates button Saves GUI input file y Set button Load button Edits or moves button Loads GUI input file 1 15 3 Extended Menu of GUI Input Window If the GUI Input Window is active among the windows brought up in the main display area of PD79SIM the Option menu has the following menu items assigned to it Shatatkey ES EE SSS EE EE mesam ein EE ER EE EE Se Eegen 81 PD79SIM User s Manual 1 16 GUI Output Window This window allows you to implement a simple output panel of the user target system in a window The following parts can be arranged in this output panel Label character string User specified character strings are displ
235. the previous dialog box Thus the virtual port output is deleted Press the Close button to close the dialog box 173 PD79SIM User s Manual 4 2 3 Deleting Virtual Interrupt After selecting Delete Virtual Interrupt press the Next button to bring up the dialog box shown below Modify Dialog ector ffee First choose the type of virtual interrupt you want to be deleted in the Interrupt Generation Timing column When selected the currently set virtual interrupts are listed in the Select Data column Here choose the virtual interrupt you want to be deleted Then press the Delete button Or press the Prev button here if you want to return to the previous dialog box Thus the virtual interrupt is deleted Press the Close button to close the dialog box 174 Other Functions of 1 0 Window 4 2 4 Deleting 1 0 Script File After selecting Delete I O Script File press the Next button to bring up the dialog box shown below Delete Dialog Here choose the 1 0 script file you want to be deleted from registration Then press the Delete button Or press the Prev button here if you want to return to the previous dialog box Thus the 1 O script file is deleted Press the Close button to close the dialog box 175 PD79SIM User s Manual 4 3 Changing Display Mode of Virtual Port Input Virtual Port Output or Virtual Interrupt The display modes of the virtual port inputs virtual port outputs or virt
236. the results of executing script commands Before executing the script command click the LogOn button on the toolbar of the Script Window Clicking the LogOn button opens the File Selection dialog box Specify the name of the file to be saved The default file attribute if omitted is log Run Step Open Close Loz0n Loz0ff View Clear RecOn Recori Click LogOn to start logging You can also select the following from the PD79SIM Window menu when the Script Window is active Option gt Log gt On e f after starting PD79SIM you open and close a log file then re open it the new data is appended to the data already in that file However if you re open a log file that was created before starting PD79SIM the contents of that file will be overwritten The file list in the File Selection dialog box starts with files with the log attribute However you can enter a full filename including the attribute directly into the filename input area to open a log file with an attribute other than log You can nest log files up to 8 levels To quit logging the results of executing script commands Click the L ogOff button on the toolbar of the Script Window 1 Run Step Open Close ortn Ll View Clear RecDn rou Click LogOff to stop logging You can also select the following from the PD79SIM Window menu when the Script Window is active Option gt Log gt
237. to open the hardware breakpoint setting dialog box PP ERR ee Click the HW button You can also open the H W Break Point Setting dialog box by selecting the following from the PD79SIM Window menu Debug gt Break Point gt H W Break Pont See Section 1 20 H W Break Point Setting Dialog Box in the Introduction for the structure of the S W Break Point Setting dialog box 125 PD79SIM User s Manual 5 2 Setting Hardware Breakpoints To break when the instruction at a specified address is executed The following example shows how to break when the instruction at address F 0003 6 is executed Make the following settings in the H W Break Point setting dialog box MAN Cread Cl HAW Break Diable amp Enable 1 Select Enable 2 Enter address F0003 gt Address Pass Count 3 Select Fetch Access Type Ga 8 Bis e e e a e e HAW Break Point Label Adie Cnt Size Data Ire Deep Click the Add button 5 Click the Close button To break when data is read from the specified address The following example shows how to break when data has been read twice from address 4001s Make the following settings in the H W Break Point setting dialog box HAW Breck e Diab amp Enable 1 Select Enable 2 Enter address 400 gt Addex Hl Pass Count 4 Enter a pass count of 2 3 Select Read ck Access Type Length Data Compare
238. tor engine If sim79 is already running only pd79sim starts 19 PD79SIM User s Manual 1 3 pd79sim Setup When you start pd79sim the Init dialog box is displayed allowing you to set up the operating environment 1 3 1 Init Dialog Box Screen Configuration MCU M37920 Refer init Fie Refer TABII 82 fe Area for specifying MCU file Area for specifying script file to be executed at startup Area for setting of default tab value Font FwedSps Ses 11 font Area for setting og default font size Detug Intormation Selection of On Memory or On Demand methods of A On Memory C On Demand downloading Cat NIN DOWS TEMP Area to set the directory where a temporary file is created Net Hide P pami EES Switches of I nit dialog box ON OFF of restarting ON OFF of an automatic download function at restart OK Cancel ON OFF switching of an ending state resume function 1 3 2 E nvironment Setup Specifying the MCU file Specify the MCU file for the target MCU Click the Refer button to open the file selection dialog box and select the MCU file When the corresponding MCU file does not exist it is necessary to make the MCU file newly Please refer to item Method of making the MCU file of the release note appended to this product package for the method of making the MCU file Specifying the script file to be executed at startup Specify a script file if you want to execute script commands a
239. tput cycle Cycle count Address display area 0003E0 Address display area Output data display area Addr ispl r It displays the address to be monitored for virtual port output tput data displ r It displays the data as virtual port output results by hexadecimal numbers To reference data values move the mouse cursor into this area and the value and the cycle count of the data at which the cursor is positioned will be displayed in the cycle count display area Cycle count display area It displays cycle counts 76 Window function of PD79SIM 1 14 7 Structure of Virtual Interrupt Screen 1 14 7 1 Screen structure for cycle synchronized interrupts When you ve set virtual interrupts that are synchronized to machine cycles a display screen configured as shown below will appear SE cycle Cycle Vec Pri JO0000000000000000000030 101010 303030103030 Cycle count display area i Ges EE So Vector Priority level Virtual interrupt display area address display area display area Vector address display area It displays the vector address of a virtual interrupt Priority level display area It displays the priority level of a virtual interrupt Virtual interrupt display area It displays timing at which the virtual interrupt you ve set is generated fL This means that a virtual interrupt is generated EI This means that a virtual interrupt is not generated Cycle count display area It displays cy
240. tual port outputs choose the I O Window menus Option gt Setup or the Setup button The dialog box shown below will appear Setup Dialog Select Type Sg C Set Virtual Port Input we Select this item Te Set Virtual Interrupt Cancel 159 PD79SIM User s Manual Here choose the item Set Virtual Port Output and press the Next button Or press the Cancel button if you want cancel the setup session and close the dialog box A dialog box for setting the address you want to be monitored for virtual port output will appear Setup Dialog Input the Output Address sides you want to be monitored for output Input the address you want to be monitored for virtual port output in the Output Address column Then press the Next button A dialog box for specifying a file virtual port output file to which you want the virtual port output results to be saved recorded will appear PD79SIM saves the virtual port output results that have occurred during program execution to this file and references it when the program stops running Save in 0_Samples x c File name Joutput ser Save as type Script Files scr x Cancel Here input the directory and file names in which you want the virtual port output file to be saved When you ve input a file name press the Save button Thus you ve finished setting virtual port outputs 160 Setting Virtual Interrupts in 1 0 Window 3 Setti
241. two stack pointers S and ISP registers If while the program is running it causes a change in the value of a stack pointer monitoring of stack utilization of that stack stops at that point 3 11 2 Cycle Count Monitor Function The CYcle CY Command Use the CYcle command to determine the number of cycles in a program that has been run The number of cycles is obtained using the values described in the 7900 Software Manual 11 PD79SIM User s Manual 4 PD79SIM Input and Output Files 4 1 Input Files PD79SIM processes the following input files 4 1 1 EEE 695 Absolute Format Files ThelEEE 695 absolute format files contain debugging information such as data on the variables used in the source files as well as line data and machine language data These files which are generated by the nc79 C compiler as79 relocatable macro assembler and In79 linkage editor take the attribute x79 4 1 2 Intel HE X format Files The Intel HE X format files store machine language data These files which are generated by the Imc79 load module converter supplied with the as79 relocatable assembler take the attribute hex they are converted from IE EE 695 absolute format files 4 1 3 Motorola S format Files The Motorola S format files contain machine language data These files which are generated by the Imc79 load module converter supplied with the as79 relocatable assembler take the attribute mot they are converted from EEE
242. ual interrupts you ve set using the Setup menu can be changed To change the display modes choose the menus Option gt Mode or the Mode button A dialog box like the one shown below will appear Mode Dialog Select Input Display Mode grececcesseesossesoe amp Cycle Style Graph C Read Access C Interrupt Select Output Display Mode CG Cycle Style Graph Select Interrupt Display Mode CG Cycle C Executed Address Cancel The following explains how to change each display mode 4 3 1 Changing Display Mode of Virtual Port Input 1 For cyclesynchronized inputs Choose Cycle in the Select Input Display Mode column Then choose the desired display mode in the Style column Choose Chart if you want the selected input to be displayed in chart mode Choose Hex if you want the selected input to be displayed in hexadecimal mode Choose Graph if you want the selected input to be displayed in graphic mode 2 For read access synchronized inputs Choose Read Access in the Select Input Display Mode column 3 For interrupt synchronized inputs Choose Interrupt in the Select Input Display Mode column 4 3 2 Changing Display Mode of Virtual Port Output Choose your desired display mode from Style in the Select Output Display Mode column Choose Chart if you want the selected output to be displayed in chart mode Choose Hex if you want the selected output to be displa
243. us which among PD79SIM functions are used to control the display mode of each window provided by PD79SIM and to open the basic windows of PD79SIM DEST arrangelcon buagees JI rogram Window Make Program Window ave 1 source Window Open Source window Register Window Open Register Window Memory Window Open Memory Window 1 Bump Window Open Dump Window RAM Monitor Window Open RAM Monitor Window 1 SM Watch Window Open ASM Watch Window C Watch Window Open C language level Watch Window C Watch Window Open C Watch Window Local Window Open Local Window Eile Local Window Open File Local Window Global Window Open Global Window Script Window Open Script Window ie ee 31 PD79SIM User s Manual The Optional Window menu has assigned to it the menus which among PD79SIM functions are used to open windows of greater functionality OptionalWindow VO Window Open 10 Window ee GUI Input Window Open GUI input Window oo eee GUI Output Window Open GUI Output Window MR Window Open MR Window Sa CoverageWindow Open Coverage Window ete Custam Window Option User definition menu 1 1 3 8 Help The Help menu contains the items for displaying PD79SIM help messages and the PD79SIM version No Display version information about PD79SIM er 32 Window function of PD79SIM 1 2 Program Window The Program Window displays the machine code at the current program counter The lin
244. ut data you ve set virtual port input file will appear ki E4 E E Save Data Here enter the directory and file names in which you want the data you ve set to be saved The saved file can be loaded into PD79SIM back again by using the 1 O Window menus Option gt Load or the Load button When you ve input a file name press the Save button Thus you ve finished changing virtual port input data 168 Other Functions of 1 0 Window 4 1 2 Changing Setup Data of Virtual Interrupts To change the setup data choose the menus Option gt Modify or the Modify button A dialog box like the one shown below will appear Modify Dialog Select Type SEENEN C Modify Virtual Port Input Modify Virtual Interrupt Here choose the item Modify Virtual Interrupt and press the Next button Or press the Cancel button if you want cancel the session and close the dialog box A dialog box for selecting the virtual interrupt whose settings you want to be changed will appear Modify Dialog oe Generation eege lt Prev Cancel First choose the type of virtual interrupt you want to be changed in the Interrupt Generation Timing column When selected the currently set virtual interrupts are listed in the Select Data column Here choose the virtual interrupt you want to be changed Then press the Next button Or press the Prev button here if you want to return to the previous dia
245. value for selected C variable Cancel selection of C variable Change contents of display Change radix Layout Turn on off type name Sort Display String Display the string Display character RAM Monita Display RAM monitor Enable Turn on off RAM monitor area RAM Monita Aree Set RAM monitor area Cda Set color of access attribute display Sampling pericd Set sampling period for RAM monitor Clear Clear access attribute 59 PD79SIM User s Manual 1 12 Global Window The Global Window lists C global variables and their values The display is updated after each command is executed 1 12 1 Structure of Global Window Mojule name Toolbar Scope display area fte Global Window Cuatch Set Prog test hex long g_near_const_long 1234 long g_near_slong 0 unsigned long g_near_ulong 0 long g_near_long 0 lect collect 0x94 Display of variable name Data display area Display of variable type Display of variable value 1 12 2 Global Window Toolbar The Global Window toolbar is the same as that in the Local Window See Section 1 10 2 Local Window Toolbar under Window Functions for details 1 12 3 Extended Menus in the Global Window When the Global Window is active in the PD79SIM main display area extended menus for the Global Window are allocated to the Option menus The extended menus of the Global Window are identical to those of the Local Window See Section 1 11 3 Extended
246. ving to specify its file name To reload a file choose the PD 79SIM window menus File gt Reload The file is reloaded when these menus are selected 1 2 To Reload the recent downloaded file The recent downloaded files maximum files of 4 are listed in the PD79SIM Window menu File To reload the file select the file name listed PD79SIM C Usr mina PD PD79SIM Sa File Edit View Environ Debug Optior Download gt Reload Upload Auto DownLoad Save Disasm 1 C PD79SIM Sample ncrt0 x79 Exit NOTE If the length of the file name with path is more than 25 characters the display of the upper directory is abbreviated SI Loading and Displaying the Target Program 1 3 To download the target program automatically when updated If the target program is updated when a command executing the target program it can De downloaded automatically To select the PD79SIM Window menu File gt AutoDownLoad the AutoDownLoad dialog box open You can specify this function in this dialog box AutoDownLoad C Enable AutoDownLoad confirm C Enable AutoDownLoad no confirm Disable AutoDownLoad Cancel Enable AutoDownL oad confirm Downloading automatically with confirmation when the target program is updated Enable AutoDownL oad no confirm Downloading automatically without confirmation when the target program is updated Disable AutoDownL oad Not down
247. virtual interrupt occurs The data size that can be input is one byte The diagram below shows an example of a virtual port input that is synchronized to interrupts Shown in the sample program below is the case where data is read from port 1 address 3 using an interrupt handler routine in this case a timer interrupt handler routine pragma ADDRESS portl 3H char port1 pragma INTERRUPT read_port P Interrupt handler for polling port 1 read_port char key key port1 Input from port 1 This interrupt handler routine aims to assign the value of port 1 to variable key when a virtual interrupt is generated In such a case a value can be assigned to variable key by entering it to port 1 when a virtual interrupt in this case a timer interrupt is generated It is assumed that timer interrupts are generated using a separately available virtual interrupt function For details refer to the virtual interrupt function described later in this manual To support processing of interrupt handlers like this PD79SIM provides a function that allows you to define the data to be input according to a number of times a virtual interrupt is generated a virtual input port synchronized to virtual interrupts By using this function you can perform an operation where data OxFF is input to memory address 3 when the virtual interrupt occurs first and data OxFE is input to said memory address when the virtual interrupt occurs next tim
248. w in task status mode TSK So TIM FLG SEM MBX CYH ALH MPL Current Run Task 1 mam ID StaAddr name Pri Status mup count 18000H _main 1 RUN 000 01814383H task RDY 0000 0181ACH _task3 SUS 0000 0181B5H task4 WAT SL 0000 0181C2H task5 WAI CSI 0000 181CFH _task6 WAT CDL 0000 QO181DFH task WAT CDL 0000 O181EFH _task8 WAT CFL 0000 018211H task9 WAT CFL 0000 018233H _task10 WAT CSI 0000 18243H _task11 WAT CSE 000 18253H _task1 WAT CM 0000 18271H _task13 WAT MBX S 0000 1828FH _task14 DMT 18298H _task15 WAI SLP TMO 0000 182A8H _task16 WAI CSLP TMO SUS 000 TWF_ORW TWF_ORW 1 2 3 4 5 6 8 9 _ l iii 5 sl SE Se Se Se ses bb been a zb ab Se The following items are displayed in TSK mode All tasks defined during configuration are displayed in order of their ID Nos deeg Wakeup count oS O wup count Wake up count If task is waiting for time it indicates its timeout value reckoned from current time Wait bit pattern of event flag Wait cancellation condition of event flag In TSK mode the status bar indicates the following Current Run Task Task ID and task name of the currently executing task nothing is displayed when idle 218 Real time OS Debugging Function The following are displayed in the Status area IWAI DLY SUS _ Time wait state due to dly tsk WAIT SUSPEND Semaphore wait stat
249. will appear neut read Number of times Address Read 1 2 3 4 5 6 01 GG 04 05 06 07 Address Read address display Input data display area display area area aya Dae lt Read access count 8 9 display area Addr ispl r It displays the memory address to which a virtual port is input R ddress displ r It displays the address to be monitored for read access Input data display ar It displays the virtual port input data that has been set by hexadecimal numbers To reference data values move the mouse cursor into this area and the value and the read access count of the data at which the cursor is positioned will be displayed in the read access count display area Read nt displ r It displays read access counts 12 Window function of PD79SIM 1 14 5 3 Screen structure for interrupt synchronized inputs When you ve set virtual port inputs that are synchronized to virtual interrupts a display screen configured as shown below will appear O Virtual interrupt occurrence count display area Input interrupt Address Veo l Address Vector Input data display area display address area display area Address display area It displays the memory address to which a virtual port is input Vector address display area It displays the virtual interrupt vector address to be monitored Input data display area It displays the virtual port input data that has been set by hexadecimal numbers
250. xample if following statements are written pass sint Oxffec 3 sint becomes true established when a specified virtual interrupt is generated set 0x800 0x10 the set statement is executed only after a timer AO interrupt vector address Oxffec occurs three times 199 PD79SIM User s Manual 7 3 3 J udge Statements if else J udge statements judge the results of expressions thereby causing the statements to be executed to branch off The following shows a description format if conditional expression Statement 1 else if conditional expression Statement 2 else Statement 3 When if conditional expression is true not 0 statement 1 is executed If the conditional expression is false 0 elseif conditional expression is evaluated to see whether it is true or false Ifthe conditional expression is true statement 2 is executed Otherwise statement 3 the else statement is executed The else if and else statements can be omitted The if statement can be nested in up to 32 levels Right side expressions can be used for the conditional expression The conditional expressions written in 1 O script are calculated as unsigned type Therefore if negative values are compared in an if statement the operation to be performed by PD79SIM is indeterminate 7 3 4 Repeat Statement while and break Statement Repeat statements judge the results of expressions thereby executing statements repeatedly
251. y area of the window You can cancel a software breakpoint by again clicking the line indicated by B then clicking the Break button 4 8 Saving Breakpoints Click on the button in the S W breakpoint setup dialog box to bring up a file select dialog box When this dialog box appears specify a file namein which you want software breakpoints to be saved If a file name extension is omitted an extension brk is automatically added 4 9 Loading Saved Breakpoints To load the saved breakpoints from a file click on the button in the S W breakpoint setup dialog box When a file select dialog box appears specify the file you want to be loaded The breakpoints read from the file are added to the currently set breakpoints If the total number of software breakpoints exceeds 64 the 65th and following breakpoints are ignored 124 Hardware Breaks 5 Hardware Breaks Use hardware breaks to break target program execution when memory is accessed Use the H W Break Point Setting dialog box to set a hardware break point Hardware breaks are effected when data is written to or read from memory or an instruction is fetched You can set up to 64 hardware break points f you set multiple hardware break points the target program stops as soon as execution reaches any of the hardware break addresses 5 1 Opening the H W Break Point Setting Dialog Box Click the HW button on the PD79SIM Window toolbar Press function key Shift F 7
252. y bit 0 or 1 if you selected Negative Input the desired memory address Select color for the LED that is displayed when memory value coincides with the one specified for Display Color1 in the Data column Select color for the LED that is displayed when memory value coincides with the one specified for Display Color2 in the Data column The LED is lit in the color selected in the Color1 column when the data specified here is output The LED is lit in the color selected in the Color2 column when the data specified here is output PD79SIM User s Manual 6 When you press the Color1 or Color2 button a dialog box for selecting LED colors appears Color HEI Basic colors EI RI WI TI FI EREE ai Ree EI Ga LUUEE GEI UEEEE Eee WI Custom colors S ip i i i g g BEBE eee Define Custom Colors gt gt Canca Here choose colors in which you want the LEDs to be displayed and press the OK button 7 Thus you ve finished creating and setting an LED 8 To create another LED repeat steps 1 to 7 described above 6 4 Saving Parts You ve Created When you ve finished creating parts you can save the data setup contents and layout of the parts you ve created to a file GUI output file Thesaved GUI output file can be loaded into PD79SIM back again by using the menus Option gt Load to reproduce the saved parts Follow the procedure below to save the parts data Choose the GUI Out
253. yed in hexadecimal mode Choose Graph if you want the selected output to be displayed in graphic mode 1 6 Other Functions of 1 0 Window 4 3 3 Changing Display Mode of Virtual Interrupt 1 For cyclesynchronized interrupts Choose Cycle in the Select Interrupt Display Mode column 2 For executed address synchronized interrupts Choose Executed Address in the Select Interrupt Display Mode column 4 4 Changing Scale of Display Screen The scale of the virtual port input virtual port output or virtual interrupt display screen can be changed This means changing the number of cycles that can be displayed in one screen To change the display scale choose the menus Option gt Scale or the Scale button A dialog box like the one shown below will appear Scale Dialog Ea Input HE H 14 Output 4 ele H 10000 Interrupt 4 E 104 Cancel The following explains how to change the scale of each display screen 1 To change the scale of the virtual port input display screen slide the scroll bar in the Input column until the scale you want is reached 2 Tochange the scale of the virtual port output display screen slide the scroll bar in the Output column until the scale you want is reached 3 Tochangethe scale of the virtual interrupt display screen slide the scroll bar in the Interrupt column until the scale you want is reached The display scale can be changed in the range of 1 to 10 000 cycles For exa
254. you scroll backwards Note that the internal buffer is cleared if you execute a command that changes the first line If you disassemble an area data or empty area etc other than the program the contents of memory are interpreted as instruction code and displayed in disassembled format In this case is displayed for undefined instructions and operands e Doubleclick the address display area to change the display starting address Theresult of the Coverage measurement is displayed by selecting On in the Menu Option gt Coverage 35 PD79SIM User s Manual 1 2 2 Shortcut Menus of the Program Window When you click the right mouse button in the Program Window the shortcut menu opens And you can display the source file that contains the selected function or you can register the selected variable as C watch point Menu ___ Menu options unge Shortcut Keys Right Clicking umptofundion Display the sdected funcio Open SourceWindow Displaythesdected fundio Qpaningthenew SourceWindow AddC Watch Register theC watch pant ofthesdected variable AddC Watch Panter Register theC watch paint of thesdected variables panter AdcdASM Watch Register theASM watch pant of thesdected symbd BitAdd ASM Watch Register theASM watch pdt of thesdected bit art Open thesourcefileby theeditor Register theeditar toqoe thesourcefiles Open theLineAssarbleDialagBax 1 2 3 Program Window Toolbar button Display
255. you selected Negative Input the desired memory address Bit Or Data i p Input the character string C Bit bat Mom to be displayed when Select Data _ P Data memory value coincides with the one specified for Display Namel in the Data column Input the character string to be displayed when memory value coincides with the one specified for Display Name in the Data column Logie Positive CNegative Data Display Namel Display Name2 The character string in the Name column is displayed when the data specified here is output The character string in the Namez2 column is displayed when the data specified here is output 6 Press the OK button in the dialog box Thus you ve finished creating and setting a label 7 To create another label repeat steps 1 to 6 described above 189 PD79SIM User s Manual 6 3 Creating LEDs Follow the procedure below to create LE Ds 1 Choose the GUI Output Window menus Option gt Make LED or the LED button 2 Next move the mouse cursor into the GUI Output Window s output panel display area at which time the mouse cursor will have its shape changed to a cross 3 Whilein this state click the left mouse button at a position where you want to create an LED Hold down the left mouse button while you move the mouse cursor to expand its size and release the left mouse button where the size is what you want
256. ypes You can use casting to typedef types types other than the C basic types and the pointer types to them When casting toa pointer type you can also use pointers to pointers and pointers to pointers to pointers etc Note You cannot cast to struct or union types or the pointers to those types 261 PD79SIM User s Manual 3 1 12 Variable Names and Function Names As defined in C variable and function names are character strings that start with a letter They can consist of up to 255 characters 3 1 13 Character Constants You can use characters enclosed in single quote marks as character constants For example Ar br etc These character constants are converted to ASCII code and used as 1 byte immediate values Notes You cannot register character constants only as C watchpoints Character constants are valid only when used in a C expression that specifies a C watchpoint and when specifying a value to be assigned character constants are processed in the same manner as immediate values 3 1 14 Character String Literals You can use character strings enclosed in double quote marks as character string literals Examples are abcde I am a boy etc Note Character string literals can only be placed on the right side of an assignment operator in an expression They can only be used when the left side of the assignment operator is a char array or a char pointer type In all other cas
257. ys the cycle handler status Format 8 MR ALH ALM A Displays the alarm handler status Format 9 MR RTSK RT Displays active tasks Format 10 MR STIM ST Displays the system clock count Format 11 MR CTX CT task No Displays the context of the specified task Format12 MR MPL Displays the memory pool Format 13 MR STK SYS TSK BASE CLEAR Measure the system stack task sizes used Function Displays the status of the real time OS MR79 Invokes the specified system call Note Please use the startup file crtOmr a79 start a79 whose contents matches with the version of MR79 when you make downloaded program The MR window and MR command will not run properly if the startup file you uses don t match with the version of MR79 Displaying the status of the real time OS Displaying the task status Use format 1 Enter the following to display the task status MR or MR TSK The following items are displayed PID TaskIDNo o O Value of wakeup count Value of timeout count Event flag wait bit pattern flg mode 2 Event flag wait end condition 247 PD79SIM User s Manual 1 Task status Sleep state WAIT SUSPEND IWAK DLY Time wait state due to dly tsk IWAL DLY SUS __ _ Time wait state due to dly tsk WAIT SUSPEND Event flag wait status Semaphore wait status Sleep state with time out Event flag wait state with time out double wait WAI SEM TMO SUS 2 E vent flag wait end condition

Download Pdf Manuals

image

Related Search

Related Contents

SERVICE MANUAL  Samsung NV9 User Manual  Macintosh 版 取扱説明書(別冊)  VF-nC1 Industrieller Frequenzumrichter  DIGITAL TORQUE WRENCH  CFM Alle Typen Betriebsanleitung Deutsch  dr47-48 (complet)  Slam Stick User`s Manual - Midé Technology Corporation  

Copyright © All rights reserved.
Failed to retrieve file