Home

M32C PC4701 Emulator Debugger V.1.03 User`s Manual

image

Contents

1. task4 task5 Unknown aimi By moving the mouse to any information displayed in the window the following window is opened showing the detailed information Interrupt handling or task execution history System call issue history Task state transition history 213 7 15 241 Search the History of System Call Issue Click the Search button in the tool bar The Search dialog is opened Or select Menu Search tem Call Search Parameter Return Parameter RO Function Code RO Error Gode B t fact cyo TE Ok a bas ag a E OBJ che pri E QOVR clr_fle E TMOUT dis den F_RIWAT Ri Ri F Ri Ri R2 R2 Fr FR R3 R3 Ra R A0 Object ID AQ Direction Forward C Backward Close Specify the search condition With the function code RO Function Code and error code RO Error Code you can specify multiple values OR condition Other items are searched based on the AND condition Then specify the search direction The debugger searches the items in the direction specified in the dialog using the position pointed by the indicator as the radix point When the debugger does not check all the search items the subsequent system call issuance history in the search direction will be a search result Click the Find Next button The debugger searches the system call issuance history c
2. Product Name y Option The debugger for M32C yspc The debugger for M16C R8C yspc 3 Build your program after the setting above We do not evaluate other settings so we can not recommend to append other options 279 MEMO 280 M32C PC4701 Emulator Debugger V 1 03 User s Manual Publication Date Jul 01 2007 Rev 1 00 l Sales Strategic Planning Div POplished ty Renesas Technology Corp Microcomputer Tool Development Department Edited by Renesas Solutions Corp 2007 Renesas Technology Corp and Renesas Solutions Corp All rights reserved Printed in Japan M32C PC4701 Emulator Debugger V 1 03 User s Manual ratkENESAS Renesas Electronics Corporation 1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan REJ10J1603 0100
3. Command Name Short Name Contents SoftwareBreak SB Sets and checks software breaks SoftwareBreakClear SBC Clears software breaks SoftwareBreakClearAll SBCA Clears all software breaks SoftwareBreakDisable SBD Disables software breakpoints SoftwareBreakDisableAll SBDA Disables all software breaks SoftwareBreakEnable SBE Enables software breakpoints SoftwareBreakEnableAll SBEA Enables all software breaks BreakAt E Sets a software breakpoint by specifying a line No BreakIn Sets a software breakpoint by specifying a function 240 8 Table of Script Commands 8 1 7 Hardware Break Setting Commands Command Name Short Name Contents HardwareBreak HB Sets and checks a hardware break Protect PT Sets and checks protect breaks BreakMode BM Sets and checks hardware break mode 8 1 8 Real time Trace Commands Command Name Short Name Contents TracePoint TP Sets and checks a trace points TraceData TD Realtime trace data display TraceList TL Displays disassembled realtime trace data 8 1 9 Coverage Measurement Commands Command Name Short Name Contents Coverage CV Specifies and displays coverage measurement 8 1 10 Script Log File Commands Command Name Short Name Contents Script i Opens and executes a script file Exit 3 Exits the script file Wait Waits for an event to o
4. MR Displays status of realtime OS MRxx 8 1 17 Utility Commands Command Name Short Name Contents Radix Sets and checks the radix for numerical input Alias Specifies and checks command alias definitions UnAlias Cancels the alias defined for a command UnAliasAll Cancels all aliases defined for commands Version VER Displays the version No Date Displays the date Echo Displays messages CD Window open 242 8 Table of Script Commands 8 2 Table of Script Commands alphabetical order Command Name Short Name Contents AddPath S Adds the search path Alias Specifies and checks command alias definitions Assemble A Line by line assembly Bit Checks and sets bit symbols BreakAt Sets a software breakpoint by specifying a line No BreakIn d Sets a software breakpoint by specifying a function BreakMode BM Sets and checks hardware break mode CD Specifies and checks the current directory Clock CLK Checks and changes the clock Coverage CV Specifies and displays coverage measurement Date 7 Displays the date DisAssemble DA Disassembles memory contents line by line Down Displays a called function DumpByte DB Displays the contents of memory in 1 byte units DumpLword DL Displays the contents of mem
5. cccccccccccssesssseceeececeesssaeeeeececsensaaeeeeeeeeseees 10 1 8 Member Reference Using Arrow ccccccccccccessesssseeececeesesnsceccceceesesneceeececsenseaeeeeeeeenes 10 19 Pointers to Members Lanseres eee 10 1 10 Parenthesesasnsurmsvssagdsd banen tect a aaa aa a e a a K B AeA AGP B7 EAT E EAEE AAEE EAE EE AAE A A E A OEE 10 1 12 Castine to Basic Types cene e r E a A O 10 1 13 Casting to typedef Types ccccccccccsessscccccecsesssssceeececeessseeeeececeesesaeeeeeesesenesaeeeeeceenes 10 1 14 Variable Name 10 1 15 Function Name 10 1 16 Character Constants orcrnns 10 1 17 Character String Literals 10 2 1 Enumeration Types 10 2 2 Basic Types 666 10 2 3 Pointer Types 10 2 4 Array Types 00 10 2 5 Function Types eronnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnenenenenenenenenenenenenenenenenenenenenenenenenenene TO2 G6 Ref re nc Typesussnsardssr daua stuet 10 2 7 Bit Field Types rornnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnenenenenenenenenenenenenenenenenenenenenenenenenenenenenenenennne 10 2 8 When No C Symbol is Found eeonnnnrornrorreenonnrnrnensrennennrnnnenssnenennrnnnensrnnnennrnnnenssnssennnen 10 2 9 Syntax HE rrorsescd ciescecacstscssissvecddeesdvcnses du sce costae vadeccelecoid been A snare A dd 10 2 10 Structur and Union Types ieren e e a E E E Display the Cause of the Program Stoppage Attention 1D 1 Common Attentionisssanasesnakutdakmesaradredu
6. f7 97 Am f E CEOE 1 m m 41 m taskS p j dllq 8 4 S T taskl0j 1 M 4P W E 10 foo ula fen his lo to o Drag the start marker position and end marker position The time interval between the markers is displayed in the status bar Note Definition of time value in the Task Trace window The time value in the Task Trace window indicates the execution elapsed time which sets the program execution start point to 0 in all the cases On the contrary a numeric value above the grid line scale in the Task Trace window is a relative value which sets the start marker to 0 the grid interval is specified in the Value dialog which has nothing to do with the time value It is provided so that you can see the window easily 7 182 3 1 Move the Marker Each marker can be moved by dragging When moving the mouse on the marker the cursor shape changes Then start dragging The start marker moves into the window left portion by clicking the Start Marker button in the tool bar Or select Start Marker from popup menu by right clicking on the window The end marker moves into the window right portion by clicking the End Marker button Or select End Marker from popup menu The indicator moves int
7. e Up to 8 characters can be displayed in the task name in the WaitQueue Message field If a task name exceeds 8 characters the extra characters are omitted 198 7 Windows Dialogs 7 14 7 2 Display the Mailbox Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 All the mail boxes defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of mailbox Mbxatr Attribute of each mailbox Mailbox Queue Wait ID No and task name of tasks waiting for messages Mailbox Queue Message The messages stored in the mailbox e The following are displayed in the Mbxatr area TA_TFIFO Task wait queue is in FIFO order TA_TPRI Task wait queue is in task priority order TA_MFIFO Message queue is in FIFO order TA_MPRI Message queue is in message priority order e When a task connected to the mail box queue is in the state of waiting with timeout enabled waiting in trev mbx a string tmol which indicates the state of timeout enabled is appended to a string displayed in the Mailbox Queue Wait field When a task connected to the mail box queue is in the state of forced waiting Double waiting a string s which indicates the state of double waiting is appended to a string displayed in the Mailbox Queue Wait
8. Hide Hide window 175 7 11 6 Display of bus information on the M32C Debugger From left to right the contents are as follows e Address e The status of the address bus e Data The status of the data bus e BUS The width of the external data bus 8b for an 8 bit data bus and 16b for a 16 bit data bus e BIU This shows the status between the BIU bus interface unit and memory and BIU and I O Representation BIU status No access WAIT Executing wait instruction RBML Read access bytes ML on F Fetch access QC Discontinuous Fetch access queue buffer RWML Read access words ML on INT Interrupt acknowledge RB Read access bytes WB Write access bytes DRB Read access by DMA bytes DWB Write access by DMA bytes RW Read access words WW Write access words DRW Read access by DMA words DWW Write access by DMA words e R W Shows the status of the data bus R for r ead W for wr it e for no access e RWT This signal shows the effective position in the bus cycle 0 when effective Address Data and BIU signals are valid when RWT is 0 e CPU OPC OPR This shows the signal between CPU and BIU In the column CPU the data shows whether CPU accesses BIU or not In the Column OPC the data shows the byte size of read operat ion code In the Column OPR the data shows the byte size of read operand 176 7 W
9. Te Coverage Base Address OC0000 OFFFFF Funct jon Start End main 0F0042 OFO08C randam_access OFOOS8E OFOOCI Func_Globa OFOOC2 OFO124 Func_Loca OFO12C OFO1A2 Func_Static OFO1A4 OFO1DC Func Exe OFO DE OFO23E exe_stub OF0240 OFO25C Function Name Coverage of Each Function Function Scope e The coverage measurement area is an any 256 KB area starting from the 64 KB boundary The top address of the coverage measurement area is called coverage base address By default the coverage base address is set to Oh e By double clicking any function line the corresponding function appears in the Editor Source window e During coverage measurement appears in the coverage display area e You can change the display ratio between the function name display area and the function range display area using the mouse 93 7 4 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Select source file Select a source file for checking the coverage Auto Refresh Refresh coverage measurement result automatically Refresh Refresh coverage measurement result Clear Clear coverage measurement result Base Change coverage base address File Save Save coverage measurement result to file Load Load coverage measurement result from file Layout Address Switch display or non display of Address area
10. e The display of the ID field varies depending on which one is specified fixed length or optional length If the data is of fixed length the ID field displays a string F and memory pool ID number For an arbitrary length the contents displayed on the first line are the character string V a memory pool ID number and a block ID number Displayed on the second to fourth lines are the memory pool ID and block ID numbers The block ID numbers are enclosed in parentheses When specifying the optional length memory pool is displayed in the Total Mlk cut field No bit information is displayed in the Free Blk_cnt map field When specifying the fixed length memory pool the display format of each bit in the memory block information in Free Blk_cnt map is as shown below item Contents 0 Memory block in use busy J Memory block not in use ready No memory block 205 7 14 11 2 Display the Memory Pool Status When the realtime OS is MRxx conformed to ulTRON specifications V 4 0 All the memory pools are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of memory pool Mplatr Attribute of each memory pool Mpladr Base address of memory pool Mplsz Size of memory pool Blkent Total block count of fixed length memory pool
11. No change DMA Data access other than a CPU cause such as DMA INT Start of INTACK sequence IB Instruction code read due to CPU cause bytes DB Data access due to CPU cause bytes IW Instruction code read due to CPU cause words DW Data access due to CPU cause words R W Shows the status of the data bus R for read W for write for no access RWT This signal shows the effective position in the bus cycle 0 when effective Address Data and BIU signals are valid when RWT is 0 CPU Shows the status between CPU and BIU bus interface unit 178 7 Windows Dialogs Display format Status No change CB Operation code read bytes RB Operand read bytes QC Instruction queue buffer clear CW Operation code read words RW Operand read words QN Shows the number of bytes stored in the instruction queue buffer in the range 0 to 4 B T Shows the level of the external break trigger the EXTIN7 pin of the external trace signal input cable High level 1 Low level 0 QT Shows the level of the external trace trigger the EXTING pin of the external trace signal input cable High level 1 Low level 0 76543210 Shows the status of the 8 bit external signal pins EXTINO to EXTIN7 of the external trace signal input cable High level 1 Low level 0 h m s ms us Show the elapsed time from the target program beginning 179 7 11 8 Displa
12. ccccccccccccessesssceecceceessseceeececsessseeeecesceeneaeaeeeeeees 153 7 9 6 Command Button sastaaspetesareg usle 153 7 9 7 Specify the Events Instruction Fetch ccccccccesssscssessescssescescseescsecsessesecsesseeesseeseeeenes 154 7 9 8 Specify the Events Memory Access c c ccccssescsssssescssessescsesscsecseescsecsesscsecsesscsecsesseeenes 154 7 9 9 Specify the Events Bit Access cccccccccssesssssssescsseseescsessesecsessesecseescsecseesesecsessseesseesseeents 154 7 9 10 Specify the Events Interrupt sosina inen iri iiri an 154 7 9 11 Specify the Events External Trigger Signal rrsrvrvrrvrrrvrvvrrvervrrvesvervsrsesvrersesvesvervene 154 7 9 12 Specify the Event Combination Condition cccccccccccecsessscecececsesssseceeececeesssseseeeeeees 154 7 9 18 Specify the Process ID rrnnororoonnrorrrennnnrnnnenernensnnrnnnrnsseenennnnnnensresnennnnnnensreenennnnnnenenee 154 7 9 14 Specify the write condition cccccecccesssscecececseseececececeenesssseeecceseseaseeeeeesesentaseeeeecs 155 7 10 Time Measurement Window cccccccccceceesesseececececeeseaececececseseaececeeeceeseceaececeseeseaeaaeaeeeesens 159 7 10 1 Specify the Time Measurement Event rrronrrorrrnrrrrronsnnrnrnenrsrensnnrnnnsnsseenennrnnnenssssnene 160 7 10 2 Time Measurement Condition ccccscccceesceceesseeecseeececeeeeecesseeecsesaeescseeeeseesseeeeneaes 164 7 10 3 Command Button da ie e a a Sea wie Side te ade abe 164 7 10
13. v Pr Click the ID field of name field in the task pause display area of the ask line to be displayed If the target task is paused the task Pause position context PC position is displayed If the target task is in a state other than Pause the task start address is displayed You can also use the View button and View menu to display any position 229 7 18 Task Trace Window The Task Trace window measures the task execution history of a program using the real time OS and display it graphically This window is available even when a target program using an OS other than our real time OS MRxx is downloaded ce iol xi EHAA A S a a Mark 00 00 00 000 442 00 00 01 847 055 00 00 01 846 612 Indicator 00 00 00 940 805 Scale 6 939931 Grid 00 00 01 850572 Area Break ID name D AHCB ENT task2 h fb B 4 task3 m M m M EE EE Mm _ taskt 4M f 8 m EE EE E EES E had _ task5 m m m NE ee EE ED task6 4 I fe 1 BB E 4 4 task W E t 8 t B 4 8 t B 4 l U t
14. 3 3 Setting before emulator starts 3 3 1 USB communication Connection of USB devices is detected by Windows Plug amp Play function The device driver needed for the connected USB device is automatically installed 3 3 1 1 Install of USB device driver The USB devices connected are detected by Windows Plug amp Play function The installation wizard for USB device drivers starts after the device had been detected The following shows the procedure for installing the USB device drivers 1 Connect the host computer and the emulator with USB cable 2 Set the emulator s communication interface switch to the USB position Then turn on the power to the emulator 3 The dialog box shown below appears Found New Hardware lt A USB Device Installing Go on following the wizard and a dialog box for specifying the setup information file inf file is displayed Specify the musbdrv inf file stored in a location below the directory where this debugger is installed ATTENTION e Before the USB device drivers can be installed the debugger you use must already be installed Install this debugger first e A user who install the USB device driver need administrator rights e During installation a message may be output indicating that the device driver proper musbdrv sys cannot be found In this case specify the musbdrv sys which is stored in the same directory as is the musbdrv inf file 15 3 3 2 LAN communication
15. OFOGCB global char A OFOOCF global_short 2 OFOODS global_long 3 OFOOGDB global struct m char B global struct m short 5 global struct m long 6 DOFOOEB global struct m struct m uchar 0x10 OFOOEF global struct m struct m ushort 0x20 global struct m struct m uint 0x30 OFOOFB for i 0 i lt 5 i OFO104 for 3 0 3 lt 5 j OFO10D global array i j 0 1 2 3 4 Line number display area Shows the line number information of the displayed file Double click here to bring up a dialog box to change the displayed file Address display area Shows addresses corresponding to source lines Double click here to bring up a dialog box to search for addresses Referenced cycle display area Shows the currently referenced cycle that is marked by gt gt Furthermore the addresses corresponding to source lines if any are marked by Source display area Shows the content of the source file File name Shows the file name of the currently displayed source file Referenced cycle Shows the currently referenced cycle Referenced address Shows the address corresponding to the currently referenced cycle Referenced time Shows the time information corresponding to the currently referenced cycle Other display areas are the same as in bus mode 174 7 Windows Dialogs 7 11 5 Extended Menus This window has the following popup menu
16. Variable names that begin with English alphabets as required under C C conventions can be used The maximum number of characters for variable name is 255 And this pointer is available 10 1 15 Function Name Function names that begin with English alphabets as required under C conventions can be used In the case of C no function names can be used 10 1 16 Character Constants You can use characters enclosed in single quote marks as character constants For example A b etc These character constants are converted to ASCII code and used as 1 byte immediate values Notes e You cannot register character constants only as C watchpoints e Character constants are valid only when used in a C 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 10 1 17 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 Notes e 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 cases a syntax error results 257 10 2 Display Format of C C Expressions C C expressions in the data display areas of the C Watch Windows are displayed
17. 1 3 Real Time Trace Function ccie enea ae a a E EE E E E EE EARE 6 aea P BA b e LEES a E EA E E E EA EE EEE E 6 1 3 2 Trace Condition Setting anesenriea no n a e hess r E E E 7 1 3 3 Trace Data Write Condition rrrsnvrrrrnnrrrrrennrrrrrsnnrnrrssrnrsrrnnrnrrssnnrsrrssnnrsrrnnnrsrsssnnrsrsssnsssrnnn 7 1 4 Time Measurement Function rrrrrorrronennrrvnvnnrrrrrrnernrrvnrsrsrsnennrsnsssrsrenennrsnnssssrsennrsnssssssssennrsnsssseen 8 1 4 1 The Measurement Condition rrrsrvrornnnrrrrronnrrrrssnnvrrrsrrnrsrrnnrnrrssnnnsrrssnnesrsnnrnsesssnnrsssssnnssrnnn 8 Th COVERAGE Functions sasgssnandsk si EEEE N cea e Se ere 9 1 5 1 Coverage Measurement Area rrrmmsvrrrrrrrrrrrsvrrrrerrrrrrsnvrnrrenssernennrnnnenssessennrnnnenssesssensnnnsen 9 1 5 2 R lated VA OV a hav Hobe bei cobs Destin ces cad caste cud da Seach bovtah dts iii 9 1 6 Real Time OS Debugging Function cccccecccccccecsessseceeececsesssececececeesesseseeeeeceesesseaeeeeseeesenees 10 17 GUL Input Output Functio Me nnne a a a a eee A a Melee 10 2 About the Emulator PC4701 11 2 1 Communication methods cccccccssscecssseeeessececsesececseceeesesneeecsesaececseseecseseeecsesaeeescseeeeeessseesegaes 11 2 2 Function table E A urinen EE 11 3 Before starting the debugger 12 3 1 Communication method by emulator rrrrrvrrrrrrrsroronorvrrrrrrrrnonnrnrnrnrsrrnennrvrnrnssnensnnrnnsensseenannnen 12 3 1 1 USB Interface oasen Herse es lete een 12 JI 2LAN Interface
18. 12 5 3 When Using the IAR C Compiler EW Please specify the project setting by following process 1 The Setting in the IAR Embedded Workbench When you select the menu Project gt Options the dialog for Options For Target target will open In this dialog please select the XLINK as category and set the project setting Output Tab In the Format area check the Other option and select the ieee 695 as Output Format Include Tab In the XCL File Name area specify your XCL file ex Inkm16c xcl 2 Edit the XCL file Add the command line option y to your XCL file The designation of y option varies depending on the product Product Name y Option The debugger for M32C ylmb The debugger for M16C R8C ylmb The debugger for 740 ylmba 3 Build your program after the setting above We do not evaluate other settings so we can not recommend to append other options 276 12 Attention 12 5 4 When Using the IAR C Compiler ICC 12 5 4 1 Specify the Option Please compile according to the following procedures and link e At compilation Specify the r option e Before linking Open the linker s option definition file extension xcl to be read when linking and add FIEEE695 and y options The designation of y option varies depending on the product Product Name y Option The debugger for M32C ylmb The debugger for M16
19. Sleeping state suspended WAI SLP TMO Sleeping state with time out WAI SLP TMO SUS Sleeping state with time out suspended WAI DLY Delayed state due to dly_tsk WAI DLY SUS Delayed state due to dly_tsk suspended WAI FLG Waiting state for an eventflag WAI FLG SUS Waiting state for an eventflag suspended WAI FLG TMO Waiting state for an eventflag with time out WAI FLG TMO SUS Waiting state for an eventflag with time out suspended WAI SEM Waiting state for a semaphore resource WAI SEM SUS Waiting state for a semaphore resource suspended WAI SEM TMO Waiting state for a semaphore resource with time out WAI SEM TMO SUS Waiting state for a semaphore resource with time out suspended WAI MBX Receiving waiting state for a mailbox WAI MBX SUS Receiving waiting state for a mailbox suspended WAI MBX TMO Receiving waiting state for a mailbox with time out WAI MBX TMO SUS Receiving waiting state for a mailbox with time out suspended e 2Display the Wait Cancellation Condition of Event Flag flg mode Status TWF ANDW Waits for all bits set in the wait bit pattern to be set AND wait TWF ANDW TWF CLR Clears the event flag to 0 when an AND wait has occurred and the task wait status has been cancelled TWF ORW Waits for any one bit set in the wait bit pattern to be set OR wait T
20. Supported only when using the PC4701M HS emulator e This communication uses the host computer s serial interface e The necessary cable is included with the emulator 13 3 2 Download of Firmware It is necessary to down load the firmware which corresponds to connected Emulation Pod when the debugger is started to the emulator e You have changed your emulation pod e The firmware downloaded to the emulator is unknown one e You have setup the debugger for the first time e You have upgraded emulator debugger Press the system reset switch within two seconds after powering up the PC4701 to establish the maintenance mode This debugger searches the version of the firmware downloaded to the emulator at start Also when the firmware downloaded to the emulator is of old version a mode which drives this debugger to download firmware is set When this debugger gets started while the emulator is set in the mode which drives the debugger to download firmware forcedly the following dialog is opened at start Click the OK button to download the firmware You need to download new firmware to use this debugger ATTENTION e If the emulator being used is the PC4701HS use other communication methods dedicated parallel or serial to download the firmware e Before the firmware can be downloaded by the emulator in a LAN connection the IP address etc must first be registered in the emulator 14 3 Before starting the debugger
21. WAI SEM SUS Waiting state for a semaphore resource suspended WAI SEM TMO Waiting state for a semaphore resource with time out WAI SEM TMO SUS Waiting state for a semaphore resource with time out suspended WAI MBX Receiving waiting state for a mailbox WAI MBX SUS Receiving waiting state for a mailbox suspended WAI MBX TMO Receiving waiting state for a mailbox with time out WAI MBX TMO SUS Receiving waiting state for a mailbox with time out suspended WAI SDTQ Sending waiting state for a data queue WAI SDTQ SUS Sending waiting state for a data queue suspended WAI SDTQ TMO Sending waiting state for a data queue with time out WAI SDTQ TMO SUS Sending waiting state for a data queue with time out suspended WAI RDTQ Receiving waiting state for a data queue WAI RDTQ SUS Receiving waiting state for a data queue suspended WAI RDTQ TMO Receiving waiting state for a data queue with time out WAI RDTQ TMO SUS Receiving waiting state for a data queue with time out suspended WAI VSDTQ Sending waiting state for an extended data queue WAI VSDTQ SUS Sending waiting state for an extended data queue suspended WAI VSDTQ TMO Sending waiting state for an extended data queue with time out WAI VSDTQ TMO SUS Sending waiting state for an extended data queue with time out suspended WAI VRDTQ
22. which indicates the state of double waiting is appended to a string displayed in the Data Queue Wait field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 task26 tmol s e Up to 8 characters can be displayed in the task name in the Data Queue Wait field If a task name exceeds 8 characters the extra characters are omitted 201 7 14 9 Display the Cycle Handler Status In the MR window select Popup Menu Model gt Cyclic Handler MR mi OPA ID Stazddr name interval count hon Feo sala status 1 2 3 4 5 6 7 8 OF1C56H OF1C58H OF1c5AH OF1C5CH OF1CSEH OF1C60H OF1C62H OF1C64H eyclel cycle2 eycle3 cycle4 cyclesSj _cycle6 _cycele cycled 0064H O3E8H O1F4H 0258H 00C8H 012CH 0190H 015EH 0064H O3E8H O1F4H 0258H O0c8H 012CH 0190H 015EH TCY_ON TCY OFF TCY ON TCY ON TCY OFF TCY ON TCY ON TCY ON 7 14 9 1 Display the Cycle Handler Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 All the cycle handlers defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of cycle handler StaAddr Starting address of cycle handler name N
23. 00 00 00 000 036 0 02 1 tasklj 11 00 00 00 014 003 00 00 00 000 001 00 00 00 008 957 00 00 00 098 528 60 02 2 task2j 3 00 00 00 013 003 00700 00 000 002 00 00 00 008 669 00700 00 026 008 15 84 mmm H 3 _task3 2 00 00 00 013 006 00 00 00 000 003 00 00 00 006 504 00 00 00 013 009 7 52 h 4 task4 2 00 00 00 013 003 00 00 00 000 001 00 00 00 006 502 00 00 00 013 005 7 92 m 5 tasks 2 00 00100 013 007 00700 00 000 003 00700 00 006 505 00 00 00 013 011 7 93 m Unknown 0 00 00 00 000 00700 00 000 000 00700 00 000 000 00700 00 000 000 0 00 i By clicking the maximum execution time minimum execution time display area of each line you can search interrupt to the clicked line or process history at the maximum minimum execution time of the task The search result is pointed by the indicator which moves to the target position in the MR Trace window 218 7 Windows Dialogs 7 16 2 Configuration of Ready State Duration Display Mode The ready state time display mode by task is used to display the results generated from statistical process of the time required from execution ready to transition to execution by task The statistical result is displayed within the range specified by the start marker and end marker in the MR Trace window Mark 00 00 00 000 335 00 00 00 164 498 00 0000164 163 ID name Hum Max Min sg
24. 000400 0420 lt data lt O4FF 000000 FETCH addr 000000 000000 FETCH addr 000000 000000 FETCH addr 000000 Setting of trace area Setting of trace write condition Setting of combination condition Setting of Process ID e The events listed below can be specified as trace events If the contents of events are altered they are marked by an asterisk on the title bar The asterisks are not displayed after setting up the emulator The debugger for M32C Memory Access Bit Access Trigger Can be substituted by memory access Access type Read The debugger for M16C R8C Fetch Memory Access Bit Access Interrupt Trigger The debugger for 740 Fetch Memory Access Bit Access Interrupt Trigger e Events at up to six points can be used e These events can be combined in one of the following ways Trace when all of the valid events are established AND condition Trace when all of the valid events are established at the same time simultaneous AND condition Trace when one of the valid events is established OR condition Trace upon entering a break state during state transition State Transition condition 147 7 9 1 Specify the Trace Event To set events double click to select the event you want to set from the event setting area of the Trace Point Setting Window This opens the dialog box shown below Event name i Specify the event type Contents change with th
25. Assemble Language Interface 210 7 Windows Dialogs 7 15 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Start Marker Move the start marker in the display area End Marker Move the end marker in the display area Indicator Move the indicator in the display area Adjust Adjust range of start and end marker to full width of display area Adjust Expand Expand scale factor of display Reduce Reduce scale factor of display Trace Stop Stop measuring Trace Restart Restarts measuring Search Search for history of system calls Trace Range After Set measurement range condition to After Break Set measurement range condition to Break Value Set value Color Change display color Init Order Reset the task order on the display Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 211 7 15 2 Refer the Execution History of Task MRxx Window You can reference the task execution history in the MR Trace window You can reference the execution history statistical processing result in the MR Analyze window These windows are available for a target program using our real time OS MRxx 7 15 2 1 Select the Trace Range To measure the task exec
26. Bin Display in Binary Code ASCII Display as ASCII character SJIS Display as SJIS character JIS Display as JIS character UNICODE Display as UNICODE character EUC Display as EUC character Float Display as Floating point Double Display as Double Floating point Layout Label Switch display or non display of Label area Register Switch display or non display of Register area Code Switch display or non display of Code area Column Set the number of columns displayed on one line Split Split window Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 86 7 Windows Dialogs 7 1 2 Setting the RAM monitor area Choose the popup menu RAM Monitor Area in the RAM monitor window The Set RRAM Area dialog box shown below will appear The start address of the currently set RAM monitor area and the range of the RAM monitor area are displayed in the Start and the Area fields of this dialog box No values can be entered in the Size field Set RRAM Area Start fai 0 v Size fi blocks Area 000810 0000F Cancel Use this dialog box to change the position of the RAM monitor area e Specify the RAM monitor area by its start address The size cannot be changed fixed to 1 Kbyte e The start address can be specified in 0x10 byte units If you specify a non aligned address value
27. EW srosnerorvrrvenrvverreresvenserervenserervenseresvevsevevsenenne 276 12 5 4 When Using the IAR C Compiler COn onines onanii aiian ieii 277 12 5 5 When Using the TASKING C Compiler EDE srerorvorrenorverrerervenserervenrerevveveevevsenenne 278 12 5 6 When Using the TASKING C Compiler CM rrsrerrrvrrrererverrevervensenervenserevvenesvessenenne 278 12 5 7 When Using the IAR EC Compiler EW rsrrrrrrrerorverrerervenserervensvnenserervevserevsenenne 279 vi Setup of Debugger Blank Page 1 Features 1 Features 1 1 Real Time RAM Monitor Function This function allows you to inspect changes of memory contents without impairing the realtime capability of target program execution The PC4701 emulator system contains a 1 Kbyte RAM monitor area which cannot be divided into smaller areas This debugger supports the real time RAM monitor function which allows you to reference the memory data without sacrificing real time performance during execution of the target program 1 1 1 RAM Monitor Area This debugger provides a 1KB of RAM monitor area which can be placed at any continuous addresses Base Address 000h Base Address 400h Oh Oh 1 1 2 Sampling Period Sampling cycle means the display update interval You can specify this function in any window which supports the RAM monitor The interval of 100 ms is set by default The actual sampling cycle may take longer time than the specified cycle depe
28. ISP to 0500h when resetting the target program Remember that the interrupt stack pointer ISP is set to 0000h on a unit at the production stage 12 2 3 Option of C Compiler Assembler Linker The information may not be downloaded debugged normally depending on the option designation of the compiler assembler and linker Please refer to the following for the option specification Refer to 12 5 Option of C Compiler Assembler Linker The compiler that can be used by M32C debugger e NCxx e the IAR EC Compiler e the IAR C Compiler 12 2 4 Target MCU HOLD terminal When the target MCU HOLD terminal is set to LOW you cannot stop execution of the target program Set the HOLD terminal to High and try to stop the target program again Even if the HOLD terminal is set to LOW for a short period of time you may stop the target program with the HOLD terminal set to LOW If this happens try to stop the target program again 268 12 Attention 12 2 5 Hardware Event The debugger does not support a command fetch Fetch or an interrupt as a hardware event If you specify word length 2 byte length data from an odd address as an event in the following data accesses the event is not detected Also even when any other bit of the address that contains a specified bit is accessed during bit access the event may become effective Hardware Break Event Real time Trace Event Time Measurement Event In the PID setting you can s
29. S W breakpoints column on the line containing the sort function call Tutorial c i 0 i lt 10 itt Jf rand iftj lt of j j I ali j sorta change a p sam gt s0 a 0 p_sam gt sl al 1 p_sam gt s2 a 2 p_sam gt s3 a 3 The red symbol will appear on the line containing the sort function call This shows that a softwarebreak breakpoint has been set 66 6 Tutorial 6 2 5 Step5 Executing the Program Execute the program as described in the following 6 2 5 1 Resetting of CPU Bij To reset the CPU select Reset CPU from the Debug menu or click the Reset CPU button on the toolbar 6 2 5 2 Executing the Program To execute the program select Go from the Debug menu or click the Go button on the toolbar The program will be executed up to the breakpoint that has been set and an arrow will be displayed in the S W Breakpoints column to show the position that the program has halted Tutorial c ie jopx Source initfp sam i lt 10 i DL chanzefa p sam gt s0 a 0 p_sam gt sl al1 p_sam gt s2 a 2 p_sam gt s3 a 3 Note When the source file is displayed after a break a path of the source file may be inquired In this case please specify the location of a source file 67 6 2 5 3 Reviewing Cause of the Break The break factor is displayed in the Output window oot al at fi r 2 a
30. Serial radio button of the MCU tab in the Init dialog The setting looks like the figure below Parallel Serial C LAN o C USB Port co M1 z Target Baud Rate 38400 z J Self Check Specify the communications port in the Port field and the baud rate in the Baud Rate field 49 5 3 Setup the Debugger for M32C 5 3 1 Emem Dialog In the Emem dialog box setting information on the user target The Emem dialog box opens after closing the Init dialog box Emem Single chip Mode RUT HOLD EE Ea The tabs available on this dialog box vary with each product used For details click the desired tab name shown in the table below Tab Name Contents Status Specify the processor mode Emulation Memory Specify the emulation memory area To keep the Emem dialog box closed next time the debugger is started check Next Hide at the bottom of the Emem dialog box You can open the Emem dialog using either one of the following methods e After the debugger gets started select Menu Setup gt Emulator gt Target 5 3 1 1 Status Tab The specified content becomes effective when the next being start e chip Mode R Y HOLDE BE 50 5 Setup the Debugger 53111 Select the Processor Mode Specify the processor mode for the target system Sinele chip Mode Either the following can be specified e Single chip Mode Single chip Mode e Memory Expa
31. Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window The debugger for 740 doesn t support because the entire memory area is coverage area 94 7 Windows Dialogs 7 4 2 Refer to the Source Line the Executed Address It is possible to refer in the Editor Source Window or Memory Window 7 4 2 1 Refer in the Editor Source Window In the Editor Source window a display of Coverage Measurement is set to Disable by default To enable the display check the Coverage check box in the dialog box opened by choosing the main menu Edit gt Define Column Format The column for a coverage measurement display is displayed on all Editor Source windows And select popup menu Columns gt Coverage in the Editor Source window A column can be set up for each Editor Source windows s t Samplel6 c Init i 0 while 1 I for i 0 i lt DATA SIZE i I data i data i 1 data i 2 data i 3 sub 7 4 2 2 Refer in the Memory Window In the Memory window a display of Coverage Measurement is set to Disable by default To enable the display select popup menu Coverage gt On Off in the Memory window Memory data 95 7 5 Script Window The Script Window displays the execution of text format script commands and the results of that e
32. You cannot use the DA command during execution of the target program Command name Abbreviation DumpByte2 DB2 DumpWord2 DW2 DumpLword2 DL2 e If you use the Memory Reference Change command for the bank duplicated area before MCU is switched from the normal mode to the memory space expansion model by the target program the function may not work as expected e The memory map shows the following data after the debugger gets started Start Address End Address Map Attention 00000 003FF External Cannot be changed SFR area 00400 03FFF Internal The internal RAM area cannot be changed 04000 2FFFF External Cannot be changed 30000 FFFFF Internal 41 Extension Mode 2 e The memory reference commands are added which reference the internal ROM in the bank duplicated area in the dump format see the table below A memory reference command with the bank specification is added The memory reference the change to the bank repetition area must use the following commands Command name Abbreviation DumpByte2 DB2 DumpWord2 DW2 DumpLword2 DL2 SetMemoryByte2 MB2 SetMemoryWord2 MW2 SetMemoryLword2 ML2 FillByte2 FB2 FillWord2 FW2 FillLword2 FL2 Move2 a MoveWord2 MoveW2 e The following emulator functions are implemented by analyzing the bus information address bus data bus RAM monitor function RAM Monitor window C Watch
33. when the emulation pod is re modeled 2 Specify whether the MCU supports the memory space extension function or not When the MCU supports the function EX M16C 62 group specify 1 the other case specify 0 Only when 1 is specified the setting for memory space extension mode is available in Memory Extension Mode tab of INIT Dialog ATTENTION e The areas specified as the ROM in the MCU file are write protected from the program Even if the write command is executed to the area no value is written However you can use the Dump command to write values to memory This is enabled only when the Internal area is mapped by the MAP command e Ifthe RAM is assigned to the same area you must change the setting of the MCU file 5 6 1 1 Example 0 3FF 400 2BFF F0000 FFFFF M30600 0 56 5 Setup the Debugger 5 6 2 Method of making MCU file the 740 Debugger The following content is sequentially described in the MCU file Please describe information on 1 4 referring to the data book on MCU used Number of stack page selection bit Address of CPU mode register End address of stack 1 Address of reset vector POD number 2 Firmware name MCU Information No 3 UO Gu 109 IDLE 1End address of stack Specify the last address of the area to be used as the stack Consider the initial value of the stack page selection bit in the CPU mode register The initial value of the stack page selection bit depe
34. 012 353 00 00 00 135 885 B 66 m H 7 task007 11 00 00 00 013 020 00700 00 006 790 00700 00 012 431 00700 00 136 745 6 72 m H 8 task008 11 00700 00 014 080 00700 00 008 055 00700 00 013 232 00700 00 145 552 3 26 i 9 task009 11 00700 00 013 642 00700 00 007 277 00700 00 012 663 00 00 00 139 295 6 66 m i i 10 task0l0j 11 00700 00 013 710 00700 00 008 070 00700 00 795 00 00 00 140 752 8 97 m 11 taskOllj 11 00700 00 011 892 00700 00 006 290 00700 00 193 00700 00 123 132 7 85 m i i 222 Unknown 0 00700 00 000 000 00700 00 000 000 00700 00 000 00700 00 000 000 0 00 3 The displayed data is the statistical results of the range specified by the start marker and the end marker in the Task Trace window By clicking the maximum ready time minimum ready time display field of each line you can search the processing history at the maximum ready time minimum ready time of the task corresponding to the clicked line The search result is pointed by the indicator in the Task Trace window after the indicator moves to the destination position 238 8 Table of Script Commands 8 TableofScript Commands The following script commands are prepared The commands with yellow color displaying can be executed at run time The command to which adheres behind is not supported according to the product 8
35. 4 Specify the Events Instruction Fetch c c cccccccccsesssscssesseecsseseescsessceecseesssecseesseesseeaes 165 7 10 5 Specify the Events Memory Access ccccccsssssescsseseescssesesecstescsecsesscsecsessesecsessseesseeaes 165 7 10 6 Specify the Events Bit Access cccccssssssesesessssssesesesesessseseseseseseecesesessaesesesesnsneeneneees 165 7 10 7 Specify the Events Interrupt c ccccccccccscsssscssescescsesseescsesscescsessesecsesscsecsesscsessesseeeenes 165 7 10 8 Specify the Events External Trigger Signal srsvrrvrrvrrsvrvvrrvervrsvarvervrssesvrersesvesvervene 165 7 10 9 Set the Measurement Condition ccccccccccesssececeessececseeeeceeseeecsesaececseseeeesseeeenesaes 166 TIL Trace Win dO Wee AE ES A E ES na ae veier 170 7 11 1 Configuration of Bus Mode c cccccccccsssssceeececeesessececececscsesssseeeeeceesenssseseeseeenenssaeeeeecs 170 7 11 2 Configuration of Disassemble Mode cccccccsesssseeececeessssececececsessseceeeeeceenssseseeeeeees 172 7 11 3 Configuration of Data Access Mode c cccccccesssssscecececsesssececececsenssseeeceseeensssseeeeeees 173 7 11 4 Configuration of Source Mode rrrrrrsnnrvrrrnrrernennrnrrenerernennnnnnrnssrerennnnnnensseesennnnnnenssnsen 174 TLS Extended Menusnuinssam p a a A e eataa 175 7 11 6 Display of bus information on the M32C Debugger rrrrrrrrnnrvrrrennvrrrsrrrvsrrnrrrrsennnenr 176 7 11 7 Display of bus information on the M16C R8C Debugger
36. After Stores the 32K cycles 0 to 32K cycles of trace data after the trace point Full Stores the 32K cycles 32K to 0 cycles of trace data after the trace starts 152 7 Windows Dialogs 7 9 5 Specify the Trace Write Condition Conditions for cycles to be written to trace memory can be specified Realtime trace Write Condition Settine Mode wy Start Total Writes all cycles Pick up Writes only the cycles where specified condition holds true Exclude Writes only the cycles where specified condition does not hold true Also following three write modes are supported Only cycles where specified event is established SO au Cycles from where specified event is established to where specified event is not established en Cycles from where start event is established to where end event is established 7 9 6 Command Button The buttons on this window has the following meanings Button Function Reset Discards the contents being displayed in the window and loads contents from the simulator in which they were set Save Saves the contents set in the window to a file Load Loads event information from a file in which it was saved Set Sends the contents set in the window to the simulator Close Closes the window 153 7 9 7 Specify the Events Instruction Fetch How to set events for fetch i
37. Connected Cause of break S W break The user can also see the cause of the break that occurred last time in the Status window Select Status from the CPU submenu of the View menu After the Status window is displayed open the Platform sheet and check the Status of Cause of last break w Status Item Status Connected to Mi6c R amp C PC7501 Emulator CPU M16C Run Status Ready Cause of last break S W break Run time count 00 h OO m OO sec 001 msec 991 usec Jf Memory Platform Events Please refer to 11 Display the Cause of the Program Stoppage about the notation of a break factor 68 6 Tutorial 6 2 6 Step6 Reviewing Breakpoints The user can see all the breakpoints set in the program in the Breakpoints dialog box 6 2 6 1 Reviewing Breakpoints Push the key Ctrl B and the Breakpoints dialog box will be displayed Breakpoints Mitutorial c Line 40 Cancel Edit Code Remove Remove All This window allows the user to delete enable or disable breakpoints 69 6 2 7 Step7 Viewing Register The user can see all registers flags value in the Register window 6 2 7 1 Viewing Register Select Registers from the CPU submenu of the View menu The Register window is displayed The figure below shows a Register window of the debugger for M16C R8C 0 BANK Register 0024 OFOO 0000 0000 O6E6 0000 0718 O6c2 02420 OFO26F 0400 IN
38. Fblkent Number of unused blocks and information on unused memory blocks Memory Pool Queue Displays the ID number and name of tasks waiting in the memory pool e The following are displayed in the Mplatr area TA TFIFO Task wait queue is in FIFO order TA TPRI Task wait queue is in task priority order e The display of the ID field varies depending on which one is specified fixed length or optional length If the data is of fixed length the ID field displays a string F and memory pool ID number For an arbitrary length the contents displayed on the first line are the character string V a memory pool ID number and a block ID number Displayed on the second to fourth lines are the memory pool ID and block ID numbers The block ID numbers are enclosed in parentheses 206 7 Windows Dialogs 7 14 12 Display the Task Context 7 14 12 1 Display the Task Context In the MR window select Popup Menu Context The Context dialog box is opened The Context dialog box is used to reference specify the context information of the specified task You can also open the Context dialog box by double clicking the data display area in the task state display mode Context Task ID Context Task ID 14 taskl4 Status WAI SEM Priority 15 FF2853 0000 0001 0000 0014 000001 000050 OOO40E Enter the task ID number in the Task ID field and click th
39. Options The M16C Linker Locator Options Project Namel dialog opens Please set as follows by this dialog Format Tab Please specify IEEE 695 for debuggers abs by Output Format 3 Build your program after the setting above We do not evaluate other settings so we can not recommend to append other options 12 5 6 When Using the TASKING C Compiler CM 12 5 6 1 Specify the Option Please specify g and OO options when compiling In the options other than the above mentioned the operation check is not done Please acknowledge that the options other than the above mentioned cannot be recommended 12 5 6 2 Command Execution Examples The following shows examples of entering commands gt CM16 g 00 filel c lt Enter gt 278 12 Attention 12 5 7 When Using the IAR EC Compiler EW Please specify the project setting by following process 1 The Setting in the IAR Embedded Workbench When you select the menu Project gt Options the dialog for Options For Target target will open In this dialog please select the XLINK as category and set the project setting Output Tab In the Format area check the Other option and select the elf dwarf as Output Format Include Tab In the XCL File Name area specify your XCL file ex Inkm32cf xcl 2 Edit the XCL file Add the command line option y to your XCL file The designation of y option varies depending on the product
40. Please refer to the 5 1 4 Memory Extension Mode Tab 12 3 9 Watch dog timer You can not debug the program using Watch dog timer While debugging please do not start WDT 12 3 10 CPU rewrite You can not debug the program using CPU rewrite 12 3 11 MR STK seript command e The MR STK BASE command automatically sets the area where the stack consumption can be measured The area set by this command is range of 256KB including the start address of the system stack If you want to set other area please use not the MR STK BASE script command but the CoVerage BASE script command 272 12 Attention 12 4 Attention of the 740 Debugger 12 4 1 Setting of Memory Map The map attributes immediately after the emulator has started up are External for 0h 3FFFh and Internal for 4000h FFFFh The memory map information must be altered to suit the target microcomputer s memory space It is similar in the case of the microcomputer that inside ROM area begins from the 4000h past Please refer to 5 5 Setup the Debugger for 740 for details 12 4 2 Emulation Pod M37515T RPD When you use emulation pod M37515T RPD you must be specify 40 to the fifth line POD number specification line of the MCU file MCU which becomes an object is as follows e 7515 Group e 3850 Group e 3851 Group 12 4 3 Stack area used by the emulator The emulator uses the user stack area as a work area 3 bytes Before starting debugging be sure to reserve the u
41. Receiving waiting state for an extended data queue WAI VRDTQ SUS Receiving waiting state for an extended data queue suspended WAI VRDTQ TMO Receiving waiting state for an extended data queue with time out WAI VRDTQ TMO SUS Receiving waiting state for an extended data queue with time out suspended WAI MPF Waiting state for a fixed sized memory block WAI MPF SUS Waiting state for a fixed sized memory block suspended WAI MPF TMO Waiting state for a fixed sized memory block with time out WAI MPF TMO SUS Waiting state for a fixed sized memory block with time out suspended 190 7 Windows Dialogs e 2Display the Wait Cancellation Condition of Event Flag Wfmode Status TWF ANDW Waits for all bits set in the wait bit pattern to be set AND wait TWF ORW Waits for any one bit set in the wait bit pattern to be set OR wait 7 14 3 Display the Ready Queue Status In the MR window select Popup Menu Mode gt Ready Queuel ERRATE EET EE Current Run Task 1 main Number of Priority 100 RdyQ 1 main 2 task 15 taskl5 16 taskl 6 17 taskl 18 taskl8 The following data is displayed in the status bar Current Run Task 1 main Number of Priority 100 7 14 3 1 Display the Ready Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 The function of each item is
42. Resource MCU Glock 8 000000 Mhe z fil 5 1 1 1 Specifying the MCU file MCU M30626 MCU Refer Click the Refer button The File Selection dialog is opened Specify the corresponding MCU file e An MCU file contains the information specific to the target MCU e The specified MCU file is displayed in the MCU area of the MCU tab If the corresponding MCU file is not contained in the debugger emulation pod you must create a new MCU file To do this see the following 5 6 Method of making MCU file 5 1 1 2 Setting of the Communication Interface The displayed data varies depending on the specified communication interface The available communication interface varies depending on the products The following shows the setting for each communication interface e Refer to 5 2 1Setting of the USB Interface e Refer to 5 2 2Setting of the LPT Interface e Refer to 5 2 3Setting of the LAN Interface e Refer to 5 2 4Setting of the Parallel Interface e Refer to 5 2 5Setting of the Serial Interface 34 5 Setup the Debugger 5 1 1 8 Executing Self Check Specify this option to execute self check on the emulator when the debugger starts up Self Check Be sure to select the above check box only when you want to perform self check at startup Specify this option in the following cases e When the firmware cannot be downloaded e When although the firmware is successfully downloaded the debugger
43. Windows XP 2000 to disable SACK support Setting the above registry can disable SACK support Note that when you use the network which have high bandwidth and long round trip delays like satellite channels the performance with SACK support disabled is lower than with enabled 18 3 Before starting the debugger 3 3 4 Proprietary parallel communication If you are using this debugger in a combination of the parallel I F you need to specify the start address of I O addresses 7 bytes to the device driver for PCA4202G02 The I O address for PCA4202G02 is set to 100h initially You can set this setting with setPca4202 exe included with this debugger The above programs are installed in the directory where this debugger is installed At the first time of using this debugger or when you want to change the I O address for PCA4202G02 because of conflict with other devices please follow the procedure of the setting described below 1 Execute setPca4202 exe included with this debugger The dialog box shown below will appear setPCA4202 10 Address Cancel 2 Find the I O address that is set on the PCA4202G02 parallel board and input it in hexadecimal into the I O Address input field Click OK button 3 Restart Windows ATTENTION e Make sure setPca4202 exe is executed by one who is authorized as an Administrator No one but the user who has the authority of an Administrator can install the device driver e For detail about p
44. You should implement safety measures so that Renesas products may not be easily detached from your products Renesas shall have no liability for damages arising out of such detachment This document may not be reproduced or duplicated in any form in whole or in part without prior written approval from Renesas Please contact a Renesas sales office if you have any questions regarding the information contained in this document Renesas semiconductor products or if you have any other inquiries Overview The High performance Embedded Workshop is a Graphical User Interface intended to ease the development and debugging of applications written in C C programming language and assembly language for Renesas microcomputers Its aim is to provide a powerful yet intuitive way of accessing observing and modifying the debugging platform in which the application is running This help explains the function as a debugger of High performance Embedded Workshop Target System The Debugger operates on the emulator PC4701 system Supported CPU This help explains the debugging function corresponding to the following CPUs e M32C 80 M16C 80 Series Note In this help the information which depends on this CPU is described as for M32C e M16C 60 M16C 30 M16C Tiny M16C 20 M16C 10 Series Note In this help the information which depends on this CPU is described as for M16C R8C e 740 Family Note In this help the information which depends on this
45. any liability arising out of the application and use of the information in this document or Renesas products With the exception of products specified by Renesas as suitable for automobile applications Renesas products are not designed manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of human injury or which require especially high quality and reliability such as safety systems or equipment or systems for transportation and traffic healthcare combustion control aerospace and aeronautics nuclear power or undersea communication transmission If you are considering the use of our products for such purposes please contact a Renesas sales office beforehand Renesas shall have no liability for damages arising out of the uses set forth above Notwithstanding the preceding paragraph you should not use Renesas products for the purposes listed below 1 artificial life support devices or systems 2 surgical implantations 3 healthcare intervention e g excision administration of medication etc 4 any other purposes that pose a direct threat to human life Renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to use Renesas products in any of the foregoing applications shall indemnify and hold harmless Renesas Technology Corp its affiliated companies and their officers director
46. area of the status bar The time value in the Task Trace window means the execution elapsed time using the program execution start time as 0 in all the cases On the contrary the numeric value above the grid lines scale in the Task Trace window is a relative value using the start marker as 0 the grid interval is specified in the Value dialog It has nothing to do with the time value This is provided so that you can see the window easily 7 18 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Start Marker Move the start marker in the display area End Marker Move the end marker in the display area Indicator Move the indicator in the display area Adjust Adjust range of start and end marker to full width of display area Adjust Expand Increase scale factor of display Reduce Decrease scale factor of display Trace Stop Stop measuring Trace Restart Restarts measuring Trace Range After Set measurement range condition to After Break Set measurement range condition to Break Value Set value Color Change display color RTOS Set target RTOS information Toolbar display Displays the toolbar Customize toolbar Opens the toolbar customize dialog box Allow Docking Allows the window docking Hide Hides the window 231 7 18 2 Refer the Execution History o
47. as described below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents Pri Displays priority RdyQ Shows the ID Nos and task names of tasks in the ready queue e Up to 8 characters of the task name is displayed in the RdyQ field When the task name exceeds 8 characters the extra characters are omitted 7 14 3 2 Display the Ready Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 The function of each item is as described below When the realtime OS is MRxx conformed to ulTRON specifications V 4 0 Item Contents Pri Displays priority Ready Queue Shows the ID Nos and task names of tasks in the ready queue e Up to 8 characters of the task name is displayed in the Ready Queue field When the task name exceeds 8 characters the extra characters are omitted 191 7 14 4 Display the Timeout Queue Status In the MR window select Popup Menu Model gt Timeout Queuel ENRETE FETEI Value ID name TOFFH 7FOOH 7FOFH TFFOH TFFFH 7FFFH TFFFH 21 task2l dly 24 task24 dly 22 _task22 dly 23 _task23 dly 6 task6 dly 7 task dly s 20 task20 dly 7 14 4 1 Display the Timeout Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 The function of each item is as described below Tasks waiting at present are displayed in the descending o
48. at any continuous addresses e The RAM monitor area can be changed to any desired address range Refer to 7 1 2 Setting the RAM monitor area for details on how to change the RAM monitor area The default RAM monitor area is mapped into a 1 Kbyte area beginning with the start address of the internal RAM e The display content updating interval can be set for each window individually The actual updating interval at which the display contents are actually updated while running the target program is shown in the title field of the Address display area e The background colors of the data display and code display areas are predetermined by access attribute as shown below Access attribute Background color Read accessed address Green Write accessed address Red Non accessed address White The background colors can be changed 84 7 Windows Dialogs ATTENTION The RAM monitor window shows the data that have been accessed through the bus Therefore changes are not reflected in the displayed data unless they have been accessed via the target program as in the case where memory is rewritten directly from an external I O If the data in the RAM monitor area are displayed in lengths other than the byte it is possible that the data will have different memory access attributes in byte units If bytes in one data have a different access attribute as in this case those data are enclosed in parentheses when displayed i
49. break address is encountered OR conditions e You can continue to set software breakpoints until you click the Close button to close the S W Break Point Setting Window e You can clear enable or disable software breakpoints selected by clicking in the software breakpoint display area You can also enable and disable software breakpoints by double clicking on them e Click on the Save button to save the software break points in the file To reload software break point settings from the saved file click the Load button If you load software break points from a file they are added to any existing break points 98 7 Windows Dialogs 7 6 1 Command Button The buttons on this window has the following meanings Button Function Load Load setting information from a file in which it was saved Save Save the contents set in the window to a file Help Display the help of this window Add Add the break point Refer Open file selection dialog box Close Close the window Delete Remove the selected break point Delete All Remove all break points Enable Enable the selected break points All Enable Enable all break points Disable Disable the selected break point All Disable Disable all break points View Shows the selected breakpoint positions in the Editor Source window 99 7 6 2 Setting and Deleting a Break Points from Editor Source Window The ar
50. cycle 1 Set the measurement event measurement start event only 2 Specify the following in the Measurement Condition Designation dialog Select this mode Set Mesurement Point MP1 Measurement Point Settihe Mode Start v End 52 z Function s Select the start event 7 10 9 3 Measure the event establishment time 1 Set the measurement event measurement start event only 2 Specify the following in the Measurement Condition Designation dialog Select this mode Set Mesurement Point MP1 r Measurement Point Setting Start B1 bi End B2 Function Select the start event 167 7 10 9 4 Measure the execution time of the specified function 1 Measure the execution time of the specified function In this mode the function top address is automatically registered to the measurement start event and the function end address to the measurement end address The measurement result contains the execution time of other function called within the specified function Specify the following in the Measurement Condition Designation dialog Select this mode Set Mesurement Point MP1 he XI Measurement Point Setting Mode A Y Start B1 Function Select the end event i Select the start event Specify the function name 168 7 Windows Dialogs 7 10 9 5 Measure the execution time of the specified funct
51. decimals Floating point numbers can also be used to assign values to variables Notes e You cannot register only immediate values as C watchpoints e The immediate value is effective only when it is used in C C language expressions that specify C C watchpoints or when it is used to specify the value to be assigned to those expressions When using floating point numbers operation cannot be performed on an expression like 1 0 2 0 253 10 1 2 Scope Resolution The scope resolution operator is available as following Global scope valiable name 1 x val Class scope class name member name class name class name member name e g T member A B member 10 1 3 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 4 Notes e There is no support currently for mathematical operators for floating point numbers 10 1 4 Pointers Pointers are indicated by the asterisk You can use pointer to pointers and pointer to pointer to pointers etc Examples variable name variable name etc Notes e Immediate values cannot be processed as pointers That is you cannot specify 0xE000 for example 10 1 5 Reference References are indicated by the ampersand amp You can only specify amp variable_name 254 10 C C Ex
52. demand method Debugging information is stored in a reusable temporary file on the hard disk of your computer Because the stored debugging information is reused the next time you download the same load module it can be downloaded faster This method is suitable when it takes so long time to download the debugging information because the PC has less memory against the load module file size Notes e If the load module size is large the on memory method may be inefficient because it requires a very large amount of time for downloading In such a case select the on demand method e In the on demand method a folder in which to store a reusable temporary file is created in the folder that contains the downloaded load module This folder is named after the load module name by the word INDEX_ to it If the load module name is sample abs for example the folder name is INDEX_sample This folder is not deleted even after quitting the debugger 37 5 1 2 3 Specify whether to display the instruction format specifier Specify whether to display the instruction format specifier in the disassembled display The debugger for 740 doesn t support this function v Display the instruction format specifier in disassembly Select the above check box when you display the instruction format specifier This specification can only be set or changed when you start the debugger 5 1 2 4 To treat size of enumeration type as 1 byte You can specify
53. determine whether or not memory extension mode has to be selected If the eighth line contains a 1 The memory extension mode selection area is active If the line contains a 0 or nothing the memory extension mode selection area is inactive 40 5 Setup the Debugger ATTENTION The functions may be restricted depending on the type of memory space expansion mode Extension Mode 1 e When the memory space expansion area is displayed in the dis assemble mode in the Program window or the Source window the displayed data may be different from what you would expect through the operation accompanying redrawing of the window such as up down scroll during execution of the target program e The following emulator functions are implemented by analyzing the bus information address bus data bus RAM monitor function RAM Monitor window C Watch window Coverage measurement function Coverage window Coverage command Memory protect function Protect window Protect command MCU accesses the program bank if Fetch command is specified for the bank duplicated area and the data bank if Read Write is specified for the bank duplicated area In above cases a signal which can distinguish which bank accesses the bus information is not output Therefore the above function may not work as expected e The memory reference commands are added which reference the internal ROM in the bank duplicated area in the dump format see the table below
54. does not start e When the MCU goes wild or something is wrong with the trace results and you want to check whether the emulator is operating normally Select the check box to close the Init dialog box After connecting to the emulator and confirming the firmware the debugger will immediately start self check on the emulator Self check takes about 30 seconds to 1 minute If an error is found in this self check the debugger displays the content of the error and is finished When the self check terminated normally the dialog box shown below is displayed When you click OK the debugger starts up directly in that state 1 The self check succeeded This specification is effective only when the debugger starts up Self check refers to the function to check the emulator s internal circuit boards for memory condition etc Refer to the user s manual of your emulator for details about the self check function 5 1 1 4 Specifying Clock Frequency Specify the operation clock of the target MCU within the MCU Clock field in the Time Count Resource group in units of MHz MCU Clock f100 MHz f Resource Specify the MCU clock and the clock divide ratio If you are using the MCU at 10 MHz divided by 4 for example enter 10 on the left side and 4 on the right side of the text box If no values are set in the clock divide ratio specifying area it is assumed that the clock is not divided i e the same as you would sp
55. error Protect break Note To be able to show the cause of break or not depends on the connected target Some targets may always show Halt or show 262 12 Attention 12 Attention 12 1 Common Attention 12 1 1 File operation on Windows 1 File Name and Directory Name Operation is not guaranteed if your directory names and filenames include kanji Use only one period in a filename 2 Specify the File and Directory You cannot use to specify two levels upper directories You cannot use a network pathname You must allocate a drive 12 1 2 Area where software breakpoint can be set The area which can be set for software breakpoint varies depending on the type of MCU 12 1 2 1 The debugger for M32C The area which can be set for software breakpoint varies depending on the processor mode Processor Mode Can be set area Single Chip Internal RAM Internal ROM Memory Extension Internal RAM Internal ROM Emulation memory Only the Internal area Micro Processor Internal RAM Emulation memory Only the Internal area To stop the target program outside the emulation memory area use the Come execution 12 1 2 2 The debugger for M16C R8C The RAM ROM area memory mapped in the area set as Internal can be designated for software breakpoint 263 12 1 2 3 The debugger for 740 Only the ROM area memory mapped in the area set as Internal can be designated
56. events are established at the same time simultaneous AND condition e Trace when one of the valid events is established OR condition e Trace upon entering a break state during state transition State Transition condition When transitional conditions set in an interstate pass are met a state transition occurs in which case the target program can be made to stop upon entering a break state The conceptual diagram shown below depicts the relationship between state and pass Event State transition break allows you to select specified task only or other than specified task as the break condition to meet the real time OS 1 Features 1 2 3 Protect Break This function causes the target program to stop upon detecting a data write to the ROM area or an access to an unused area read write or instruction execution Protect Break is a function to detect a write of data to the ROM area and an access read write command execution to an unused area and stop the target program 1 2 3 1 Protect Attribute You can specify the following attributes in byte e Access Disable e Read Only e R W Enable 1 2 3 2 Access Protect Area A protect area is a continuous 256 KB area starting from the 64KB boundary Its start address is called protect base address The protect base address immediately after starting the emulator is set to Oh Base Address 000000h Base Address 0C0000h 000000h 000000h O3FFFFh 0C0000 OFFFFFh OFFFFF
57. expansion mode 1 4000h to 2FFFFh Memory space expansion mode 2 40000h to BFFFFh 54 5 5 Setup the Debugger for 740 5 5 1 Map Command The memory map information must be altered to suit the target microcomputer s memory space by Map command 5 Setup the Debugger Area Mapping Note SFR External RAM External Internal ROM Internal External ROM External Memory Expansion Mode Microprocessor Mode Internal Enables the emulator s internal resources The internal ROM area must be set for Internal because it is always emulated with the emulator s internal resources If an external area is not allocated memory you can use the emulator s internal memory by setting that area for Internal External Enables resources external to the emulator including the internal SFR and RAM areas The internal SFR and internal RAM areas must always be set for External To enable the memory allocated for an external area set that area for External The memory map attributes immediately after the emulator has started up are External for Oh 3FFFh and Internal for 4000h FFFFh Use the MAP command to look up or alter the memory map information Execute the MAP command from the script window ATTENTION the case that the internal ROM area is located to the address before 4000h If the internal ROM area of the target mcu is located to the address before 4000h please change the mapping of this area to INTERNAL
58. for software breakpoint You cannot set software breakpoint in ROM areas memory mapped in the SFR area RAM area or other areas set as External 12 1 3 Get or set C variables If a variable is declared with the same name as the type definition name declared by typedef you cannot reference that variable Values cannot be changed for register variables Values cannot be changed for 64 bit width variables long long double and so on Values cannot be changed for C C expressions that do not indicate the memory address and size For the sake of optimization the C compiler may place different variables at the same address In this case values of the C variable may not be displayed correctly Literal character strings can only be substituted for char array and char pointer type variables No arithmetic operations can be performed on floating point types No sign inversion can be performed on floating point types Casting cannot be performed on floating point types Casting cannot be performed on register variables Casting cannot be performed on structure types union types or pointer types to structure or union types Character constants and literal character strings cannot contain escape sequences The following values can be substituted for the bit fields integer constants character constants and enumerators variables of bool types characters types integers types and enumeration types bit field When the substituted
59. guid Ei EE EER EEEE EESTE EEVEE SaR Eat 84 711 Extended Menus eran a a a e a a A R 86 7 1 2 Setting the RAM monitor area m mmrrrrenrvvrrrrrrrrrensnvrrrnererrenennrnrrenssrenennnnnnensseesennvnnsensseenen 87 7 2 ASM Watch Wind6Wies 2 svc he nett hese nen ektet Sad kb 88 T21 Extended Ments in E EEE E aed ted eee eaten ds 89 7 3 Wa teh Window arva eee sete eet ete gras eee hasene 90 Td A Extended Menus uaushesemsikeere deira SEG ea UG 92 T A Coverag Windowugsessnsses skader harde adsense desi 93 7 4 1 Bxtend d Men s ae a EE AA EE AE E AEE fel 94 7 4 2 Refer to the Source Line the Executed Address rrrrrrrrrnsrvrrrrnnrrrrrrnnrrrrnsrvrrrrnnrnrrrsnnrernn 95 7 5 Seript Window suser eres 96 75 1 Extended Menusissnua sakna leser cevcctcastcccecendnctacavecedccerdecvaceeecdtevaces 97 7 6 S W Break Point Setting Window reeerarrronnnnrnnnrnnsreerennnnrnnnrensnennnnrnnnenesnenennrnnnenereenennnnnsensnsenenens 98 7 6 1 Command Button esnie reira rE e sees Windle studenter GL 99 7 6 2 Setting and Deleting a Break Points from Editor Source Window cccccesseseeeeeeee 100 7 7 H W Break Point Setting Window cccccccccccssssscecececsesesscececececsesssseeeeccecsesssaeeeeceeesenssseeeeesees 101 7 7 2 Specify the Combinatorial Condition cccccccsessscccececsessssscecececsesesnececececeesssssseeeeeees 106 7 7 3 Specity the Process ID nonio teene E E E E N E Seatuleiccadevlueveceacceedssedveerteeess 107 T7 4 Command m10 A
60. information this mode allows source line information to be displayed in combination e Source mode This mode allows you to inspect the program execution path in the source program The measurement result is displayed when a trace measurement has finished When a trace measurement restarts the window display is cleared The range of a trace measurement can be altered in the Trace Point Setting Window For details about this window refer to 7 9 Trace Point Setting Window With default settings the trace information immediately before the program has stopped is recorded 7 11 1 Configuration of Bus Mode When bus mode is selected trace information is displayed in bus mode Bus mode is configured as shown below The display content in bus mode differs depending on the MCU or simulator system used a Q aey azp eee Am s ms usj 11111111 00 00 00 055 114 11111111 00 00 00 055 114 11111111 00 00 00 055 115 11111111 00 00 00 055 115 11111111 00 00 00 055 115 11111111 00 00 00 055 115 11111111 00 00 00 055 115 11111111 00 00 00 055 115 11111111 00 00 00 055 115 100 00 00 055 115 3 4 ypPmawminwmennvnn O0D0Dr 00D0000 OR QGGUVSNO 170 7 Windows Dialogs 1 Cycle display area Shows trace cycles Double click here to bring up a dialog box to change the displayed cycle 2 Label display area Shows labels corresponding to address bus information Double click
61. int amp ref 0xD038 all Radices 10 2 7 Bit Field Types e 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 260 10 C C Expressions 10 2 8 When No C Symbol is Found If the calculated expression contained a C symbol that could not be found it is displayed as follows x lt not active gt all Radices 10 2 9 Syntax Errors e When the calculated 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 10 2 10 Structure and Union Types e 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 C expression consists of members a is displayed to the left of the type name tag name indicating structure or union 1 Value unsigned char str OxFOOOO 89 unsigned char str 89 y struct DATA pData 0x408 struct Answer ans Ox82B unsigned char ch 100 ad signed int nID 3980 11 1 lrr 1 a 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
62. 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 scope Local symbols outside scope Doe oH Conversion of data values Local symbols Global symbols Local labels Global labels Local symbols outside scope Local labels outside scope Doe oH Conversion of bit values Local bit symbols Global bit symbols Local bit symbols outside scope EG 9 2 3 Macro Variables Macro variables are defined by assign statements in the script file See Section 9 1 2 Assign Statement in the Reference part for details Precede variables with for use as macro variables e You can specify alphanumerics and or the underbar in the variable name following the percent sign However do not star t the names with a numeric e You cannot use the names of registers as variable names e Uppercase and lowercase letters are differentiated in variable names e You can define a maximum of 32 macro variables Once defined a macro variable remains valid until you quit the debugger Macro variables are useful for specifying the number of iterations of the while statement 250 9 Writing Script Files 9 2 4 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 followi
63. pointer type to other than a char type it is displayed in hexadecimal as follows unsigned int p 0x1234 all Radices e When the result of calculation is a char type you can select the display format of the string or a character in the C Watch window s menu Display String string types unsigned char str 0x1234 Japan all Radices character types unsigned char str 0x1234 74 J all Radices I When the result of calculation is a char type it is displayed as follows unsigned char str 0x1234 Jap 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 fel Boca indicating pointer type Value unsigned char str OxFOOOO 89 struct DATA pData 0x408 struct DATA pData 0x408 signed int nID 0 unsigned char str OxFO005 83 s 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 259 10 2 4 Array Types e When the result of calculation is an array type other than a char type the starting address is displayed in hex as follows signed int 10 z 0x1234 all Radices _ e When the result of calculation
64. rrrvrrrsnnvnrrssnrvrrsnnrrrrrrnnnerr 178 7 11 8 Display of bus information on the 740 Debugger smrrrsnvvrrrnnrvvrrennrnrrssnvrsrrnnrsrrrennnnnr 180 7 12 Data i e EAA ao LEN AE PEE AE EAE E EE AE E EEE E 181 TIX 1 Extended Menus asvuseav anneks RGT 182 TII GULO Windowasmsarmssdar sees e ase ede WEE EPI ARES Oe iT as 183 7 13 1 Extended Menusianssssanaaddmannrvn tarer 184 A A DIA E EANTA aCe CONA EE EAE A EE A T art dd 185 TT4 2 Display the Task St tususiuamessesdaaedTiakersandkaadklkranerinadanie 187 iii 7 14 3 Display the Ready Queue Status rrnorvrrrnrroeronnrnrrrnsrrrrennrnrrrnssnerennrnrnensseerennnnnnnnsssenen 191 7 14 4 Display the Timeout Queue Status rmmmmarsronvorrrrrorsrenonnrvrnerrsrensnnrnnnsnssnensnnrnnnensssnnene 192 7 14 5 Display the Event Flag Status rrorororrrrrororenonnrrrnrnrrrensnnrnrnenrsrensnnrnrnsnssnenennrnnnsnssnenene 194 7 14 6 Display the Semaphore Status cccccccsscccccecsessssececccecsesssececececsesssseeeeececeenesssseeeeeees 196 7 14 7 Display the Mailbox Status c cccccccccsssscccccecsesssececececsessaeceeececsessaeceeeeecsensaeeeeeeeees 198 7 14 8 Display the Data Queue Status cccccccccccccecsessssececececsessssscecececsessseeeeececsensssseeeeeees 200 7 14 9 Display the Cycle Handler Status cccccccccccccsssssscecececsessssscecceecsessaeeeeeeecsensssaeeeeeees 202 7 14 10 Display the Alarm Handler Status rrerrronnnnrvrnrrrrrensnnrvnnenernensnnrnnnenssnens
65. software breakpoint in the S W Breakpoint Setting window 1 2 1 2 Area where software breakpoint can be set The area which can be set for software breakpoint varies depending on the product For the areas available for software breakpoint see the following 12 1 2 Area where software breakpoint can be set 1 2 2 Hardware Break This function causes the target program to stop upon detecting a data read write to memory instruction execution or the rising falling edge of the input signal fed from an external trace cable The contents of events that can be set vary with each target MCU The following designations are available as break events e Address designation Instruction fetch Memory access Bit access e External trigger designation e Interruption The number of events that can be specified are six events of all For the address designation method instruction fetch and memory access allow the range designation and logical condition designation in addition to the normal one address designation Moreover instruction fetch allows you to specify the function name Memory access allows you to specify the comparison data to read write data related to the specified address in the same manner as when setting the H W breakpoint It also allows mask designation to the comparison data These break events can be combined as below e Trace when all of the valid events are established AND condition e Trace when all of the valid
66. the next button as it is This is the end of the emulator settings Exit the Project Generator following the instructions on the screen And the dialog for the setup of a debugger is also displayed at this time If preparation of an emulator is completed set up the debugger in this dialog box and connect with an emulator 29 4 2 2 4 Step4 Registering the Load modules to be downloaded Finally register the load module file to be used Select Debug Settings from the Debug menu to open the Debug Settings dialog box Debug Settings SessionM160 RC PO7501 Emulator z Target Options DoSample01 Target m 6C REG PC7501 Emulator z Default Debug Format IEEE695_RENESAS z Download Modules Offset Address Format D work HEW4 Samples M16C Sample01 x30 00000000 IEEE6S 1 Select the product name to be connected in the Target drop down list box 2 Select the format of the load module to be downloaded in the Default Debug Format drop down list box Format Name Contents IEEE695 RENESAS IEEE 695 format file When Using Renesas toolchain IEEE695 IAR IEEE 695 format file When Using IAR toolchain IEEE695 TASKING IEEE 695 format file When Using Tasking toolchain ELF DWARF2 ELF DWARF2 format file When Using Renesas toolchain ELF DWARF2_IAR ELF DWARF2 format file When Using IAR toolchain ELF DWARF2_TASKING ELF DWARF format file When Using Tasking toolchain
67. the Mode shown below and set the Start and End events Realtime trace Write Condition Cancel 157 e For condition 7 choose the Mode shown below and set the Start event Realtime trace Write Condition Setting Start End 158 7 Windows Dialogs 7 10 Time Measurement Window The Time Measurement window displays the minimum maximum average execution time and measurement count at any measurement point The execution time of up to 4 measurement points can be measured simultaneously You can specify the event for the measurement condition in the same manner as when specifying events in the Trace Point Setting Window Event setting area Measurement result clear buttons CONDITION addr OFO02C addr OF 0057 addr OF 0200 addr 000000 addr OFO73F PAMP1 Match Zone B1 EZ MP2 Zone Specify B1 MP3 Single Cycle B6 IC MP4 Not Use s 00m 00s 000ms 000us 00h 00m 00s 000ms 000us 00m 00s 000ms 000us 00h 00m 00s 000ms O00us 0 of 00h 00m 00s 000ms 0 0 of 00h 00m 00s 000ms ms Is s 00m 00s 000ms 000us 00h 00m 00s 000ms 000us 00m 00s 000ms 000us 00h 00m 00s 000ms 000us 0 LOK of 00h 00m 00s 000ms 0 0 of 00h 00m 00s 000ms Measurement result display area Measurement condition setting area e Ifthe contents of events are altered they are marked by an asterisk on the title bar The asterisks are not displayed after setting up th
68. the main function To step out of the sort function select Step Out from the Debug menu or click the Step Out n button on the toolbar The PC cursor slips out of a sort function and moves to the position before a change function Tutorial c p_sam kst initfp sam fort i 0 i lt 10 i 2 j rand ifCj lt Ot q smj ali j sorta p_sam gt s0 a 0 p_sam gt sl al 1 pusen gt s2 a 2 Note It takes time to execute this function When the calling source is clarified use Go To Cursor 75 6 2 10 3 Executing Step Over Command The Step Over command executes a function subroutine call as a single step and stops at the next statement of the main program To step through all statements in the change function at a single step select Step Over from the nm Debug menu or click the Step Over button p on the toolbar The PC cursor moves to the next position of a change function Tutorial c p_sam kst init p sam s i lt 10 i j rand i j lt Oo j j ali j sort a change a p_sam gt sl al1 pusen gt s2 a 2 76 6 Tutorial 6 2 11 Step11 Forced Breaking of Program Executions This debugger can force a break in the execution of a program 6 2 11 1 Forced Breaking of Program Executions Cancel all breaks To execute the remaining sections of the main function select Go from the Debug menu or t
69. the task is executed immediately before the cursor position 226 7 Windows Dialogs 7 17 3 2 Pause After a Paused Task is Executed up to Specified Position MR Task Pause DEMO C Selected Task 6 task006 ID name Pause a i PAU Source 1 main void task006 Z task00Z 3 task003 T VER pk ver 4 taskO04 int i 5 task005 6 taskO006 Pause PC OF1IFA6H while 1 7 task007 for i 0 i lt 10 8 taskO008 9 task009 10 tasko10 I rot_rdq 1 11 task0il 12 task012 13 task013 void taskO07 14 task014 15 task015j T_VER pk_ver 16 task016 int i 17 task017 18 task018 while 1 19 task019 for i 0 i lt 10 20 task020 get ver Z1 task0Z1 s gt 1 Click the ID field or name field of the task pause display area of the target task After the target task is selected the task ID number is displayed in the status bar In the task source display area the program starting from the task s Pause position context PC position is displayed if the program is in a state other than Pause 2 Click the line to be paused in the task source display area The Come pause button and the Pause button are enabled 3 Click the Come button The selected task is released from t
70. timeout flg pen flg mode OF17F8H main 1 RUN 0000H OF1A68H task2 2 RDY 0000 OF1A76H _task3 sus 0000 OF1AS4H task4 WAT SLP 0000 OF1A9AH _task5 WAI SLP SuUSs 0000 OF1ABOH _task6 WAI DLY 0000 OF1ACAH task WAI DLY SUS 0000 OFIAE4H tasks WAI FLG 0000 OF1BOZH task9 WAI FLG SUS 0000 1111H TWE_ORW 1111H TWF ORW 1 2 3 4 5 6 7 8 9 Tome eee m By double clicking any line the information on the task context is displayed in the Context dialog For details on the Context dialog see 7 14 12 Display the Task Context The following data is displayed in the status bar Current Run Task 1 main 7 14 2 1 Display the Task Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 All the tasks defined in the configuration are listed in the order of ID number The function of each item is as described below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Items Contents ID Task ID StaAddr Starting address of task name Task name Pri Priority Status 1 Task status wup count Wake up count timeout Timeout value flg ptn Wait bit pattern of event flag flg mode 2 Wait cancellation condition of event flag 187 e 1Task Status Display Status RUN RUNNING state RDY READY state SUS SUSPENDED state DMT DORMANT state WAI SLP Sleeping state WAI SLP SUS
71. used by the emulator The M16C 60 M16C 20 series emulators use a stack area of 4 bytes from OFFFCh to OFFFFh that is accessed at power on reset The emulator cannot start up normally unless these 4 bytes of memory can be accessed for read write Therefore if one of the following two conditions hold true use the four bytes of OFFFCh to OFFFFh in INTERNAL setting until the emulator finishes setting the interrupt stack pointer ISP after a reset e When in systems that go from the single chip mode to the memory extension or the microprocessor mode after a reset you are using the four bytes of OFFFCh to OFFFFh in EXTERNAL setting e When in systems that start up in microprocessor mode after a reset you are using the four bytes of OFFFCh to OFFFFh in EXTERNAL setting and do not have any external read writable memory 12 3 2 Options for compiler assembler and linker The information may not be downloaded debugged normally depending on the option designation of the compiler assembler and linker Please refer to the following for the option specification Refer to 12 5 Option of C Compiler Assembler Linker The compiler that can be used by M16C R8C debugger e NCxx e the IAR EC Compiler e the IAR C Compiler e the TASKING C Compiler 12 3 3 TASKING C Compiler When you debug programs compiled by the TASKING C Compiler CCM16 the type of bit field is fixed on unsigned short int Because CCM16 outputs the debug information for
72. using sakt bee ee Ma 12 3 1 3 GPT Interface skal kinsenined need Gnistrende east E 12 3 1 4 Proprietary Parallel Interface rrrrnrarrronnnnrnrnrnnrrnnsnnrnrnrnsrnenennnnrrnnssnnrenennrrnnsnsssensnnrnnnsne 13 3 2 Download of Firmware ssrrrrnnvvreranvrrrrssnnrrrrnnrnrsrsnnrnrrssnnvsrsnnnsrssennrnsrsssnnrsrsnnrsssssnnrsrsssnsrsssnnrsssnnnsee 14 3 3 Setting before emulator Starts cccccccsccccccecsssssssceeececsesssnseeeececcsesesssseeeeeceesesnsaeeeeseeesenssaeeeesesees 15 3 3 1 USB communication cccccscccccsssececsseccecsessececseseececseeeecsssaeeecsesaeescsueeecsssaeeecsesaeeesseeeenas 15 3 32 EAN co mmunication Toresen a teenechechh wd dene aen bedste 16 3 38 3 LAN communication 2 eececccceessecesssececeesececseseececsececeesaececseaseeeceeeeceesaeeecseaaeeeeneeeeenses 18 3 3 4 Proprietary parallel communicatlon rererererererereveveveveveverereveveveveveveveverevevesevesnsevesesen 19 4 Preparation before Use 20 4 1 Workspaces Projects and Files rrrrrrrrererererererernrerererererererernrerererererererererererererernrererereverevssser 20 4 2 Starting the High performance Embedded Workshop cccsccccssssscesseececeesnececseeeeeessseeeeneaes 21 4 2 1 Creating a New Workspace Toolchain Used cc cccccsscssesssssesscsssescssceseesecesessceeesensees 22 4 2 2 Creating a New Workspace Toolchain Not Used cc cccccescssssssesesssesscsseesesseesessesssessens 27 4 3 Starting the D buggersaiu
73. value is larger than the size of the bit field it will be truncated The bit field member allocated in the SFR area might not be transformed into a correct value While the target program is running values of local variables and bit fields cannot be modified 264 12 Attention 12 1 4 Function name in C e When you input the address using the function name in setting display address setting break points and so on you can not specify the member function operator function and overloaded function of a class e You can not use function names for C C expression e No script commands e g breakin and func can be used in which function names are specified for arguments e In address value specifying columns of dialog boxes no addresses can be specified using function names e The pointers for a member function can not be referred correctly in C watch window 12 1 5 Option settings for download modules These options which can be set in Debug Settings dialog box are invalid for this debugger e Offset specified value is regarded as 0 e Access size specified value is regarded as 1 e Perform memory verify during download Not supported 12 1 6 Debugging multi modules If you register two or more absolute module file in one session you can download only one file in same time If you register one absolute module file and one or more machine language file in one session you can download all file in same ti
74. when the debugger starts up The contents set from this dialog box are also effective the next time the debugger starts The data set in this dialog remains effective for the next start hit M16G PC4701 Emulator X FAM and Work Area Memory Space Expansion Glock Script MCU MCU Parallel Type VO Address Resource M30610 mcu Serial C LAN AUTO v 378h Debugging Information Refer LPT 9 ha USB farget Self Check MGU Glock 8 000000 MHz 20 E Cancel Help Do not show this dialog box again The tabs available on this dialog box vary with each product used For details click the desired tab name shown in the table below Tab Name Product Name The debugger The debugger for The debugger for 740 for M32C M16C R8C MCU Exist exist exist Debugging Information Exist exist exist F W and Work Area exist ae Memory Extension Mode Se exist ane Clock Exist exist exist Script Exist exist exist You can open the Init dialog using either one of the following methods After the debugger gets started select Menu Setup gt Emulator gt System Start Debugger while holding down the Ctrl key 33 5 1 1 MCU Tab The specified content becomes effective when the next being start MOU M30610 mcu Refer Parallel 0 Serial C LAN CEPT USB Serial No H TT Target I Self Check
75. whether your debugger treat all sizes of enumeration types whose size is unknown in the debugging information as 1 byte For reducing memory consumption NC30 and NC308 have an option to treat the sizes of enumerator types as 1 byte and not as same size of int Note that NC30 and NC308 don t output the sizes of enumerator types in debugging information and debuggers consider the size as same size of int Therefore you may not correctly refer the values of enumeration types in the target programs which were compiled with the above option This function is for resolving the above issue See the users manual of each compiler for details of the above option The debugger for 740 doesn t support this function e Always treat variables of enumerator type with unknown size as 1 byte Check the above check box if you would like to treat all sizes of enumeration types as 1 byte It is necessary to load the debugging information again in order to reflect this setting 38 5 Setup the Debugger 5 1 3 F W and Work Area Tab The specified content becomes effective when the next being start In this tab only the debugger for M16C R8C exists ol VENES 5 1 3 1 Select the Firmware File ke PE mer d Usually click the Default radio button in the F W group Click the Select radio button when you have to download firmware different from the one described in the MCU file The F W Name list box is enabled only when you click the
76. 0 00 000 003 00700 00 006 504 00700 00 013 009 7 92m 4 task4 2 00 00 00 013 003 00 00 00 000 001 00700 00 006 502 0070000 013 005 7 97 m 5 tasks 2 00 00 00 013 007 00 00 00 000 003 00 00 00 006 505 00 00 00 013 011 7 93 Unknown oj 00 00 00 000 000 00 0000 000 000 0070000 000 000 0 00 00 00 00 000 000 The window shows the CPU occupation time and ratio by interrupt processing and by task The data displayed is the statistical results for the range specified with the start marker and end marker in the MR Trace window By clicking the maximum execution time minimum execution time display field of each line you can search the processing history at the maximum execution time minimum execution time of the task corresponding to the clicked line The search result is pointed by the indicator in the MR Trace window after the indicator moves to the destination position 220 7 Windows Dialogs 7 16 5 2 Refer the Ready Queue Time Click the Ready gt Run button in the tool bar Or select Menu Rdy gt Run Mark 00 00 00 000 335 00 00 00 164 498 00 00 00 164 163 ID name Mum Max Min Avg 1 taskij 11 00700 00 013 069 00700 00 000 013 00700 00 005 961 Z task2 3 00 00 00 000 080 00700 00 000 009 00 00 00 000 032 3 i task3 2 00700 00 000 083 00700 00 000 013 00 00 00 000 048 4 tasks 2 00700
77. 00 000 093 00700 00 000 009 00 00 00 000 051 5 l _task5 2 00 00 00 000 099 GO 00 00 000 012 00700 00 000 056 l The time required from execution ready state to transition to execution state by task is processed statistically and displayed The data displayed is the statistical results of the range specified with the start marker and end marker in the MR Trace window By clicking the maximum ready time minimum ready time display field of each line you can search the processing history at the maximum ready time minimum ready time of the task corresponding to the clicked line The search result is pointed by the indicator in the MR Trace window after the indicator moves to the destination position 7 16 5 3 Refer the System Call Issuance History Click the System Call button in the tool bar Or select Menu System Call w MR Analyze Et Th gt gt Mark 00 00 00 000 335 00 00 00 164 498 00 00 00 164 163 No System Call Parameter Return Parameter TIME a 7 wai flg wfmode H 3 waiptn H l flgid D 1 E OK flgptn H 1 00 00 00 000 501 8 wai sem semid D 1 E OK 06 00 00 000 533 g rev msg mbxid D 1 E OK pk msg Rl H 1234 pk 00 00 00 000 565 10 wup tak tskid D 2 E OK 00 00 00 000 594 11 slp tak E OK 00 00 00 013 620 12 rsm tsk tskid D 2 E OBJ 00 00 00 020 14
78. 04939 global array 000444 00 00 00 055 303 00 00 00 055 303 04938 0007E2 04935 0007E2 00 00 00 055 303 04929 0007E2 00 00 00 055 304 pe EE OE EE EO EO EO EO EE EEE 04924 0007E4 00 00 00 055 304 n4916 NNN7F2 ANTON NA NS5 305 zi 1 1 Data access display area Shows data access information If the information displayed here is 000400 1234 W for example it means that data 1234H was written to the address 000400H in 2 byte width Other display areas are the same as in bus mode In addition to data access information the window can display source line information in combination In this case the display will be similar to the one shown below Range 32511 00000 Ker SEL UG fer Bek Vil GEST SUEDE Tine FREE Cycle Label Datazccess hr m s ms us GLOBAL C 44 global_struct m short 5 05012 global struct 000470 42 W 00 00 00 055 299 GLOBAL C 45 global struct m long 6 05007 00047D 05 Ww 00 00 00 055 299 05006 00047E oo Ww 00 00 00 055 299 05001 00047F 06 W 00 00 00 055 299 05000 000450 00 UW 00 00 00 055 299 GLOBAL C 47 global struct m struct m uchar 0x10 04995 000481 00 W 00 00 00 055 300 04594 000482 00W 00 00 00 055 300 vi 173 7 11 4 Configuration of Source Mode When only source mode is selected trace information is displayed in source mode Source mode is configured as shown below OAD oe
79. 06 892 00700 00 012 111 00 00 00 145 332 9 27 m i i 4 task004 12 00700 00 012 170 00700 00 006 505 00700 00 011 604 00700 00 139 252 8 85 mm 5 task005 12 00700 00 012 277 00700 00 006 577 00700 00 011 795 00700 00 141 540 3 02 i i 6 task006 11 00700 00 013 435 00700 00 006 490 00700 00 012 353 00 00 00 135 885 6 66 m H 7 _ _task007 11 00700 00 013 020 00700 00 006 790 00700 00 012 431 00700 00 136 745 6 72 m i 8 task008 11 00700 00 014 080 00700 00 008 055 00700 00 013 232 00700 00 145 552 9 28 9 task009 11 00700 00 013 642 00700 00 007 277 00700 00 012 663 00 00 00 139 295 6 68 m i i 10 taskOl0 11 00700 00 013 710 00700 00 008 070 00700 00 012 795 00700 00 140 752 8 97 mm 11 taskOll 11 00700 00 011 892 00700 00 006 290 00700 00 011 193 00700 00 123 132 7 65 m i 222 Unknow O G0 00 00 000 000 00700 00 000 000 00 00 00 000 000 00700 00 000 000 0 00 H By clicking the maximum execution time minimum execution time display area of each line you can search process history of the task for the clicked line at the maximum minimum execution time The search result is pointed by the indicator which moves to the target position in the Task Trace window 7 19 1 Extended Menus This window has the following popup menus that can be brought
80. 1 Before the emulator can be connected in a LAN the IP address etc must first be registered in the emulator For the emulator in default settings the utility setip exe included with the debugger may be used to set the IP address etc in the emulator 3 3 2 1 Setting of the LAN Interface using the SETIP EXE The utility SETIP included with this debugger may be used to set the IP address etc in the emulator while in default settings SETIP detects the Emulator s in default settings that are connected to the same network SETIP is stored in a location below the directory where this debugger is installed The file name is setip exe To register the IP address in the emulator follow the procedure described below 1 Connect the emulator with LAN cable to the same network same subnet as the host computer is connected 2 Set the emulator s communication interface switch to the LAN position Then turn on the power to the emulator 3 Start SETIP When SETIP has started up the dialog box shown below appears choose the emulator of use click the OK button Setlp Ver 2 00 Select your emulator C PC4701 3 C M321 OOT2 SDI E mest 4 Click the OK button and showing information on the emulator connected to the network This information consists of the MAC address followed by the serial number of the emulator Setlp V2 00 08 00 70 25 8C 05 OHMO06 Urs tra To register the IP address click
81. 1 taskij 11 00 00 00 013 069 00700 00 000 023 00700 00 005 961 2 task2 3 00700 00 000 080 00700 00 000 009 00 0000 000 032 3 tasks 2 00700 00 000 083 00 00 00 000 023 00 00 00 000 048 4 taskt 2 00700 00 000 093 00 00 00 000 009 00 00 00 000 051 S tasksj 2 00 00 00 000 089 060700 00 000 012 00700 00 000 056 l By clicking the maximum ready time minimum ready time display area of the desired line you can search the process history of the maximum ready time minimum ready time of the task corresponding to the clicked line The search result is pointed by the indicator which moves to the target position in the MR Trace window 7 16 3 Configuration of System Call History Display Mode The system call issuance history list mode is used to list the system calls issued The system call issuance history is listed within the range specified by the start marker and end marker in the MR Trace window The number indicates a numeric value counted from the top system call within the measurable range MR Analyze Sek Mark 00 00 00 000 335 00 00 00 164 498 00 00 00 164 163 No System Call Parameter Return Parameter TIME a 7 wai flg wfmode H 3 waiptn H 1 flgid D 1 E OK flgptn H 1 00 00 00 000 501 B wai sem semid D 1 E OK 00 00 00 000 533 9 rev msg mbxid D 1 E OK pk msgirlj H 12
82. 1 Constants You can use binary octal decimal or hexadecimals The prefix or suffix symbol attached to the numerical value indicates which radix is used The debugger for M32C and M16C R8C and 740 Hexadecimal Decimal Octal Binary Prefix 0x 0X None Suffix h H None 0 0 b B Examples 0xAB24 1234 12340 10010 AB24h 10010b You can only specify when the predetermined radix is hexadecimal e If you are inputting a radix that matches the predetermined radix you can omit the symbol that indicates the radix excluding binary e 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 Type Radix Address Hex Line No Dec No of executions No of passes 248 9 Writing Script Files 9 2 2 Symbols and labels You can include symbols and labels defined in your target program or symbols and labels defined using the Assemble command e You can include alphanumerics the underscore _ period and question mark in symbols and labels However do not start with a numeric e Symbols and labels can consist of up to 255 characters e Uppercase and lowercase letters are unique Product Name Notes The debugger for M32R e You cannot include the assembler structured instructions The debugger for M32C pseudo instructions macro instructions ope
83. 1 Table of Script Commands classified by function 8 1 1 Execution Commands Command Name Short Name Contents Go G Program execution with breakpoints GoFree GF Free run program execution GoProgramBreak GPB Run target program with software break point GoBreakAt GBA Run target program with software break point Stop z Stops program execution Status 5 Checks the operating status of the MCU Step S Halts for user input until the specified time has elapsed StepInstruction SI Step execution of instructions OverStep O Overstep execution of source lines OverStepInstruaction OI Overstep execution of instructions Return RET Executes a source line return ReturnInstruction RETI Executes an instruction return Reset Resets the target MCU Time a Sets the run time display and checks the current setting 8 1 2 File Operation Commands Command Name Short Name Contents Load L Downloads the target program LoadHex LH Downloads an Intel HEX format file LoadMot LM Downloads a Motorola S format file LoadSymbol LS Loads source line ASM symbol information Loadleee LI Downloads IEEE 695 absolute format files Reload 5 Re downloads the target program UploadHex UH Outputs data to an Intel HEX format file UploadMot UM Outputs data to a Motorola S format file 239 8 1 3 Register Operation Commands Command Name Short Name Co
84. 1 vi main Ge l e When DATA ACCESS is selected Measures for the memory access pooo ooo o RW m 161 e When BIT SYMBOL is selected Measures for the bit access e When INTERRUPT is selected Measures for the interrupt occurrence or termination The debugger for M32C not support 162 7 Windows Dialogs e When TRIGGER is selected Measures for the status of signal input from external trace cable peggene 163 7 10 2 Time Measurement Condition For the time measurement conditions the following can be specified for each measurement interval Set Mesurement Point MP1 Measurement Point Setting Mode Start Source File v Function EZ B1 ed End B2 ht Cancel Measures the time in an interval from where the start event is established till where the end event is established Measures the time from where an event is established till where the next event is established Measures the time from where an event is established till where the event is not established Measures the execution time of functions The start address and the end address of the function are automatically registered for the start event and the end event respectively The measurement result includes the execution time of other functions that have been called from within the specified function Measures the execution time of functions The start a
85. 114 7 Windows Dialogs Example Writing byte length data 32h to odd address 401h Contents of settings vary with each product and bus width 8 bits bus width Al Set Event Status DATA ACCESS vi addr Address E oot a l T Al Set Event Status DATA ACCESS p2 po WRITE 115 16 bits bus width Al Set Event Status DATA ACCESS vw Ja E 41 Set Event Status DATA ACCESS fm fo o o WRITE A VW 116 7 Windows Dialogs Example Writing word length data 1234h to even address 400h Contents of settings vary with each product and bus width 8 bits bus width Please specify And of the 1st point and the 2nd point for a combination condition 1st point Al Set Event Status Event Type DATA ACCESS v Address Data Setting Ranee addr Address1 X Address1 400 v l Address2 00040F z I Function Source File v Function v ACCESS WRITE ADDRESS 000400 GONDITION addr 000400 data amp 00FF 0034 canes Al Set Event Status Event Type DATA ACCESS x Address Data Setting Ranee data Datal x Data 1 0034 Data 2 jooo Access WRITE v IV Mask 00FF ACCESS WRITE ADDRESS 000400 CONDITION faddr 000400 data amp 00FF 0034 mest 117 2nd point AZ Set Event Status DATA ACCESS J
86. 34 pk 00 00 00 000 565 10 wup tsk tskid D 2 E OK 00 00 00 000 594 11 slp tsk E OK 00 00 00 013 620 12 ram tak tskid D 2 E OBS GO 00 OO 020 147 ag Set ela setptn HB l flgid p 1 E OK 00 00 00 033 163 14 wai flg wimode H 3 waiptn H l flgid p l ered 22 flgptn 22 00 00 00 046 203 H 15 rem tsk tskid D 3 E OBI 00 00 00 052 734 16 sig sem semid D 1 E OK 00 00 00 065 751 17 wai sem semid D 1 ered 227 00 00 00 078 780 18 rsm tsk tskid D 4 E OBJ 00 00 00 085 310 19 snd msg pk msg R1j H 5678 pk msg R3j H 12 E OK 00 00 00 098 327 20 rev msg mbxid D 1 ered 22 pk msg Rlj 22 pk 00 00 00 111 362 ly By clicking the desired line you can search the system call issuance history to the clicked line The search result is pointed by the indicator which moves to the target position in the MR Trace window 219 7 16 4 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Run Time CPU occupancy status display mode Rdy gt Run Ready state duration display mode System Call System call history display mode Pick Up System Call Extract specified system calls display mode Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 7 16 5 Analyze the Execution History of Task You can re
87. 6 task016 o0269 int i 17 _task017 oo370 18 task0i8 od gt while 1 I 19 task0i9 003721 for i 0 i lt 10 20 task020 gygy get ver 21 taskOZ1 00374 22 task022 4 P 1 Click the ID field or name field in the task pause display area of the ask line to be released from the PAUSE state After the target task is selected the task ID number is displayed in the status bar The Unpause button is enabled if the task is paused 2 Click the Unpause button The selected task is released from the PAUSE state 228 7 Windows Dialogs 7 17 3 4 Display Program Contents of Certain Task in Task Source Display Area at MR Task Pause DEMO C s nu E BRV Selected Task 15 task015 ID name Pause 1 main Z task00Z 3 task003 4 task004 taskO005j taskO006j Pause PC O0F1FA6H task007 task008 task009 taskO010 11 task0il 12 task012 13 task013 14 task014 task015 i 16 task016 17 task017 18 task018 19 task019 20 task020 21 task021 Source void task015 T_VER pk_ver int i a while 1 for i 0 i lt 10 get ver 5 rot rdg l void task016 T_VER pk_ver int i while 1 for i 0 i lt 10 get_ver 6
88. 7 13 set flg setptn H l flgid D 1 E OK 00 00 00 093 163 14 wai flg wimode H 3 mwaiptn H l flgid D 1 ercd 22 flgoptn 22 00 00 00 046 203 15 rsm tsk tskid D 3 E OBJ 00 00 00 052 734 16 sig sem semid D 1 E OK 00 00 00 065 751 17 wai sem semid D 1 ered 277 00 00 00 078 780 18 rsm tsk tskid p 4 E OBS 00 00 00 085 310 19 snd mag pk msg Rl H 5678 pk msq R3 H 1Z E OK 00 00 00 098 327 20 rev mag mbxid D 1 ercd 222 pk _msg R1j 222 pk 00 00 00 111 362 7 The issued system calls are listed in chronological order of system call The data displayed is the statistical results for the range specified with the start marker and end marker in the MR Trace window By clicking each line you can search the system call issuance history corresponding to the clicked line The search result is pointed by the indicator in the MR Trace window after the indicator moves to the destination position 221 7 16 5 3 1 Extract the Issuance History Click the Pick Up button in the tool bar Or select Menu Pick Up System Call The dialog shown below is opened Specify the search condition of the system call to be extracted and displayed MR System Call Pick Up Extract the issuance history of the system call which meets the specified condition and display it 222 7 Windows Dialogs 7 17 MR Task Pause Window The MR Task Pause Window realizes the task pause function of the real time OS
89. 7 7632 Reading writing data to the specified address range Set as below Example Writing data to addresses ranging from 400h to 40Fh Al Set Event Status DATA ACCESS joo for a Al Set Event Status DATA ACCESS Not Specify H po po o WRITE I Mask 134 7 Windows Dialogs 7 7638 Reading writing data to addresses outside the specified range Set as below Example Writing data to addresses below 7FFh 41 Set Event Status DATA ACCESS rrr v l EEE Al Set Event Status DATA ACCESS Not Specify H po 000 WRITE I Mask 7 7 7 Specify the Events Bit Access To specify a bit access event change the event select dialog box s Event Type to BIT SYMBOL The event is established when the specified bit at the specified address or specified bit symbol is accessed under specified conditions 7 7 7 1 Writing Reading a Specified Bit Set as below Example Writing 0 to bit 2 at address 400h l Set Event Status BIT SYMBOL i 7 Windows Dialogs 77711 Writing Reading a Specitied Bit Symbol Set as below Example Writing 1 to bit symbol bitsym 41 Set Event Status BIT SYMBOL i 7 7 8 Specify the Events Interrupt To specify an interrupt event change Event Type in the event select dialog box to INTERRUPT When an interrupt is generated or finished the event is established 7 7 8 1 Interrupt Occur
90. 8001h Address 8001h ex mov b 34h 8001h Data 34h Data 3400h Data Mask 00 FFh Data Mask FFOOh 12 3 6 Operating frequency of MCU You need to specify the operating frequency of mcu for debugger to calculate the time for Trace window Time measurement window or other functions You can set it in MCU tab of INIT dialog box If you use the mcu at 10MHz div 8 please enter 10 and 8 to edit boxes 12 3 7 The correspondence OS version of task pause function The task pause function is available when downloading a target program in which the system for the task pause function supported by MR30 V 3 00 or later version is installed If the MR30 version is V 3 00 Release 1 the following phenomenon may occur e If a program issues a system call such as rel wai or irel wai to a task which is changed to Pause using the task pause function the Pause state of the task is reset In this case the MR Task Pause window shows the task information different from the real task state This phenomenon will not occur on a target program in which MR30 V3 10 Release 1 or later is installed 271 12 3 8 Memory Space Expansion e C watch window Memory window and other debugging windows can not show correct values when it shows the expanded area of the memory space expansion fuction Debugging windows does not consider the bank register e In MODE2 of memory space expansion the area bank is always set the map as EXTERNAL
91. Browse button to select a directory After a setting click the OK button 22 4 Preparation before Use 4 2 1 2 Step2 Setting for the Toolchain A wizard for the project creation starts New Project Toolchain version 53000 Which CPU do you want to use for this project GPU Series If there is no GPU type to be selected select the GPU Type that a similar to hardware specification or select Other lt Back ned Finish Cancel Here the following contents are set e toolchain e the setting for the real time OS when using e the setting for the startup file heap area stack area and so on Please set required information and click the Next button The contents of a setting change with C C compiler packages of use Please refer to the manual attached to your C C compiler package about the details of the contents of a setting 23 4 2 1 3 Step 3 Selecting of the Target Platform Select the target system used for your debugging emulator simulator When the setting for the toolchain has been completed the following dialog box is displayed I New Project 5 7 Setting the Target System for Debugging pe p MM160 REC FoUSB UART MIM1SG REC PC7501 Emulator MMISC REC Simulator 1 Selecting of the Target type In the Target typel list box select the target CPU type 2 Selecting of the Target Platform In the Targets area the target for the session file use
92. C R8C ylmb The debugger for 740 ylmba At link Specify the linker s option definition file name using f option We do not evaluate other settings so we can not recommend to append other options 12 5 4 2 Command Execution Examples The following shows examples of entering commands depending on the product e The debugger for M32C gt ICCMC80 r filel c lt Enter gt gt ICCMC80 r file2 c lt Enter gt gt XLINK o filename 695 f lnkm80 xcl filel file2 lt Enter gt e The debugger for M16C R8C gt ICCM16C r filel c lt Enter gt gt ICCM16C r file2 c lt Enter gt gt XLINK o filename 695 f lnkml6c xcl filel file2 lt Enter gt e The debugger for 740 gt ICC740 r filel c lt Enter gt gt ICC740 r file2 c lt Enter gt gt XLINK o filename 695 f 1nk7400t xcl filel file2 lt Enter gt The XCL file name varies depending on the product and memory model For details see the ICCxxxx manual 277 12 5 5 When Using the TASKING C Compiler EDE Please specify the project setting by following process 1 Select menu EDE gt C Compiler Option gt Project Options The M16C C Compiler Options Project Namel dialog opens Please set as follows by this dialog Optimeze Tab Please specify No optimization by Optimization level Debug Tab Please check only Enable generation of any debug information Gncluding type checkeing and Genarate symbolic debug information 2 Select menu EDE gt Linker Locator
93. CCESS oot a d Al Set Event Status DATA ACCESS vi 2 po ooo WRITE A Vw 126 7 Windows Dialogs Example Writing word length data 1234h to even address 400h Al Set Event Status DATA ACCESS addr Address1 o l l Al Set Event Status DATA ACCESS m we o 127 Example Writing data 10h 3Fh to even address 400h Al Set Event Status DATA ACCESS addr Address1 Al Set Event Status DATA ACCESS vi fo gt pr fure oF 128 7 Windows Dialogs 7 7622 Reading writing data to the specified address range Set as below Example Writing data to addresses ranging from 400h to 40Fh Al Set Event Status Event Type DATA ACCESS v Address Data Setting Range Adderss1 lt addr lt Address2 v Addresst 400 Address2 OF ox mn Function Source File v Function l 7 ACCESS WRITE ADDRESS 000400 CONDITION 000400 lt faddr lt 00040F canes Al Set Event Status Event Type DATA ACCESS v Address Data Setting Ranee Not Specify 7 Data 1 food Data 2 pooo Access WRITE v T Mask Jocao ACCESS WRITE ADDRESS 000400 CONDITION 000400 lt addr lt 00040F mest 129 7 7 62 8 Reading writing data to addresses outside the specified range Set as below Example Writing data to addres
94. CPU is described as for 740 Active X Microsoft MS DOS Visual Basic Visual C Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and other countries IBM and AT are registered trademarks of International Business Machines Corporation Intel and Pentium are registered trademarks of Intel Corporation Adobe and Acrobat are registered trademarks of Adobe Systems Incorporated All other brand and product names are trademarks registered trademarks or service marks of their respective holders 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 YSUPPORTYProduct nameYSUPPORT TXT Renesas Tools Homepage http www renesas com en tools Setup of Debugger 1 Features 1 1 1 Real Time RAM Monitor Function ssserrrnvvversnnrrrrrsnnrrrrssnnrerrnnrrrsrennrnrrssnnrsrssnrnrsrennrsrsssnnrsrssnnsssssnn 1 1 1 1 RAM Monitor A ea e aa a a aa a Ea aaea e aaea a ea E E saena iE 1 102 Sam pling 27 ToT EAEE EAER EAR A T AEE ES A AAAA EAEE OE EAE E E E T 2 Ted Related Windows r a see ear 2 1 2 Break PUC OA S a a a a dus Soot oak a E E A A AEE 3 1 2 1 Software Breaks Function srrrrrovvvorrnnvrrrrennrrrrssnnrrrrsrnrrsrsnnvrrsssnnnnrsssnsvsrsnnrsesssnnrsrsssnnssrnnn 3 12 2 Hardware Break coiere n E A E E E R E E E REE 4 IEAA EROE H Ae e i E E E E E esse ae 5
95. Creation of a new workspace In the Welcome dialog box that is displayed when the High performance Embedded Workshop is activated select the Create a new project workspace radio button and click the OK button Creation of a new workspace is started The following dialog box is displayed New Project Workspace Projects Workspace Name Empty Application Sample01 t5 Import Makefile Project Name Library Sa mple01 Directory D work HEW4 Samples M16C Sample01 Browse GPU family m160 v Tool chain Renesas M16G Standard X Properties oeei 1 Select the target CPU family In the CPU family combo box select the target CPU family 2 Select the target toolchain In the Tool chain combo box select the target toolchain name when using the toolchain 3 Select the project type In the Project type list box select the project type to be used In this case select Application Please refer to the manual attached to your C C compiler package about the details of the project type which can be chosen 4 Specify the workspace name and project name In the Workspace Name edit box enter the new workspace name In the Project Name edit box enter the project name When the project name is the same as the workspace name it needs not be entered In the Directory edit box enter the directory name in which the workspace will be created Click the
96. D name 0 1 2 3 32 DFFDSO SYSCALLO 33 OFFD84 SYSCALL1 38 OFFD98 EE Idle task4j Unknown taskij task2 _task5 _task3 3 td en IN e To initialize the display order select Menu Init Order 715 2465 Display the specific task only Click the task interrupt routine to be hidden the left portion of the graph Every time you click the setting is switched between Display and Hide 7 15 2 4 6 Change the display color Select Menu Color The Color dialog is opened Click the button corresponding to the desired item The Color Setting dialog is opened Change the display color in the dialog 216 7 Windows Dialogs 7 15 2 5 Measure the Execution Time of Task You can measure the execution time between the markers by changing the positions of start marker and end marker in the MR Trace window s t MR Trace JO x BAD HRS lira ey ie Oo Mark 00 00 00 078 808 00 00 00 131 909 00 00 00 053 101 Indicator 00 00 00 184 063 Scale 2401435 Grid 00 00 00 032 832 Area Break VEC table ID name 32 OFEFD80 SYSCALLO 33 OFFDB4 SYSCALL1 38 OFFD98 SYSCALLZ EG EE EN Unknown taskl task2 task5 task3 AR od OT D Drag the start marker position and end marker position The time interval between t
97. EAEE Eo OiR SEEEN EAEE eiere 272 12 3 11 MR STK scriptc mmand Aarmen ei a a E a aiara 272 12 4 Attention of the 740 Debugger rrrrrrnnnnrnrnrnrrernennrnrrrnrrnrrennnnrrenennerennnnrrnnsnnsnensnnrnnnenssnensnnnnnnse 273 12 4 1 S tting of Memory Mapana a a A aS 273 12 4 2 Emulation Pod M37515T RPDiscsece nreno e E 273 12 4 3 Stack area used by the emulator rrrrrrrrronnrnrrrnrrrrrannvnrrrnrrrrrennnnrrnnsnrrrensnnrvnnsnesrensnnnsen 273 1244 Specify the Clock iiei eee E T EE TOE E ERE 273 12 4 5 Watch dog tin Gb sis aeoe aeeoe neasa r eE ETE EEEE EE N ETENE 273 12 4 6 Option of C Compiler Assembler Linker c cccccccecsessceeececeenesssceeececeenesssaeeeeeeeenes 273 12 4 7 About the single step execution and the program break function in the internal RAM area of the meu sarira ei a R EEAS TEE R EEE EERS E R E E EE 274 12 4 8 Debugging in the 16 Timer functions ssessseesssssssersesesseseerressesssersesesssrrseesessssrsre 274 12 4 9 Hardware Event ussssnsesasarmskasenna E O E E E P E 274 12 4 10 Operating frequency Of MCU rrrnnnnrvrnrnrrernsnnrnnnenssrensnnrnnrensseenennrnnnenssesnennrnnnensseessnnnen 274 12 5 Option of C Compiler Assembler Linker cccccscscccececeessecececececeenssaeceeececeesssaeeeeeeeeeensaaees 275 12 51 When Using NOX Xirona E E E ET N ARNA eae 275 12 5 2 When Using the Assembler Package for 740 Family rrreroronnnnrvrnrnrsrrnennrnrnrnssrrrennnnr 275 12 5 3 When Using the IAR C Compiler
98. ELF DWARF2_KPIT ELF DWARF2 format file When Using KPIT toolchain Intel Hex Sym Intel Hex format file with Symbol format file When Using Renesas toolchain SRA74 IEEE695 ICC740 IEEE 695 format file When Using Renesas toolchain ICC740 This debugger does not support the object formats which are not shown in the drop down list 30 4 Preparation before Use 3 Then register the corresponding download module in the Download Modules list box download module can be specified in the dialog opened with a Add button Download Module KE zi xi Offset fo 3 Format flEEEGS FENESA z o Oei Filename D HEW4 samples M160 demox30 gt Browse ccess size fi I Download debug information only I Perform memory verify during download I Download automatically on target connection Select the format of the download module in the Format edit box Please refer to the upper table about the format name of a download module Enter the full path and filename of the download module in the Filename edit box Specifies the access size for the current download module in the Access size list box After that click the OK button ATTENTION Offset Access size and Perform memory verify during download is ignored The offset is always set to 0 the access size is always set to 1 and the verification does not work 31 4 3 Starting the Debugger The debugging can be started by con
99. Evert name Al Set Event Status Specify the event type om m EZ Carterts change with the setting of Event Type Following events can be set by specifying Event Type in this dialog box 102 7 Windows Dialogs e When FETCH is selected Breaks for the instruction fetch The debugger for M32C not support When using these products use memory access instead ran Ba pooo Bl LS _ Ss a e When DATA ACCESS is selected Breaks for the memory access pooo ooo o pooo ooo o Rw a M 103 e When BIT SYMBOL is selected Breaks for the bit access e When INTERRUPT is selected Breaks for the interrupt occurrence or termination The debugger for M32C not support 104 7 Windows Dialogs e When TRIGGER is selected Breaks for the status of signal input from external trace cable peggene 105 7 7 2 Specify the Combinatorial Condition To specify a combinatorial condition specify the desired condition from the combinatorial condition specification area e When AND or OR is selected In the event specification area the event used and a pass count for that event can be specified To alter the pass count while the event to alter is being selected click the pass count value of that event IV Enable HAW Break PASS E ADDRESS 0000 0000 43 0000 44 0000 45 0000 46 0000 OOOEDE e When AND Same Time is selected In the event sp
100. Example when the internal ROM area is located from 1080h 1080 to 3FFF gt Internal About special settings when using the M38000TL2 FPD Always set the internal SFR and internal RAM areas for External However if the target MCU s RAM area is larger than the RAM included in the emulator MCU set that area for Internal Example When the RAM area included in the emulator MCU is 40 1FF and the target MCU s internal RAM area is 40 2FF 40 to 1FF gt External 200 to 2FF gt Internal 55 5 6 Method of making MCU file 5 6 1 Method of making MCU file the M16C R8C Debugger The following content is sequentially described in the MCU file Specify the MCU name to the file name and specify mcu to the file extension Start address of SFR area End address of SFR area Start address of internal RAM area End address of internal RAM area Start address of ROM area End address of ROM area File name of the Firmware 1 MCU type whether memory space extension mode has to be specified or not 2 OO 2 OG wed OD ER Specify the addresses in hex format and don t add any prefix which describe its radix 1 Specify the addresses in hex format and don t add any prefix which describe its radix MCU Firmware file name M16C 60 group M30600 M16C 61 group M30600 M16C 62 group M30620B M16C 20 series M30620B There is a case that the emulation pod need the different firmware from the listed firmware
101. Fask Trace WAN OW seis sects grader ds sn S Mae teehee Sota Ae we 230 7 18 1 Extended Ments inenen ar E E teed lige teased tere are trase 231 7 18 2 Refer the Execution History of Task Taskxx Window eevrsvarvrsvarvrrvsrservververvevrerserr 232 7 19 Task Analyze Window ecer seccccscevescaccctedccaseuvvceledscessousvevcteceevssubuebeveccccesesebuedaveascevesevececcetedscoute 7 19 1 Extended Menus 7 19 2 Analyze the Execution History of Task cccccccsccccccccsesssssceeececsessseceeeeecsensaeseeeeeees 238 8 Table of Script Commands 239 8 1 Table of Script Commands classified by function osorvvrrvervrrvrrververrrrsvrrvervrrververvressssvesvesvene 239 8 1 1 Execution Command ccccccccssssssessssceceessececseeeeecsueeecesseeecseseecessueeeeseaeeeeseaaeeseseeeeenes 239 8 1 2 File Operation Commands 0 ccccceccccccecsesesssceeececeeseaceceeeceesessaseeeeceeesesssaseeeceseeeneaaeas 239 8 1 3 Register Operation Commands ccccccccccccssssssecececeesessecececececeesseseeeeececsessaeeeeseeeeenesaees 240 8 1 4 Memory Operation Commands cccccccccsssssseseeeceesessecececeeeesesssaeceeececeesssaeeeeeeeseensaaes 240 8 1 5 Assemble Disassemble Commands ccccsccccesssececssececeessececseaecesseeeeessaeeecsesaeeeesneeeenes 240 8 1 6 Software Break Setting Commands u ccccceccesccececsessscececececsesssaeceeececsesssaseeeceeeeensaaes 240 8 1 7 Hardware Break Setting Commands cccccccccccsessssssceeececseses
102. ITION 000000 addr 000000 000000 addr 000000 000000 addr 000000 000000 addr 000000 000000 addr 000000 000000 addr 000000 Setting of combination condition Setting of Process ID e The events listed below can be specified as break events If the contents of events are altered they are marked by an asterisk on the title bar The asterisks are not displayed after setting up the emulator The debugger for M32C Memory Access Bit Access External Trigger Can be substituted by memory access Access type Read The debugger for M16C R8C Fetch Memory Access Bit Access Interrupt External Trigger The debugger for 740 Fetch Memory Access Bit Access Interrupt External Trigger e Events at up to six points can be used e These events can be combined in one of the following ways Break when all of the valid events are established AND condition Break when all of the valid events are established at the same time simultaneous AND condition Break when one of the valid events is established OR condition Break upon entering a break state during state transition State Transition condition e At the time the debugger starts up the hardware breaks have no effect 101 7 7 1 1 Specify the Break Event To set events double click to select the event you want to set from the event setting area of the H W Break Point Setting Window This opens the dialog box shown below
103. MR308 MR30 The debugger for 740 doesn t support this function You can pause and unpause the specified task from this window The window can be used only when the program containing the system of the MR308 MR30 for the task pause functions and system clock timer is downloaded The MR30 task pause function is supported with MR30 V 3 00 or later Previously installed target programs cannot be used with this window Selected Task 11 task011 ID name Pause a _ main task002 task003 task004 task005 task006 task007 task008 9 task009 10 task010 taskO11 Pause PC O0F20A0H 12 task012 13 task013 14 task014 15 task015 16 task016 El 171 0 eannan PAU Source fvoid task011 i T_VER pk_ver int i while 1 for i O i lt 10 i OO lt ov tn hun rot rdq l H woid task012 H T_VER pk_ver e The information ID number name context PC value during Pause on all the tasks defined in the configuration file when creating the target program is displayed in the task pause display area Select the target task for task pause from this display area e The specified program content is displayed in the task source display area When performing Come pause specify the stop position using th
104. Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Script Open Open script file Run Run script file Step One step execution of script file Close Close script file View Save Save view buffer to file Clear Clear view buffer Log On Open log file and start recording start output to file Off Close log file and end recording stop output to file Record On Record the executed commands to a file Off Stop recording the executed commands Copy Copy the selection and put it on the Clipboard Paste Insert Clipboard contents Cut Cut the selection and put it on the Clipboard Delete Erase the selection Undo Undo the last action Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 97 7 6 S W Break Point Setting Window The S W Break Point Setting window allows you to set software break points Software breaks stop the execution of instructions immediately before the specified break point Save Load Break Point Buttons Set Break Point Area E S W Break Points S W Break Point 0F0000 0F00C2 36 GLOBAL C 0F012C 22 LOCAL C Display Break Points Operation Buttons to Break Points e If you have set multiple software breakpoints program execution stops when any one software
105. OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of semaphore Def_cnt Default value of semaphore counter Count Semaphore count semQ Task ID Nos and task names in the semaphore queue e When a task connected to the SEM queue is in the state of waiting with timeout enabled waiting in twai_sem a string tmol which indicates a state of waiting with timeout enabled is appended to a string displayed in the semQ field When a task connected to the SEM queue is in the state of forced waiting double waiting a string s which indicates double waiting is appended to a string displayed in the semQ field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 _task26 tmolls e Up to 8 characters can be displayed in the task name in the semQ field If a task name exceeds 8 characters the extra characters are omitted 7 14 6 2 Display the Semaphore Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 All the SEMs defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of semaphore Sematr Attribute of each semaphore Sement Semaphore count Semaphore Queue Task ID Nos and task names in the semap
106. Program rerrrrnnnnrvrrvnnrernennnnrnrnssrerensnnrrnnsnrsrensnnrsnnsne 64 6 2 4 Step4 Setting a Breakpoint ccccccccccecssssssccccececssssnsccecececsensnscecececsesssaaeeeseesenseaaees 66 6 2 5 Step5 Executing the Program rorvrnrnnsrannnnrvrnenernensnnrnnnrnssersennnnrnrnssnesensnnnnnnsssssensnnrsnnene 67 6 2 6 Step6 Reviewing Breakpoints cccccccccessssssceeccecsesssssceecceceesesseseeeeeceesenssaeeeeceseeensaaees 69 6 2 7 Step7 Viewing Register cccccccccssssssesccececsessseeceeccecsessaeseeececseseeseeeeecsesesssaeeeeseseeeneea 70 6 2 8 Step8 Viewing Memory cccssssssccccccscssssnnccecececsessaececececsensnseaececccsesssaaeeeseesenssaaees 71 6 2 9 Step9 Watching Variables cccccccccccccecsesessececececsesssnececececeenenssceeeesccesenssaeeeeeeseeensaaes 72 6 2 10 Step10 Stepping Through a Program ccccccccsessessscecececeenenseceseeeceesesssaeceeeesesensaaees 74 6 2 11 Step11 Forced Breaking of Program Executions cccccccssssscccececeesesssceeececeesenssaeees 77 6 2 12 Step12 Displaying Local Variables cccccccccccceesesssceeececeenensececeeecsesesssaeeeeeceesensaaees 78 6 2 13 Step13 Stack Trace Function cccccccccesssssscecececsessssscecececsesesseseceecceesesssaeeeeceeeeeneaaees 79 6 2 14 What Next t 0s8 okra headin hekter ee Pe es 80 Reference 81 7 Windows Dialogs 83 TIRAM Monitor Window 222 cc c ccecs05 cceeeenccessbeccdeccten
107. 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
108. Select radio button 5 1 3 2 Specify the Work Area In the Work Area Start Address field in the Work Area group specify the top address of the area to be used as the work area The emulator uses the MCU internal reservation area unused area as the debugging work area about 10 bytes Specify the work area so that it is accommodated in its MCU internal reservation area The default work area top address is 2CO0h To debug a microcomputer ex 20K byte RAM version if the M16C 62 group whose work area is within the internal RAM area you must change the work area 39 5 1 4 Memory Extension Mode Tab This tab enabled only when the MCU tab in the Init dialog is used to specify the MCU file of the microcomputer M16C 62 group which supports the memory space expansion function The specified data remains effective for the next start In this tab only the debugger for M16C R8C exists Memory Space Expansion Mode Mode C Model C Mode2 5 1 4 1 Select the Memory Space Extension Mode Select the memory space extension mode Memory Space Expansion Mode Mode Model C Mode2 e When you use a normal mode Please click the Normal radio button e When you use extension mode 1 Please click the Model radio button e When you use extension mode 2 Please click the Mode2 radio button The data of the eighth line of the selected MCU data which specifies whether or not memory extension mode is required is used to
109. Specify the write condition Trace data write conditions can be specified You can specify the following write conditions Write conditions unlimited default Cycles from the start event established to the end event established Only cycles where the start event is established Cycles from the start event established to the start event unestablished Other than cycles from the start event established to the end event established Other than cycles where the start event is established Other than cycles from the start event established to the start event unestablished SD GR NE To specify condition 1 choose Total from the list box of the window s Write Condition item Write Condition Total v Detail To specify conditions 2 to 4 choose Pick Up and click the Detail button to open the Realtime trace Write Condition dialog box Write Condition Pick up v e For condition 2 choose the Mode shown below and set the Start and End events Realtime trace Write Condition Setting Mode _ M gt x Start 155 e For condition 3 choose the Mode shown below and set the Start event Realtime trace Write Condition 7 Windows Dialogs Similarly when specifying conditions 5 to 7 choose Exclude and click the Detail button to open the Realtime trace Write Condition dialog box Exclude v z Condition For condition 5 choose
110. T tl Dyadic multiply dyadic divide level 3 sp Dyadic add dyadic subtract level 4 gt gt Right shift left shift level 5 amp Dyadic logical AND level 6 G Dyadic logical OR dyadic level 7 exclusive OR lt lt gt gt Dyadic comparison level 8 252 10 C C Expressions 10 1 Writing C C Expressions You can use C 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 Immediate values 10 Ox0a 012 1 12 1 0E 3 Scope name classname member Mathematical operators He Pointers Kra Reference amp Sign inversion Member reference using dot operator Object Member Member reference using arrow Pointer gt Member this gt Member Pointers to Members Object var Pointer gt var Parentheses Q Arrays Arrayl 2 DArrayl2 3 Casting to basic types int char unsigned long Casting to typedef types DWORD ENUM Variable names and function names var i j func Character constants A b Character string literals abedef I am a boy 10 1 1 Immediate Values You can use hexadecimals decimals octals as immediate values Values starting with Ox are processed as hexadecimals those with 0 as octals and those without either prefix as
111. TB OFFDOO 10000101 6 2 7 2 Setting the Register Value You can change a register flag value from this window Double click the register line to be changed The dialog is opened Enter the value to be changed Value Radix Hex z Set Asi Whole Register z 70 6 Tutorial 6 2 8 Step8 Viewing Memory When the label name is specified the user can view the memory contents that the label has been registered in the ASM Watch window 6 2 8 1 Viewing Memory For example to view the memory contents corresponding to __msize in word size Select ASM Watch from the Symbol submenu of the View menu open the ASM Watch window And click the ASM Watch window with the right hand mouse button and select Add from the popup menu enter __msize in the Address edit box and set Word in the Size combo box Address ms ize Size Word Radix Hex C Dec C Bin ment Click the OK button The ASM Watch window showing the specified area of memory is displayed mmx Ri 2 0 bb Address Bit 000410 __msize Word Hex 0300 71 6 2 9 Step9 Watching Variables As the user steps through a program it is possible to watch that the values of variables used in the user program are changed If the downloaded program is the program generated by the assembler package for 740 family you can not watch variables in C watch window 6 2 9 1 Watching Variables For example se
112. The entire protect area is set to R W Enable by default at start of the emulator 1 2 3 3 Set Method of Protect Break The two types of designation methods are provided e To fetch the memory attribute from the target program section information e To specify the memory attribute of any area 1 3 Real Time Trace Function This function records a target program execution history Up to 32K cycles of execution history can be recorded This record allows inspecting the bus information executed instructions and source program execution path for each cycle The real time trace function records the execution history of the target program The execution history is referred to in the tracing window The execution history can be referred to in the following mode e BUS mode This mode allows you to inspect cycle by cycle bus information The display content depends on the MCU and emulator system used In addition to bus information this mode allows disassemble source line or data access information to be displayed in combination e Disassemble mode This mode allows you to inspect the executed instructions In addition to disassemble information this mode allows source line or data access information to be displayed in combination e Data access mode This mode allows you to inspect the data read write cycles In addition to data access information this mode allows source line information to be displayed in combination e Source mode
113. This mode allows you to inspect the program execution path in the source program 1 3 1 Trace Area The 32K cycles execution history can be referred to with this debugger The trace area of the following 5 mode is being supported e Break 32K cycles before target program stops e Before 32K cycles before trace point e About 16K cycles either side of trace point e After 32K cycles after trace point e Full Until 32K cycles are written in the trace memory Start Trace Event Stop Event Break is set by default To refer the execution history before stopping the target program use Break designation of trace event is not required To refer the execution history at any position or to continue execution of the target program specify the trace event and change the trance range 1 Features 1 3 2 Trace Condition Setting The following designations are available as trace events Address designation Instruction fetch Memory access Bit access External trigger designation eight events Interruption The number of events that can be specified are six events of all These break events can be combined as below Trace when all of the valid events are established AND condition Trace when all of the valid events are established at the same time And same time comdition Trace when one of the valid events is established OR condition Trace upon entering a break state during state transition State Transition con
114. 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 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry CENESAS 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 grant
115. WF ORW TWF CLR Clears the event flag to 0 when an OR wait has occurred and the task wait status has been cancelled 188 7 Windows Dialogs 7 14 2 2 Display the Task Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 All the tasks defined in the configuration are listed in the order of ID number The function of each item is as described below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Items Contents ID Task ID Name Task name Pri Priority Status 1 Task status Wupent Wake up count Actent Activated count Tmout Timeout value Flgptn Wait bit pattern of event flag Wfmode 2 Wait cancellation condition of event flag 189 e 1Task Status Display Status RUN RUNNING state RDY READY state SUS SUSPENDED state DMT DORMANT state WAI SLP Sleeping state WAI SLP SUS Sleeping state suspended WAI SLP TMO Sleeping state with time out WAI SLP TMO SUS Sleeping state with time out suspended WAI DLY Delayed state due to dly_tsk WAI DLY SUS Delayed state due to dly_tsk suspended WAI FLG Waiting state for an eventflag WAI FLG SUS Waiting state for an eventflag suspended WAI FLG TMO Waiting state for an eventflag WAI FLG TMO SUS Waiting state for an eventflag suspended WAI SEM Waiting state for a semaphore resource
116. a E AZ Set Event Status DATA ACCESS l om m we d e 118 7 Windows Dialogs 16 bits bus width 41 Set Event Status DATA ACCESS foo a l 0 Al Set Event Status DATA ACCESS 234 ooo fo o WT A 119 Example Writing data 10h 3Fh to even address 400h Al Set Event Status DATA ACCESS ao v d Al Set Event Status DATA ACCESS vi fo gt pr WAT dr 120 7 Windows Dialogs 7 76 12 Reading writing data to the specified address range Set as below Example Writing data to addresses ranging from 400h to 40Fh Al Set Event Status Event Type DATA ACCESS v Address Data Setting Range Adderss1 lt addr lt Address2 v Addresst 400 Address2 OF ox mn Function Source File v Function l 7 ACCESS WRITE ADDRESS 000400 CONDITION 000400 lt faddr lt 00040F canes Al Set Event Status Event Type DATA ACCESS v Address Data Setting Ranee Not Specify 7 Data 1 food Data 2 pooo Access WRITE v T Mask Jocao ACCESS WRITE ADDRESS 000400 CONDITION 000400 lt addr lt 00040F mest 121 7 76 13 Reading writing data to addresses outside the specified range Set as below Example Writing data to addresses below 7FFh 41 Set Event Status DATA ACCESS m al 7 Bl A
117. ace name it needs not be entered In the Directory edit box enter the directory name in which the workspace will be created Click the Browse button to select a directory After a setting click the OK button 27 4 2 2 2 Step 2 Selecting of the Target Platform Select the target system used for your debugging emulator simulator A wizard starts and the following dialog box is displayed Setting the Target m for Debugging M16G PC4701 Emulator M16G R8C Compact Emulator M16G RSC FoUSB UART M16C R8C PC7501 Emulator Target type mes Next gt Finish re 1 Selecting of the Target type In the Target typel list box select the target CPU type 2 Selecting of the Target Platform In the Targets area the target for the session file used when this debugger is activated must be selected here Check the box against the target platform And choose other target as required And click the Next button 28 4 Preparation before Use 4 2 2 3 Step3 Setting the Configuration File Name Set the configuration file name for each of the all selected target The configuration file saves the state of High performance Embedded Workshop except for the target emulator simulator New Project 6 7 Setting the Debugger Options 01 Emulator Debue_M16C_R8C_PC7501_Emulator Item Setting Mod ity The default name is already set If it is not necessary to change please click
118. addr 000400 data 0032 42 0F0528 FETCH faddr 0F0528 43 000000 FETCH addr 000000 A4 000000 FETCH addr 000000 A5 000000 FETCH faddr 000000 46 000000 FETCH faddr 000000 OOODRRE Combination PID AND v Detail Enable Detail AN AND Same Time OR State Transition 142 7 Windows Dialogs 7 7 10 2 Select AND Same Time Change the Combination group to AND Same Time Next check turn on an event in the event specification area that you want to use No pass counts can be specified fixed to 1 E HAW Break Poir IV Enable HAN Break PASS E ADDRE CONDITION AT 000400 WRITE addr 000400 data 0032 AZ 0F0528 FETCH addr 0F0528 43 000000 FETCH addr 000000 44 000000 FETCH addr 000000 45 000000 FETCH addr 000000 AG 000000 FETCH addr 000000 OOOoOOoO8 Combination PID AND Same Time z Detail Enable Detail Reset Save Load i Close 7 7 10 3 Select State Transition Change the Combination group to State Transition The Detail button included in the Combination group becomes useful so click that button This opens the State Setting window In this window State Transition can be specified using a state transition diagram or sequentially A state time out time can also be specified Specification by a state transition diagram Use the state transition
119. aiting state for the eventflag TA_CLR Eventflag s bit pattern is cleared when a task is released from the waiting state for that eventflag e When a task connected to the event flag queue is in the state of waiting with timeout enabled waiting in twai flg a string tmo which indicates a state of waiting with timeout enabled is appended to a string displayed in the Flag Queue field When a task connected to the event flag queue is in the state of forced waiting double waiting a string s which indicates double waiting is appended to a string displayed in the Flag Queue field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 task26 Is Display when in WAIT SUSPEND with time out 26 Ctask26 tmol s e Up to 8 characters can be displayed in the task name in the Flag Queue field If a task name exceeds 8 characters the extra characters are omitted 195 7 14 6 Display the Semaphore Status In the MR window select Popup Menu Mode gt Semaphorel MR x wi OPa OSAGA o aa Def ent Count semo 0000H OOOOH 10 taskl0 11 _task11 s 0003H 0003H 0005H 0003H 0005H 0005H 0007H 0007H 0002H 0002H 0003H 0003H 7 14 6 1 Display the Semaphore Status When the realtime OS is MRxx conformed to ulITRON specifications V 3 0 All the SEMs defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime
120. al Global Name Value Address signed int i 10 000462 signed long j 26924 000A5A struct Sample p sam Ox43C 000A5E Double click the mark at the left side of pointer p sam in the Locals window to display the structure p sam When the user refers to the members of the structure at the end of the Tutorial function it is clarified that random data is sorted in descending order 78 6 Tutorial 6 2 13 Step13 Stack Trace Function The debugger uses the information on the stack to display the names of functions in the sequence of calls that led to the function to which the program counter is currently pointing The debugger for 740 doesn t support the stack trace function 6 2 13 1 Reference the function call status Double click the S W Breakpoints column in the sort function and set a software breakpoint sort lons a long t int i Js k gap gap 5 while gap gt 0 1 fort k 0 k lt gap ktti fort i ktzap i lt 10 i itzap MH for j i gap j gt k j i gap iftalil gt aLitzapl t t ali ali aljtgapl alitgap t else To executes the user program from the reset vector address select Reset Go from the Debug menu or click the Reset Go button on the toolbar After the break in program execution select Stack Trace from the Code submenu of the View menu to open the Stack Trace window StackTrace Kind Name Value E F sort 0F4140 F tutor
121. ame of cycle handler interval Interrupt interval count Interrupt count Status Activity status of cycle start handler e The following are displayed in the Status area TCY_ON Cycle handler enabled TCY_OFF Cycle handler disabled 202 7 Windows Dialogs 7 14 9 2 Display the Cycle Handler Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 All the cycle handlers defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of cycle handler Name Name of cycle handler Cycphs The activation phase by the millisecond Cyctim The activation cycle time by the millisecond Tmout The amount of time by the millisecond remaining before the cyclic handler s next activation time Status Activity status of cycle start handler e The following are displayed in the Status area TCYC_STA TCYC_STP Cycle handler is in an operational state Cycle handler is in a non operational state 203 7 14 10 Display the Alarm Handler Status In the MR window select Popup Menu Mode gt Alarm Handler MR wioOor AmUGHO lt OGHESB Remain Handler Now System Clock Count 0000H0000H 0188H ID Stazddr name AlarmTime OF1C68H alarm 0000H OOOOH OF1C70H alar
122. any value is written to the specified address bit LED Changes the display color of any area when any value is written to the specified address bit Substitution for LED ON Button A virtual port input can be executed at the time the button is pressed Text Display the text string e You can also save the created panel in a file and reload it e You can set up to 200 address points to the created part If different addresses are set to the individual parts you can arrange up to 200 parts 183 7 13 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Select Item Select an I O item Delete Delete the selected I O item Copy Copy the selected I O item Paste Paste the copied I O item Create Button Create a new button item Create Label Create a new label item Create LED Create a new LED item Create Text Create a new text item Display grid Display the grid line Save Save I O panel file Load Load I O panel file Sampling Period Set RAM monitor sampling period Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 184 7 Windows Dialogs 7 14 MR Window Use the MR Window to display the status of the realtime OS The debugger for 740 doe
123. arallel board PCA4202G02 refer to PCA4202G02 Instruction Manual 19 4 Preparation before Use Please run the High performance Embedded Workshop and connect the emulator In addition in order to debug with this product it is necessary to create a workspace 4 1 Workspaces Projects and Files Just as a word processor allows you to create and modify documents this product allows you to create and modify workspaces A workspace can be thought of as a container of projects and similarly a project can be thought of as a container of project files Thus each workspace contains one or more projects and each project contains one or more files workspace Workspaces allow you to group related projects together For example you may have an application that needs to be built for different processors or you may be developing an application and library at the same time Projects can also be linked hierarchically within a workspace which means that when one project is built all of its child projects are built first However workspaces on their own are not very useful we need to add a project to a workspace and then add files to that project before we can actually do anything 20 4 Preparation before Use 4 2 Starting the High performance Embedded Workshop Activate the High performance Embedded Workshop from Programs in the Start menu The Welcome dialog box is displayed Welcome ss be i e Can
124. as their type name C C expression variable name and result of calculation value as shown below The following describes the display formats of the respective types 10 2 1 Enumeration Types e When the result value of calculation has been defined its name is displayed DATE date Sunday all Radices _ e 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 10 2 2 Basic Types e 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 unsigned int i unsigned int i 65280 when Radix is in initial state OxFF00 when Radix is hex 1111111100000000B when Radix is binary e When the result of calculation is a char type it is displayed as follows unsigned char c J when Radix is in initial state unsigned char c Ox4A when Radix is hex unsigned char c 10100100B when Radix is binary e 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 ES indicates abbreviation 258 10 C C Expressions 10 2 3 Pointer Types e When the result of calculation is a
125. ask8 MB Mm j m a ee oe ee a ee taskS f dk Mm A ietsietaietaieieieiate f dl LES f W W W W nknown olaola lt ay em 60 09 The content of each item is as follows Items Contents ID Indicates a task ID number name Indicates an interrupt routine name task name idle processing display idle and unknown name displayed unknown When moving the mouse to the information displayed in the window the pop up window as below is opened showing the detailed information The following information is displayed in the status bar e Time value at the start marker position e Time value at the end marker position e Time interval between the start marker and the end marker e Time value at the indicator position e Display scale e Time width at grid line interval e Measurement trace range 230 7 Windows Dialogs The grid lines are displayed using the start marker as the radix point The scale is displayed using the time at which the start marker is positioned as 0 with the left forward in time set to minus and the right backward in time set to plus The grid lines allow you to roughly understand the interrupt occurrence cycle and process time The interval time width of the displayed grid lines appears in the Grid
126. ata The messages stored in the data queue e The display of the ID field varies depending on which one is specified the standard data 32 bits or the extended data 16 bits MR308 4 If the standard data 32 bits the ID field displays a string 32 and data queue ID number If the extended data 16 bits the ID field displays a string 16 and data queue ID number MR30 4 If the standard data 16 bits the ID field displays a string 16 and data queue ID number If the extended data 32 bits the ID field displays a string 32 and data queue ID number The following are displayed in the Dtqatr area TA_TFIFO Task wait queue is in FIFO order TA_TPRI Task wait queue is in task priority order 200 7 Windows Dialogs e The Data Queue Wait field displays a string Send if a task waiting for a message sending and then displays the ID number and name of the task waiting for a message sending Also if a task waiting for a message receiving displays a string Receive and then displays the ID number and name of the task waiting for a message receiving e When a task connected to the date queue is in the state of waiting with timeout enabled a string Itmol which indicates the state of timeout enabled is appended to a string displayed in the Data Queue Wait field When a task connected to the data queue is in the state of forced waiting Double waiting a string s
127. ates a state of waiting with timeout enabled is appended to a string displayed in the flag Q field When a task connected to the event flag queue is in the state of forced waiting double waiting a string s which indicates double waiting is appended to a string displayed in the flag Q field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 _task26 sl Display when in WAIT SUSPEND with time out 26 task26 tmol s e Up to 8 characters can be displayed in the task name in the flag Q field If a task name exceeds 8 characters the extra characters are omitted 7 14 5 2 Display the Event Flag Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 All the event flags defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of event flag Flgatr Attribute of each event flag Flgptn Bit pattern of each event flag Flag Queue Task ID Nos and task names in the event flag queue 194 7 Windows Dialogs e The following are displayed in the Flgatr area TA TFIFO Task wait queue is in FIFO order TA TPRI Task wait queue is in task priority order TA_WSGL Only one task is allowed to be in the waiting state for the eventflag TA_WMUL Multiple tasks are allowed to be in the w
128. ayed in the Init File field 44 5 Setup the Debugger 5 2 Setting of the Communication Interface 5 2 1 Setting of the USB Interface USB communication uses the personal computer s USB interface It is compliant with USB 1 1 USB communication can only be used on the PC4701U emulator Before USB communication can be performed the computer must have a dedicated device driver installed in it For details on how to install USB device drivers see 3 3 1 1Install of USB device driver For connection by USB communication click the USB radio button on the MCU tab Parallel Serial LAN LPT USB Serial No v Target The currently USB connected emulators are listed in the Serial No area Select the serial No of the emulator you want to connect 45 5 2 2 Setting of the LPT Interface LPT communication uses a parallel interface printer interface of the personal computer LPT communication can only be used on the PC4701U M emulator To set the LPT communication click the LPT radio button of the MCU tab in the Init dialog The setting looks like the figure below Parallel 6 Serial C LAN LPT USB Type AUTO v Target VO Address 378h z F Self Check Specify the mode for data transfers in the Type field e The LPT interface has four modes for data transfers Nibble Byte ECP and EPP Their modes are documented in the IEEE 1284 standard The mode possible to use depends on the PC wit
129. be executed operation after detection of the error cannot be guaranteed Reliability cannot therefore be placed on the results of execution after an error has been detected 245 9 1 1 Script Command 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 10 levels 9 1 2 Assign Statement Assign statement s define and initialize macro variables and assign values The following shows the format to be used macro variable expression e You can use alphanumerics and the underscore _ in macro variable names However you cannot use a numeric to start a macro variable name e You can specify any expression of which the value is an integer between Oh and FFFFFFFFh to be assigned in a macro variable If you specify a negative number it is processed as twos complement e You can use macro variables within the expression Always precede macro variables with the sign 9 1 3 Conditional Statement 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 e If the expression is t rue other than 0 statement 1 is executed If false 0 statement 2 is executed e You can omit the else statement If omitted and the expression is false execution jumps to t
130. bit access is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 8 Specify the Events Interrupt 7 10 8 Specify the Events External Trigger Signal How to set events for bit access is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 9 Specify the Events External Trigger Signal 165 7 10 9 Set the Measurement Condition For the debugger the following measurement conditions can be specified e Measure the execution time between the events e Measure a period at which intervals events occur e Measure the time at which events are established By specifying a function name it is possible to measure the execution time of that function Up to four measurement intervals can be specified To specify measurement intervals click any line MP1 MP4 in the Measurement Point group of the Interval Time Measure Window This opens a dialog box for specifying measurement conditions 7 10 9 1 Measure the execution time between the events 1 Set the measurement events measurement start event and measurement end event 2 Specify the following in the Measurement Condition Designation dialog Select this mode Set Mesurement Point MP1 Measurement Point Setting Mode Start B1 Function j Select the end event Select the start event 166 7 Windows Dialogs 7 10 9 2 Measure the event occurrence
131. cally mapped into the emulation memory The address range of the automatically mapped area is displayed in the Internal ROM Area field Microprocessor Mode 8bit and 16bit Specify the area to be assigned separately There is no area which is automatically assigned ATTENTION The mapping setting data specified using the Map command is not reflected to the Emem dialog box et the emulation memory areas in the order of usage priority The emulation memory areas to be set by the Map command are numbered ignoring the unused Not Use areas Accordingly the emulation memory areas set in the Emem dialog box and the emulation memory area numbers set by the Map command will be mismatched 53 5 4 Setup the Debugger for M16C R8C 5 4 1 Map Command The memory map information must be altered to suit the target microcomputer s memory space by Map command Area Mapping Note SFR External Internal RAM Internal Internal ROM Internal External ROM External Memory Expansion Mode Microprocessor Mode Note e The emulator temporarily uses the area from FFCh to FFFFh as a stack Set this area as Internal If you want to set this area to External be sure to prepare read write unprotected memory for the area e When using the memory space expansion function on the M16C 62 Series microcomputer set the areas whose addresses are duplicated to External The duplicated area depends on memory Memory space
132. ccur before command input Pause 3 Waits for user input Sleep 9 Halts for user input until the specified time has elapsed Logon 3 Outputs the screen display to a log file Logoff 2 Stops the output of the screen display to a log file Exec Executes external application 8 1 11 Program Display Commands Command Name Short Name Contents Func 3 Checks function names and displays the contents of functions Up Displays the calling function Down Displays a called function Where Displays a function call status Path Sets and checks the search path AddPath Adds the search path File Checks a filename and displays the contents of that file 241 8 1 12 Map Commands Command Name Short Name Contents Map Checks and sets mapping data 8 1 13 Clock Command Command Name Short Name Contents Clock CLK Checks and changes the clock 8 1 14 WatchDog Timer Commands Command Name Short Name Contents WatchDogTimer WDT Sets and checks the usage condition of the watchdog timer 8 1 15 C Language Debugging Commands Command Name Short Name Contents Print Check value of specified C variable expression Set Set specified data in specified C variable expression 8 1 16 Real time OS Command Command Name Short Name Contents
133. cel Po C Open a recent project workspace Administration C Browse to another project workspace In this dialog box A workspace is created or displayed e Create a new project workspace radio button Creates a new workspace e Open a recent project workspace radio button Uses an existing workspace and displays the history of the opened workspace e Browse to another project workspace radio button Uses an existing workspace this radio button is used when the history of the opened workspace does not remain In the case of Selecting an Existing Workspace select Open a recent project workspace or Browse to another project workspace radio button and select the workspace file hws Please refer to the following about the method to create a new workspace Refer to 4 2 1Creating a New Workspace Toolchain Used Refer to 4 2 2Creating a New Workspace Toolchain Not Used When debugging the existing load module file with this product a workspace is created by this method The method to create a new workspace depends on whether a toolchain is or is not in use Note that this product does not include a toolchain Use of a toolchain is available in an environment where the C C compiler package for the CPU which you are using has been installed For details on this refer to the manual attached to your C C compiler package 21 4 2 1 Creating a New Workspace Toolchain Used 4 2 1 1 Step1
134. ck box included in the PID group of the event setting window When this check box is checked the Detail button to the right of it is enabled PID Iv PID Setting PID Event Address Runtsk Al Access Size 1 Byte v Data PID No 2 Mask Condition amp oeei In the PID Setting area specify the memory address in which to store the execution task the data size and the task number or task name Mask can also be specified for the task number In the Condition group click the radio button To enable events in other than a specified task click the radio button ATTENTION In PID settings always be sure to specify an even address for the Address area In the PID Event area check the check box for the event you want to enable Only the checked events become the target to be debugged PID Event 145 7 8 Protect Window The Protect window sets the protect break memory protect function of the emulator Toolbar Break Mode Protect Base Address 000000 O3FFFF Break Mode OFF start End 000000 OOOSFE OOOSFF OOOFFE 001000 OOLFFE 002000 OOZFFF 003000 OOFFFF 010000 OSFFFF Address Range Protect Break Attribute e The protect break function is disabled at start of the debugger e Three types of pr
135. cope signed long 10 a 000414 Auto signed int i 10 000462 Auto 73 6 2 10 Step10 Stepping Through a Program This debugger provides a range of step menu commands that allow efficient program debugging 1 Step In Executes each statement including statements within functions subroutines 2 Step Out Steps out of a function subroutine and stops at the statement following the statement in the program that called the function subroutine 3 Step Over Executes a function subroutine call in a single step 4 Step Steps the specified times repeatedly at a specified rate 6 2 10 1 Executing Step In Command The Step In command steps into the called function subroutine and stops at the first statement of the called function subroutine To step through the sort function select Step In from the Debug menu or click the Step In button P on the toolbar The PC cursor moves to the first statement of the sort function in the Editor Source window p_sam gt s p_sam gt s8 p_sam gt s9 sort long a long t3 int i j k gap gap 5 while gap gt 0 I fort k O k lt gap ktt fort i ktgap i lt 10 izitgap for j i gap j gt k j j gap iftalil gt aljteapl i t all 74 6 Tutorial 6 2 10 2 Executing Step Out Command The Step Out command steps out of the called function subroutine and stops at the next statement of the calling statement in
136. d system call issuance This window is available only when a target program which uses our real time OS MRxx is downloaded For MR30 e For MR30 this window is available for V 2 00 or later version If a target program crated on MR30 V 1 00 is downloaded the MR Trace window will not function and not display any data For MR308 e The history of the high speed interrupt can not record and display s t MR Trace lol x HOO amp r wy GE Mark 00 00 00 020 160 00 00 00 1 31 909 00 00 00 111 749 Indicator 00 00 00 052 734 Scale 2401435 Grid 00 00 00 032 932 Area Break VEC table ID name 32 OFFDEO SYSCALLO 33 OFFDBA4 SYSCALL1 38 OFFD9B staca Idle taskl taskzZ _task3 task4 task5 tn ON The content of each item is as follows Items Contents VEC 1 Indicates a software interrupt number table Indicates the interrupt vector table number ID Indicates a task ID number name Indicates an interrupt routine name task name idle processing display idle and unknown name displayed unknown 209 When moving the mouse to the information displayed in the window the pop up window as below is opened showing the detailed information Interrupt handling or task execution history System call issue history Task state transition history ti Following infor
137. d when this debugger is activated must be selected here Check the box against the target platform And choose other target as required And click the Next button 24 4 Preparation before Use 4 2 1 4 Step4 Setting the Configuration File Name Set the configuration file name for each of the all selected target The configuration file saves the state of High performance Embedded Workshop except for the target emulator simulator New Project 6 7 Setting the Debugger Options Emulator Debue M160 R8C PC7501 Emulator MGany The default name is already set If it is not necessary to change please click the next button as it is 25 4 2 1 5 Step5 The check of a created file name Finally confirm the file name you create The files which will be generated by the High performance Embedded Workshop are displayed If you want to change the file name select and click it then enter the new name hanging the File N The following source files will be generated Main Program nert0 a30 Start up file sect30 inc Start up file Next gt Finish Cancel This is the end of the emulator settings Exit the Project Generator following the instructions on the screen 26 4 Preparation before Use 4 2 2 Creating a New Workspace Toolchain Not Used When debugging the existing load module file with this product a workspace is created by this method 4 2 2 1 Step1 Cr
138. dam access 04H 00 00 00 054 429 16916 OFOOS1 FDD40BOF rand FOBD4H 00 00 00 054 430 mi 18906 OFOBD4 7SCO6D4E _rand 4E6DH RO 00 00 00 054 430 18904 OFOBDS 75C2C641 41C6H R2 00 00 00 054 430 18902 OFOBDC 754F4004 0440H 00 00 00 054 430 18898 OFOBEO 7S4F3E04 043EH 00 00 00 054 431 18893 OFOBE4 FEO1 FOBE6H 00 00 00 054 431 18889 OFOBE6 FD1COCOF i4mull FOC1CH 00 00 00 054 431 18879 oFocic EC50 R1 R3 00 00 00 054 432 18875 OFOC1E 75B107 7H SP R1 00 00 00 054 432 18870 orocz1 7121 R2 R1 00 00 00 054 432 18865 orocz3 7312 R1 R2 00 00 00 054 433 18863 orocz5 75B109 9H SP R1 00 00 00 054 433 18859 oroc28 7101 RO R1 00 00 00 054 433 18854 oFrocza A112 R1 R2 00 00 00 054 433 j 2 3 4 1 Address display area Shows addresses corresponding to instructions Double click here to bring up a dialog box to search for addresses 2 Object code display area Shows the object codes of instructions 3 Label display area Shows labels corresponding to instruction addresses Double click here to bring up a dialog box to search for addresses 4 Mnemonic display area Shows the mnemonics of instructions Other display areas are the same as in bus mode In addition to disassemble information the window can display source line or data access information in combination In this case the display will be similar to the one shown below iV als 990Q var Z Evy Range 32511 00000 Area Break File Cycle 19026 Add
139. ddress and the end address of the function are automatically registered for the start event and the end event respectively The measurement result does not include the execution time of other functions that have been called from within the specified function 7 10 3 Command Button The buttons on this window has the following meanings Button Function Reset Discards the contents being displayed in the window and loads contents from the emulator in which they were set Save Saves the contents set in the window to a file Load Loads event information from a file in which it was saved Set Sends the contents set in the window to the emulator Close Closes the window 164 7 Windows Dialogs 7 10 4 Specify the Events Instruction Fetch How to set events for fetch is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 5 Specify the Events Instruction Fetch 7 10 5 Specify the Events Memory Access How to set events for memory access is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 6 Specify the Events Memory Access 7 10 6 Specify the Events Bit Access How to set events for bit access is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 7 Specify the Events Bit Access 7 10 7 Specify the Events Interrupt How to set events for
140. debugger s operation gets extraordinarily slower Communication errors arise and the emulator debugger stops operating Various types of errors other than communication errors also take place successively In this case the emulator debugger continues operating however The cause of this problem is that if the debugger is invoked while the standard driver Parport sys of Windows XP is communicating with the LPT port the debugger is unable to communicate with the emulator Then this problem can be circumvented in either of the following methods however you need to take no measures if you have not experienced it in your PC under the above mentioned conditions Execute the utility program to fix LptFix exe LptFix exe disables the Parport sys driver Then if any device other than the emulator is connected to the LPT port after LptFix exe is executed the device may not operate properly In such a case you are encouraged to adopt method shown below If you launch the emulator for the first time after starting the PC invoke the debugger one or more minutes after the emulator starts operating Otherwise you can invoke the debugger immediately after the emulator has started Here is the usage of LptFix exe 1 Invoke the command prompt and move to the folder where the LptFix exe file resides 2 Enter the following command on the command line 3 Restart the PC If LptFix exe is executed be sure to make it ineffective to enable the Parpor
141. diagram of the State Transition group Click any button here to select the event you want to use For the button above the arrow specify the event necessary to go to the state indicated by the arrow For the button above the state elliptical display part specify the event necessary to reset the pass count of each state and reset the time count of that state Pass counts can be specified from the popup menu that appears when selecting an event Example After conditions are met in order of events A1 and A2 event A3 is not established and event A4 is established r Time Out Not Use 0 Start 0 Statel C State2 Time Count 65535 ji x 10usec I Sequential start J gt J gt C gt End Cancel 143 Sequential specification Use the buttons included in the Sequential group Pass counts can be specified from the popup menu that appears when selecting an event The contents set here are reflected in the state transition diagram Example Events A1 A2 and A3 that occur successively in that order are established BB State Setting 144 7 Windows Dialogs 7 7 11 Specify the Process ID By specifying a task name task number it is possible to enable only the events that occurred in the specified task 7 7 11 1 Specify the Task Only the events from a specified task can be detected Events from other than a specified task can also be detected Check the Enable che
142. dition You can select specified task only or other than specified task as the trace condition to meet the real time OS 1 3 3 Trace Data Write Condition Trace data write conditions can be specified You can specify the following write conditions Write conditions unlimited default Cycles from the start event established to the end event established Only cycles where the start event is established Cycles from the start event established to the start event unestablished Other than cycles from the start event established to the end event established Other than cycles where the start event is established Other than cycles from the start event established to the start event unestablished 1 4 Time Measurement Function The time measurement function allows you to measure the maximum minimum and average execution times and measurement counts of a specified zone With this debugger time can be measured up to four points simultaneously 1 4 1 The Measurement Condition The measurement condition of the zone time can specify the following in each measurement zone e Execution time of the specified function e Time between two events e Time between event establishments e Time of event occurrence period 1 Features 1 5 Coverage Function Coverage Measurement is a function to record the addresses executed accessed by the target program CO coverage After stopping execution of the target program you can understand w
143. e manual Click the OK button The Memory window is displayed and shows the specified memory area Memory 000400 ube d d db de Label Register Placing the mouse cursor on a point in the display of data in the Memory window and double clicking allows the values at that point to be changed 63 6 2 3 Step3 Downloading the Tutorial Program 6 2 3 1 Downloading the Tutorial Program Download the object program to be debugged The download file and the address to be downloaded will depends on the target mcu you uses Please replace the screen image and addresses with corresponding one to your target mcu e The Debugger for M16C R8C or M32C Select Download module from Tutorial x30 under Download modules e The Debugger for 740 If you use the C Compiler Package for 740 Family select Download module from Tutorial 695 under Download modules If you use the Assembler Package for 740 Family select Download module from Tutorial hex under Download modules E Eg Tutorial B E Tutorial Assembly source file ke B ncrt0 a30 J E C source file je 8 sort c o Tutoriale Download modules EQ Dependencie i E no defin JE sect30 ir Unload E sorth Download A New Module Remove Debug Settines Configure View v Allow Docking Hide Properties 64 6 Tutorial 6 2 3 2 Displaying the Source Program This debugger allows the user to debu
144. e View button or press the Enter key The context of the specified task appears in the Context field If the task entered in the Task ID field is RUN or DMT when clicking the View button the context is not displayed In the Context field only the task ID and task state are displayed e Ifa task ID number which does not exist is entered in the Task ID field when clicking the View button an error occurs 207 7 14 12 2 Change the task context Enter the task ID number in the Task ID field in the Context dialog and click the Set button The Set Context dialog is opened The Set Context dialog is used to set the specified context register value of the specified task Set Context Data Task ID 14 Register py v Value fiz 0 Cancel Specify the register to be changed in the Register field list box and enter the value to be set in the Value field If an expression description set in the Value field is wrong or if the specified value is outside the allowable range set for the specified register an error occurs 208 7 Windows Dialogs 7 15 MR Trace Window The MR Trace window measures the task execution history of a program using the real time OS and displays the result graphically The debugger for 740 doesn t support this function In addition to the task execution history a history of various other operations each are traced and displayed including interrupt processing task state transition an
145. e cursor in this display area 7 17 1 About Task Pause Function The task pause function is to pause unpause only the specific task while executing the target system When using the task pause function you can specify the specific task while executing all the other tasks and interrupts Also as debugging is available such as Come pause pause at the location you specified effective debugging is provided without affection to peripheral devices controlled by tasks or interrupts The following lists terminology definitions used in this section e PAUSE state Indicates a state of the tasks that are stopped by the task pause function during execution of the target program e Pause Indicates a process to make the specific task in the PAUSE state e Unpause Indicates a process to make the specific task out of the PAUSE state e Come pause Indicates a process to pause the specific task at the specified address 223 ATTENTION Task pause function uses the address match interrupt of the MCU Don t use this function when the target program uses the address match interrupt If you use PC7501 emulator this function is not available when you use address match inturrpt break function 7 17 2 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Task Pause Make the selected task in the PAUSE state Com
146. e emulator ATTENTION e The Trace Point Setting Window and the Time Measure Windows use the same resource of the emulator If the event settings are modified in Time Measure Window settings of the Trace Point Setting Window are modified too e As the count resource for time measurement specify the MCU cycle operation clock of the target mcu instead of the emulator clock 16MHz in the init dialog If you specify the emulator clock the measurement result will be incorrect 159 7 10 1 Specify the Time Measurement Event The events listed below can be specified as measurement events e The debugger for M32C Memory Access Bit Access External Trigger Can be substituted by memory access Access type Read e The debugger for M16C R8C Fetch Memory Access Bit Access Interrupt External Trigger e The debugger for 740 Fetch Memory Access Bit Access Interrupt External Trigger To set events double click to select the event you want to set from the event setting area of the Time Measurement Window This opens the dialog box shown below Event name l Specify the event type B1 Set Event Status Contents change with the setting of Event Type Following events can be set by specifying Event Type in this dialog box 160 7 Windows Dialogs e When FETCH is selected Measures for the instruction fetch The debugger for M32C not support When using these products use memory access instead faddr Address
147. e individually The initial display radix can be changed Leading zero suppression is selectable in hexadecimal display e Any variable can be registered to the Watch tab so that it will be displayed at all times The registered content is saved for each project separately If two or more of the C watch window are opened at the same time the registered The reference scope of the variable is selectable from current scope global scope and each file s scopes e The C watchpoints can be registered to separate destinations by adding Watch tabs e Variables can be registered from another window or editor by a drag and drop operation e The C watchpoints can be sorted by name or by address e Values can be inspected in real time during program execution by using the RAM monitor function e The RAM monitor can be allocated to the address of specified variable 90 7 Windows Dialogs ATTENTION e You cannot change the values of the C watch points listed below Register variables C watch point which does not indicate an address invalid C watch point e Ifa C C language expression cannot be calculated correctly for example when a C C symbol has not been defined it is registered as invalid C watch point It is displayed as lt not active gt If that C C language expression can be calculated correctly at the second time it becomes an effective C watch point e The display settings of the Local File Local and Global tab
148. e pause Make the selected task in the PAUSE state just before executing the code at the cursor in the program display view Unpause Make the selected task out of the PAUSE state Display Source Function Displays the begining of the specified file function Address Displays the program from the specified address Program Counter Displays the program from the current program counter value Mode Source Switches the view to the source mode Mixed Switches the view to the mixed mode Disassembly Switches the view to the disassembly mode Layout Line Shows Hides the line number column Address Shows Hides the address number column Code Shows Hides the line code column Tab Changes Tab number Toolbar display Displays the toolbar Customize toolbar Opens the toolbar customize dialog box Allow Docking Allows the window docking Hide Hides the window Operation in the MR task pause window is as follows when the program display location is changed by PC position specification e When the target task selected in the task pause display area is paused gt Its display position is changed to the context PC position of the task e When the target task selected in the task pause display area is in a state other than pause gt The display position is not changed e When the target task is selected from the task pause display area gt The display position is changed to the position from the current program counter in the same
149. e setting of Event Type Following events can be set by specifying Event Type in this dialog box e When FETCH is selected Traces for the instruction fetch The debugger for M32C not support When using these products use memory access instead en ga rv l Ve 148 7 Windows Dialogs e When DATA ACCESS is selected Traces for the memory access om Rw el p GE e When BIT SYMBOL is selected Traces for the bit access 149 e When INTERRUPT is selected Traces for the interrupt occurrence or termination The debugger for M32C not support e When TRIGGER is selected Traces for the status of signal input from external trace cable fic LT ES TE Ts 150 7 Windows Dialogs 7 9 2 Specify the Combinatorial Condition To specify a combinatorial condition specify the desired condition from the combinatorial condition specification area e When AND or OR is selected In the event specification area the event used and a pass count for that event can be specified To lter the pass count while the event to alter is being selected click the pass count value of that event r Event Status e When AND Same Time is selected In the event specification area the event used can be specified No pass counts can be specified Event Status OOOGEOE 151 e When State Transition is selected Click the Details button and the dialog box
150. e specified by the start marker and the end marker in the MR Trace window The debugger for 740 doesn t support this function The MR Analyze window supports three display mode as below e CPU occupation state by interrupt task e Ready time by task e List of system call issuance histories You can extract and display the history based on the specific condition The MR Analyze window functions together with the MR Trace window This window is available only when a target program using our real time OS MRxx is downloaded 7 16 1 Configuration of CPU Occupancy Status Display Mode The CPU occupation state display mode is used to display the CPU occupation time and ratio by interrupt task The MR Trace window shows the statistical results within the range specified by the start marker and end marker En w w Mark 00 00 00 000 335 00 00 00 164 498 00 00 00 164 163 VEC table ID name Hum Max Run Time Min Run Time Avg Run Time Total Run Time Ratios 0 25 50 75 100 32 OFFD80 SYSCALLO 17 06 00 00 000 033 00 00 00 000 013 00700 00 000 022 00 00 00 000 378 0 23 i H t 33 OFFD84 SYSCALL1 5 00 00 00 000 020 007 00 00 000 019 00 00 00 000 019 00 00 00 000 099 0 06 38 OFFD98 SYSCALLZ 3 00 00 00 000 028 00700 00 000 028 00 00 00 000 028 00 00 00 000 084 0 05 Idle 6 00 00 00 000 017 00 00 00 000 002 00 00 00 000 006
151. ea which can be set in the software breakpoint is different according to the product Please refer to 12 1 2Area where software breakpoint can be set for details You can set break points in the Editor Source Window To do so double click the break point setting area S W breakpoints column for the line in which you want to set the break A red marker is displayed on the line to which the break point was set Sample c i 0 while 1 for 0 i lt DATALSIZE i I data i data i 1 data i 2 data i 3 sub Double click You can delete the break point by double clicking again in the break point setting area S W breakpoints column In the Editor Source window a display of S W breakpoints column is set to Enable by default To erase this column deselect the S W breakpoints check box in the dialog box opened by choosing the main menu Edit gt Define Column Format The S W breakpoints column is erased from all Editor Source windows And select popup menu Columns gt S W breakpoints in the Editor Source window A column can be set up for each Editor Source windows 100 7 Windows Dialogs 7 7 H W Break Point Setting Window The H W Breakpoint Setting window is used to set hardware breakpoints for the Emulators Setting modification flag Selecting of effective events Current event list E H A Break Points Setting IV Enable HAW Break COND
152. eation of a new workspace In the Welcome dialog box that is displayed when the High performance Embedded Workshop is activated select the Create a new project workspace radio button and click the OK button Creation of a new workspace is started The following dialog box is displayed New Project Workspace Projects nere ee eg Workspace Name gt gt Debugger only M166 PC7501 DOSample01 Debugger only M16G StarterK Project Name gt gt Debugger only RBC E SYSTEM DOSample i gt Debugger only R8C E8 SYSTEM Directory D work HEW4 Samples M16C DOSample01 Browse GPU family M16G Tool chain None hud Properties mest 1 Select the target CPU family In the CPU family combo box select the target CPU family 2 Select the target toolchain In the Tool chain combo box select None In this case toolchain is not used When the toolchain has not been installed the fixed information is displayed in this combo box 3 Select the project type When the toolchain is not used it is displayed on a Project Type list box as Debugger only Target Name Select it When two or more project types are displayed please select one of them 4 Specify the workspace name and project name In the Workspace Name edit box enter the new workspace name In the Project Name edit box enter the project name When the project name is the same as the worksp
153. ecification area the event used can be specified No pass counts can be specified V Enable HAW Break PASS E ADDRESS 0000 0000 43 0000 44 0000 45 0000 46 0000 OOOO e When State Transition is selected Click the Details button and the dialog box shown below appears Specification by a state transition diagram or sequential specification can be used If the content of any event is altered it is marked with an asterisk on the title bar Once conditions are set in the emulator asterisks are not displayed A time out time in each state can also be specified 41 0000 FETCH 42 0000 FETCH ap eee 43 0000 FETCH 44 0000 FETCH Time Out 45 0000 FETCH Not Use 0 Start Statel Stat 46 0000 FETCH 5 fi x 10usec Not Use I Sequential Pass Count Stat gt gt End OK Cancel 106 7 Windows Dialogs 7 7 3 Specify the Process ID By specifying a process ID it is possible to detect only event establishment under specific conditions PID _ JV Enable Detail Example Enable only the event that occurs in a specific task when using the realtime OS 7 7 4 Command Button The buttons on this window has the following meanings Button Function Reset Discards the contents being displayed in the window and loads contents from the emulator in which they we
154. ecify the value 1 35 5 1 1 5 Using unusing the watchdog timer Specify whether or not to use the watchdog timer By default the watchdog timer is unused This specification exist for the M32C debugger only I Debug the program using the Watchdog Timer When debugging the target system that uses a watchdog timer select the check box shown above 36 5 Setup the Debugger 5 1 2 Debugging Information Tab The specified content becomes effective when the next being start Compiler N Object Format EEE 695 On Demand v Display the instruction format specifier in disassembly m Always treat variables of enumerator type with unknown size as 1 byte 5 1 2 1 display the compiler used and its object format Display the compiler used and its object file format Compiler NOS20WA NC8G Object Format IEEE 695 Please specify the compiler used and its object file format in the dialog opened by menu Debug gt Debug Settings 5 1 2 2 Specify the Storing of Debugging Information There are two methods for storing debugging information on memory and on demand Select one of these two methods The on memory method is selected by default To select the on demand method click the On Demand check box The specified content becomes effective when the next being download e On memory method Debugging information is stored in the internal memory of your computer Usually select this method e On
155. ecution is suspended by breaking or single stepping during writing to the higher lower order byte of the 16 bit timer For example TIMER_LOW DATA1 TIMER HIGH DATA2 lt when a break occurs here e Precaution 2 Writing a value with the Memory Window into the 16 bit timer will be fail when the program execution is suspended by breaking or single stepping during writing to the higher lower order byte of the 16 bit timer For example DATA1 DATA2 TIMER_LOW TIMER_HIGH lt when a break occurs here These problems caused by the microcomputer s specifications In a microcomputer with the 16 bit timer the timer is written in the order of the lower byte and the higher byte And reading from the timer in reverse order Therefore if a break occurs as shown in the Precaution 1 or 2 an incorrect value will be read or written by displaying or setting a value of the 16 bit timer in the Memory Window 12 4 9 Hardware Event If you specify any other bit of the address that contains a specified bit is accessed during bit access the event may become effective in the following data accesses e Hardware Break Event e Real time Trace Event e Time Measurement Event 12 4 10 Operating frequency of MCU You need to specify the operating frequency of mcu for debugger to calculate the time for Trace window Time measurement window or other functions You can set it in MCU tab of INIT dialog box If you use the mcu at 10MHz di
156. ed 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
157. ed only when using the PC4701U HS emulator The IP address etc must be set in the emulator before it can be connected in a LAN To communicate with the emulator via a LAN on Windows Windows registry information must partly be modified The PC4701U emulator in a LAN can be connected to the PC4701Us on another network connected to the LAN via a router The emulators PC4701U and PC4701HS use different LAN cables Specifically the PC4701U uses LAN cable 10BASE T only generally available on the market whereas the PC4701HS uses the LAN cable 10BASE T 5 included with it The host computer and the emulator can be connected directly 3 1 3 LPT Interface Supported only when using the PC4701U M emulator This communication uses the host computer s parallel printer interface The necessary cable is included with the emulator Four communication modes are supported that include ECP EPP Byte and Nibble Communication modes that can be supported depend on the host computer s BIOS settings Communication modes may not always be used even when they are supported by BIOS 3 Before starting the debugger 3 1 4 Proprietary Parallel Interface Supported only when using the PC4701HS emulator e The host computer must have a dedicated interface board the PCA4202G02 incorporated in it only the ISA bus is supported The necessary cable is included with the emulator e A device driver must separately be set 3 1 4 1 Serial Interface
158. efined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of mailbox Msg cnt Number of messages in each mailbox MAXmsg Maximum number of messages that can be contained in each mailbox Wait Queue Message The messages stored in the mailbox or ID No and task name of tasks waiting for messages The WaitQueue Message field shows a string Msg when a message is stored when Msg_cont as described above is non zero and then displays the stored message When no message is stored when Msg_cont is zero the WaitQueue field displays a string Task if a task waiting for a message exists and then displays the ID number and name of the task waiting for a message When a task connected to the mail box queue is in the state of waiting with timeout enabled waiting in trev msg a string tmo which indicates the state of timeout enabled is appended to a string displayed in the WaitQueue Message field When a task connected to the mail box queue is in the state of forced waiting Double waiting a string s which indicates the state of double waiting is appended to a string displayed in the WaitQueue Message field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 task26 tmol sl
159. elopment of weapons of mass destruction or for the purpose of any other military use When exporting the products or technology described herein you should follow the applicable export control laws and regulations and procedures required by such laws and regulations All information included in this document such as product data diagrams charts programs algorithms and application circuit examples 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 products listed in this document please confirm the latest product information with a Renesas sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas such as that disclosed through our website http www renesas com Renesas has used reasonable care in compiling the information included in this document but Renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document When using or otherwise relying on the information in this document you should evaluate the information in light of the total system before deciding about the applicability of such information to the intended application Renesas makes no representations warranties or guaranties regarding the suitability of its products for any particular application and specifically disclaims
160. 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 ce
161. ess Add C Watch Add C watchpoint Remove C Watch Remove the selected C watchpoint Hide Type Name Hide type names from variables Add Adds new watch item into Access History Reference Area Remove Removes the selected watch item from Access History Reference Area Zoom Zoom In Increase the display scale Zoom Out Decrease the display scale Zoom Specify the display scale Marker Start Marker Move the start marker in the display area End Marker Move the end marker in the display area Indicator Move the indicator in the display area Adjust Set cycle range between markers Change Grid Interval Change the grid interval Change Row Setting Change setting of the selected row Color Change the display color Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 182 7 Windows Dialogs 7 13 GUI I O Window The GUI I O window allows you for port input by creating a user target system key input panel button in the window and clicking the created button And this window also allows you to implement the user target system output panel in the window st GUI 1 0 Sample pni EAN 1 18 16 i 1s Input Panel ol e You can arrange the following parts on the window Label character string Displays erases a character string specified by the user when
162. ess memory even in WAIT STOP mode 5 1 5 1 Specify the Target Clock Change the setting by synchronizing with the clock used by the target microcomputer Internal is set by default The debugger for 740 does not have designation of Sub clock Main fe Internal External Sub Internal fe External Select Internal to set the internal clock and External to set the external clock 5 1 5 2 Attempt to access memory during WAIT STOP mode The debugger for 740 does not have this setting Set this check on when the mcu needs to access memory during WAIT STOP mode When this check is ON debugger will attempt to access memory by waiting for about 5 seconds until the mcu returns from WAIT STOP mode If the mcu remains WAIT STOP mode during this period the operation will receive an error When this check is OFF debugger will receive an error without accessing to real memory 43 5 1 6 Script Tab The specified content becomes effective when the next being start Init File Refer 5 1 6 1 Automatically Execute the Script Commands To automatically execute the script command at start of Debugger click the Refer button to specify the script file to be executed Init File Refer By clicking the Refer button the File Selection dialog is opened The specified script file is displayed in the Init File field To disable auto execution of the script command erase a character string displ
163. f Task Taskxx Window You can reference the task execution history in the Task Trace window You can reference the execution history statistical processing result in the Task Analyze window These windows are also available for a target program using an OS other than our real time OS MRxx 7 18 2 1 Prepare the Measurement To measure the task execution history of the program using the real time OS you must select the trace range in the Task Trace window and then execute the target program 718 2 1 1 Set the Information of Realtime OS To use the Task Trace window you must set the following information concerning the real time OS the target real time OS which are used by the downloaded program e Label name address value of the execution task ID storage area and its size e Task start address expression Open the Task Trace window Select Menu View gt RTOS gt Task Trace When you select this menu at first time after starting PDxx the RTOS Information dialog is opened before the Task Trace window is opened RTOS Information PID Address RUNtsk v Access Size Byte v Task Entry D 70B ENT amp TaskID 1 0 default Cancel When using our real time OS MRxx Click the default button The MRxx information is set Click the OK button The Task Trace window is opened e When using a real time OS other than MRxx Specify the label address is also available of the execution task ID sto
164. ference the execution history statistical processing in the MR Analyze window The MR Analyze window functions together with the MR Trace window If the MR Trace window is not open or the MR Trace window does not show any data the MR Analyze window will not function The execution history statistical processing function allows you to reference the following topics 716 5 1 1 Refer the CPU Occupation State Click the Run Time button in the tool bar Or select Menu Run Timel The MR Analyze window changes to the CPU occupation state display mode FESTE Mark 00 00 00 000 335 00700 00164 498 00 00 00164 163 VEC table ID name Num Max Run Time Min Run Time Avg Run Time Total Run Time Ratios j0 25 50 75100 32 OFFDBO _ SYSCALLD 17 00 00 00 000 033 00 00 00 000 013 00 00 00 000 022 00 00 00 000 378 0 23 pr 33 OFFD84 SYSCALL1 5 00 00 00 000 020 00 00 00 000 019 00 00 00 000 019 00 00 00 000 099 0 06 38 OFFDSE SYSCALLZ 3 06 00 00 000 028 00 00 00 000 028 00700 00 000 028 60 00 00 000 084 0 05 hoot Idle 6 00 00 00 000 017 00700 00 000 002 00700 00 000 006 00 00 00 000 036 0 02 p 1 taski 11 00700 00 014 003 00 00 00 000 001 00 00 00 008 957 00 0000 098 528 60 02 gZ q i 2 task 3 00 00 00 013 003 00700 00 000 001 00700 00 008 669 00700 00 026 008 15 64 mm 3 4 tasks 2 00 00 00 013 006 00 0
165. field Normal Display 26 _task26 Display when in WAIT SUSPEND 26 task26 Is Display when in WAIT SUSPEND with time out 26 task26 tmol sl e Up to 8 characters can be displayed in the task name in the Mailbox Queue Wait field If a task name exceeds 8 characters the extra characters are omitted 199 7 14 8 Display the Data Queue Status In the MR window select Popup Menu Model gt Data Queuel mior AKM SF MI oa ES Dtgatr Dtent Dtgsz Data Queue Wait Data Queue Data TA_TFIFO TA_TFIFO TA_TFIFO TA_TPRI 0 0 0 0 0 0 0 0 Send 23 task23 24 task24 s 25 Receive 27 task27 28 task28 s Send 31 task31 32 task32 s 33 Receive 35 task35 36 task36 s 7 14 8 1 Display the Data Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 All the data queues defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of data queue Dtqatr Attribute of each date queue Dtent Number of messages in each data queue Dtqsz Maximum number of messages that can be contained in each data queue Data Queue Wait ID No and task name of tasks waiting for message transmission waiting or message reception waiting Data Queue D
166. g Selects whether to display char type as a string Zero suppress in Hex display Suppress zero in Hex display Sort Sort by Name Sort variables by its name Sort by Address Sort variables by its address RAM Monitor Enable RAM Monitor Switch enable or disable RAM monitor function Sampling Period Set RAM monitor sampling period Arrange a RAM monitor Arrange a RAM monitor area around this variable area around this variable Start Recording Start to record the updated values Stop Recording Stop recording the updated values Add New Tab Add new tab Remove Tab Remove the selected tab Copy Copy the selected item to the clipboard Copy All Copy the all items in the sheet to the clipboard Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 92 7 Windows Dialogs 7 4 Coverage Window The Coverage window allows you to reference the coverage measurement result of the functions of the target program downloaded The coverage which can be measured is CO coverage Two types of windows are provided the Coverage window in which you can check the start address end address of the functions and coverage measurement results and the Editor window in which you can check execution non execution by source line Toolbar For All Files Tr
167. g a user program at the source level Double click tutorial c under C source file A Editor Source window opens and the contents of a Tutorial c file are displayed Tutorial EI E Tutorial E Assembly source file L nert0 a30 a source file 15 L sorte 16 Tutor ial c 17 2 Download modules 18 F421A T Tutorialx30 00000000 n Be Dependencies 21 F4221 E ne define inc 99 F4223 sect30 inc 23 sorth 24 25 F4224 26 2 28 29 30 F4227 31 F4231 32 long stru void void a 10 ct Sample st mainfvoid while 1 1 tutorial tutorial void long j int i struct Sample far p_sam p_sam amp st init p_sam forg i 0 i lt 10 i M or Tutorialc Select the Format Views option from the Setup menu to set a font and size that are legible if necessary Initially the Editor Source window shows the start of the user program but the user can use the scroll bar to scroll through the user program and look at the other statements 65 6 2 4 Step4 Setting a Breakpoint A software breakpoint is a basic debugging function The Editor Source window provides a very simple way of setting a software breakpoint at any point in a program 6 2 4 1 Setting a Software Breakpoint For example to set a software breakpoint at the sort function call Double click the
168. ged by a drag and drop operation e The watchpoint expressions sizes radixes and datas can be changed by in place editing ATTENTION e The RAM monitor obtains the data accessed through the bus Any change other than the access from the target program will not be reflected e Ifthe display data length of the RAM monitor area is not 1 byte the data s access attribute to the memory may varies in units of 1 byte In such a case that the access attribute is not unified within a set of data the data s access attribute cannot be displayed correctly In this case the background colors the access attribute color of the first byte of the data 88 7 Windows Dialogs 7 2 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Add Add watchpoint Add Bit Add bit lebel watchpoint Remove Remove the selected watchpoint Remove All Remove all watchpoints Set Set new data to selected watchpoint Radix Bin Display in Binary Dec Display in Decimal Hex Display in Hexadecimal Refresh Refresh memory data Layout Address Area Switch display or non display of Address area Size Area Switch display or non display of Size area RAM Monitor Enable RAM Monitor Switch enable or disable RAM moniter function Sampling Period Set RAM monitor sampling period Toolbar display Display toolbar Customize
169. gs are connected on the same network only the first emulator detected is displayed e The emulators which have had an IP address already set cannot be detected by SETIP In such a case connect to the emulator through another communication interface and re register the IP address from the Init dialog box that appears For details on how to set IP addresses from the Init dialog box see 5 2 3Setting of the LAN Interface 17 3 3 3 LAN communication 2 Please exexute registry setting program Sack exe before starting the debugger It is necessary for LAN communication with emulators to set the following registry OS Key Data Windows XP 2000 HKEY LOCAL MACHINEYS O REG DWORD YSTEM CurrentControlSet Services Tcpip Parameters SackOpts You can clear the registry with executing the program UnSack exe The above programs are installed in the directory where this debugger is installed ATTENTION Make sure Sack exe and UnSack exe is executed by one who is authorized as an Administrator No one but the user who has the authority of an Administrator can install the device driver Note Windows XP 2000 TCP supports Selective Acknowledgments SACK as documented in RFC 2018 SACK gives higher performance in the network which have high bandwidth and long round trip delays like satellite channels SACK support is enabled by default in Windows XP 2000 It is necessary for LAN communication with emulators by
170. h the debugger e When selecting AUTO the debugger detect the LPT interface at the start and select a mode possible to use which give better performance automatically In some PC the debugger cannot detect the most suitable mode Check the mode which the LPT interface in the PC have and select it from Nibble Byte ECP or EPP if cannot e Start the BIOS setup program of the PC for checking the mode possible to use How to start and use the BIOS setup program depends on each PC so refer the manuals of the PC Display of BIOS Setup Communication Mode SPP Standard Parallel Port Output Only Nibble Bidirectional Bi directional Byte ECP Extended Capabilities Port ECP EPP Enhanced Parallel Port EPP The address displayed in the parallel port base address field is the I O address Specify the I O address set in the BIOS setup program in the I O Address field The following addresses are possible to be specified e 378h e 278h 46 5 Setup the Debugger 5 2 3 Setting of the LAN Interface LAN communication uses a LAN interface of the personal computer Before using LAN you must register the emulator IP address port number and subnet mask to the emulator itself Otherwise LAN is not available Then set LAN communication LAN communication can only be used on the PC4701U HS emulator It is necessary for LAN communication with emulators to set the registry For details see 3 3 Setting befo
171. he Go button on the toolbar The program goes into an endless loop To force a break in execution select Halt Program from the Debug menu or the Halt button on the toolbar TT 6 2 12 Step12 Displaying Local Variables The user can display local variables in a function using the C Watch window If the downloaded program is the program generated by the assembler package for 740 family you can not watch variables in C watch window 6 2 12 1 Displaying Local Variables For example we will examine the local variables in the tutorial function which declares three local variables i j and p sam Select C Watch from the Symbol submenu of the View menu The C Watch window is displayed By default C watch window has four tabs as following e Watch tab Only the variable which the user registered is displayed e Local tab All the local variables that can be referred to by the scope in which the the PC exists are displayed If a scope is changed by program execution the contents of the Local tab will also change e File Local tab All the file local variables of the file scope in which the PC exists are displayed If a file scope is changed by program execution the contents of the File Local tab will also change e Global tab All the global variables currently used by the downloaded program are displayed Please choose the Local tab when you display a local variable Watch Local File Loc
172. he line after the endi statement e if statements can be nested up to 32 levels 246 9 Writing Script Files 9 1 4 Loop Statement 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 e If the expression is t rue the group of statements is repeated If false the loop is exited and the statement following the endw statement is executed e You can nest while statements up to 32 levels e Use the break statement to forcibly exit a while loop If while statements are nested break exits from the inner most loop 9 1 5 Comment statements You can include comments in a script file Use the following format character string e Write the statement after a semicolon You can include only spaces and tabs in front of the semicolon e Lines with comment statements are ignored when the script file is executed 247 9 2 Writing Expressions This debugger allows you to use expressions for specifying addresses data and number of passes etc The following shows example commands using expressions gt DumpByte TABLE1 gt DumpByte TABLE1 20 You can use the following elements in expressions e Constants e Symbols and labels e Macro variables e Register variables e Memory variables e Line Nos e Character constants e Operators 9 2
173. he PAUSE state temporarily The task is executed immediately before the cursor and then it gets paused again ATTENTION When executing Come pause be sure to specify the cursor position at a position where the target task is passing during execution If the cursor is set not at the position described above but at an inappropriate position the system does not operate normally and in some cases the command process may never terminate Because the debugger has no means to judge whether the cursor position is correct or not and it merely continues waiting until the target task executes the cursor position If this happens click the Stop button in the following dialog which appears during execution of Come pause to stop the command processing 227 7 17 3 3 Turn Pause of Certain Task Off VME ARV Selected Task 6 task006 ID name Pause Line PAU Source Ot dt main 00354 jvoid taskO06 Z task002 00355 3 tasko03 00356 T VER pk ver 4 task004 00357 int i 5 task005 00358 Pause PC O0F1FA6H HYSYS while 1 7 task007 8 task008 g taskongj 00360 for i 0 i lt 10 00361 EE 00362 10 task010 00363 rot rdg l 11 task0iij 00364 12 _task012 00365 13 _task013 00366 jvoid task007 4 task0i4j 00367 15 _task015 00368 T VER pk ver 1
174. he amount of time by the millisecond remaining before the alarm handler s activation time Status Activity status of alarm handler e The following are displayed in the Status area TALM STA Alarm handler is in an operational state TALM STP Alarm handler is in a non operational state 204 7 Windows Dialogs 7 14 11 Display the Memory Pool Status In the MR window select Popup Menu Mode gt Memory Pooll MR wi Oreg TEG A o a ID BaseAddr Blk size Total Blk cnt Free Blk cnt map F 1 F 2 F 3 V 1 1 1 2 1 3 1 4 00078624 0008F2H 000956H 0018B6H 00000014 00000014 001496H 80 10 10 1111111110 30 15 1111111111111110 24 1 56 0 120 0 248 6 7 14 11 1 Display the Memory Pool Status When the realtime OS is MRxx conformed to ulTRON specifications V 3 0 All the memory pools defined in the configuration are listed in the order of ID number The fixed length data comes first and the optional length data comes after the fixed length data The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of memory pool BaseAddr Base address of memory pool Blk Size Block size of memory pool Total Blk_cnt Tot al block count of memory pool Free Blk_cnt map Number of unused blocks and information on unused memory blocks bit information
175. he markers is displayed in the status bar Note Definition of time value in the MR Trace window The time value in the MR Trace window indicates the execution elapsed time which sets the program execution start point to 0 in all the cases On the contrary a numeric value above the grid line scale in the MR Trace window is a relative value which sets the start marker to 0 the grid interval is specified in the Value dialog which has nothing to do with the time value It is provided so that you can see the window easily 7 15 2 5 1 Move the Marker Each marker can be moved by dragging When moving the mouse on the marker the cursor shape changes Then start dragging The start marker moves into the window left portion by clicking the Start Marker button in the tool bar Or select Menu Start Marker The end marker moves into the window right portion by clicking the End Marker button Or select Menu End Marker The indicator moves into the window center by clicking the Indicator button Or select Menu Indicator The other markers can move only to the specified positions listed below e Position to which the interrupt processing or task execution transits e Position to which the task state transits e Position where the system call issuance history is displayed 217 7 16 MR Analyze Window The MR Analyze window displays the result of the measurement data statistically analyzed within the rang
176. here to bring up a dialog box to search for addresses 3 Bus information display area The content displayed here differs depending on the MCU or simulator system used Refer to 7 11 6 Display of bus information on the M32C Debugger Refer to 7 11 7 Display of bus information on the M16C R8C Debugger Refer to 7 11 8 Display of bus information on the 740 Debugger 4 Time information display area Shows time information of trace measurement result One of the following three modes can be selected from the menu Absolute Time Shows an elapsed time from the time the program started running up to now in terms of absolute time default Differences Shows a differential time from the immediately preceding cycle Relative Time Shows a relative time from the selected cycle Note however that this mode changes to the absolute time display mode when the trace measurement result is updated 5 Acquired range of trace measurement result Shows the currently acquired range of trace measurement result Trace measurement range Shows the currently set range of trace measurement First line cycle Shows the cycle of the first line displayed First line address Shows the address of the first line displayed First line time First line time Shows the time information of the first line displayed 10 Window splitting box Double clicking this box splits the window into parts oon In addition to bus information the window can display disassemble
177. hich addresses are not executed yet By using the coverage measurement function in the test process you can check for missing test items 1 5 1 Coverage Measurement Area The coverage measurement area is any continuous 256 KB area starting from the 64 KB boundary The starting address is called coverage base address The coverage base address immediately after starting the emulator is set to Oh Base Address 0C0000h 000000h Base Address 000000h 000000h O3FFFFh 0C0000 OFFFFFh OFFFFF 1 5 2 Related Windows Refer to the coverage measurement result in the following windows e Editor Source Window e Memory Window e Coverage Window 1 6 Real Time OS Debugging Function This function debugs the realtime OS dependent parts of the target program that uses the realtime OS This function helps to show the status of the realtime OS and inspect a task execution history etc The debugger for 740 can t show the status of the realtime OS 1 7 GUI Input Qutput Function This function simulates the user target system s key input panel buttons and output panel on a window Buttons can be used for the input panel and labels strings and LEDs can be used for the output panel 10 2 About the Emulator PC4701 2 About the Emulator PC4701 The PC4701 emulator system is a generic term used for the 8 16 bit MCU emulators It can be used in combination with the emulation pod for the PC4701 to debug applica
178. hore queue 196 7 Windows Dialogs e The following are displayed in the Sematr area TA TFIFO Task wait queue is in FIFO order TA TPRI Task wait queue is in task priority order e When a task connected to the SEM queue is in the state of waiting with timeout enabled waiting in twai sem a string tmol which indicates a state of waiting with timeout enabled is appended to a string displayed in the Semaphore Queue field When a task connected to the SEM queue is in the state of forced waiting double waiting a string s which indicates double waiting is appended to a string displayed in the Semaphore Queue field Normal Display 26 task26 Display when in WAIT SUSPEND 26 task26 s Display when in WAIT SUSPEND with time out 26 task26 tmol sl e Up to 8 characters can be displayed in the task name in the Semaphore Queue field If a task name exceeds 8 characters the extra characters are omitted 197 7 14 7 Display the Mailbox Status In the MR window select Popup Menu Model gt Mailbox MR x w OPi o SUDA o aa S ID Msg_cnt MAXmsg WaitQueue Message 0000H OO0AH 0002H 0014H 0000H OO0AH 0000H 003CH 0000H 0022H 0000H OOOFH 0000H 0028H Task 12 _task12 Msg 0033H 0055H Task 13 _task13 s 7 14 7 1 Display the Mailbox Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 All the mail boxes d
179. ial OF4276 F main I OF421E The upper figure shows that the position of the program counter is currently at the selected line of the sort0 function and that the sort0 function is called from the tutorial0 function 79 6 2 14 What Next This tutorial has described the usage of this debugger Sophisticated debugging can be carried out by using the emulation functions that the emulator offers This provides for effective investigation of hardware and software problems by accurately isolating and identifying the conditions under which such problems arise 80 Reference Blank Page 82 7 Windows Dialogs 7 Windows Dialogs The window of this debugger is shown below When the window name is clicked the reference is displayed Window Name View Menu RAM Monitor Window View gt CPU gt RamMonitor ASM Watch Window View gt Symboll gt ASMWatchl C Watch Window iew gt Symbol gt CWatch Coverage Window iew gt Codel gt Coverage Script Window iew gt Script S W Break Point Setting Window iew gt Break gt S W Break Points H W Break Point Setting Window iew gt Break gt H W Break Points Protect Window iew gt Break gt Protect Trace Point Setting Window iew gt Trace gt Trace Points Time Measurement Window iew gt Trace gt Time Measure Trace Window iew gt Tracel gt Trace Data Trace Window iew g
180. icator cycle Time at makers Grid interval Scale Data Trace union tag struct tag Bit bit unsigned char bO bit b0 unsigned char b0 bit bl unsigned char b0 bit b2 unsigned char b0 bit b3 signed char 4 b0 bit b4 7 unrsigned char b0 all b0 Ibitj b2 Data Reference Indicator Markers Access history reference area e In the data reference area you can inspect memory values at the point of a cycle currently in interest or the values of registered C variables e In the access history reference area you can see the history of accesses to registered addresses in chart form e In conjunction with the Trace Window you can inspect memory values at the point of a cycle you are watching in the Trace Window Conversely you can show the cycle in the Trace Window which you are watching in the Data Trace Window 181 7 12 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Analyze Trace Data Analyze the realtime trace data Set Cycle Specify the display cycle Sync with Trace Window Synchronize with Trace Window Data Length lbyte Display in 1Byte unit 2bytes Display in 2Byte unit Abytes Display in 4Byte unit Radix Hex Display in Hexadecimal Dec Display in Decimal Address Display from specified addr
181. ics 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 xtENESAS C 7 D me on lt D D M32C PC4701 Emulator Debugger V 1 03 User s Manual Renesas Microcomputer Development Environment System R Electroni enesas Electronics Rev 1 00 2007 07 www renesas com 10 11 12 13 Notes regarding these materials This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use Renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of Renesas or any third party with respect to the information in this document Renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of the use of any information in this document including but not limited to product data diagrams charts programs algorithms and application circuit examples You should not use the products or the technology described in this document for the purpose of military applications such as the dev
182. idu ga Win he Bouck cube th van a rie 12 1 1 File operation on Windows arannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnennnnnnnnnenennnnnensnensnnnnnnnenes 12 1 2 Area where software breakpoint can be set cc cccccccecsessscecececsesesssceeececeessnseseeeeeceees 12 4 3 Getor set UC variables runie n e e wa eesti een vein eee eee 12 1 4 Function name in CR e ipoe eea E EE e EE EEEE PEET EEr LEN CEEE REEVE EEr PEER Erisa 12 1 5 Option settings for download MOdules cccccccccccessesssseceeececeessaeceeceecsessaseeeeceeseees 12 1 6 Debugging multi modules rorrrnrnrrronrrnrnnnvnrrrrrenennr 12 1 7 Synchronized debugging 12 1 8 Down load of Firmware 0 12 1 9 Restriction of LPT port 12 1 10 Notes for coverage function 12 1 11 Emulator reset switch rrnrnrnrorrnrnnrnrnvnrrrerrn 12 1 12 Debugging Resource on Emulator 12 2 Attention of the M82C Debugger rrrrrrnnnnrvrnrnrseensnnrnrnenssennennrnnnenssersennrnnnenssrssensnnrsensssssensnnnsen 12 2 1 Stack area used by the emulator rrrerrrrronnrnrrrnrrrrrennnnrrrnrnnnrenannrrnnsrnsrenannrrnnsnssrensnnnsen 268 12 2 2 Interrupt stack pointer when resetting the target program ccsseesesesesesesenenens 268 12 2 3 Option of C Compiler Assembler Linker c cccccccecsesssceeececeesessscecececeessstsceeeeeeeenes 268 12 2 4 Target MCU HOLD terminal ororeroroorronnnnrrrnrrrrrennnnrrnn
183. indows Dialogs B T Representation Status CPU OPC OPR Operation code size Operand size No accessing CPU 0 1 Obyte lbyte CPU 0 2 Obyte 2bytes CPU 0 3 Obyte 3bytes CPU 1 0 lbyte Obyte CPU 1 1 lbyte lbyte CPU 1 2 1byte 2bytes CPU 1 3 lbyte 3bytes CPU 2 0 2bytes Obyte CPU 2 1 2bytes lbyte CPU 2 2 2bytes 2bytes CPU 3 0 3bytes Obyte CPU 3 1 3bytes lbyte DMA DMA accessing DMAT DMA accessing terminal count Shows the level of the external break trigger the EXTIN7 pin of the external trace signal input cable High level 1 Low level 0 Q T Shows the level of the external trace trigger the EXTING pin of the external trace signal input cable High level 1 Low level 0 76543210 Shows the status of the 8 bit external signal pins EXTINO to EXTIN7 of the external trace signal input cable High level 1 Low level 0 h m s ms us Show the elapsed time from the target program beginning 177 7 11 7 Display of bus information on the M16C R8C Debugger From left to right the contents are as follows Address The status of the address bus Data The status of the data bus BUS The width of the external data bus 8b for an 8 bit data bus and 16b for a 16 bit data bus BIU This shows the status between the BIU bus interface unit and memory and BIU and I O Display format Status
184. ion 2 Measure the execution time of the specified function In this mode the function address range is automatically registered to the measurement start event The measurement result does not contain the execution time of other function called within the specified function Specify the following in the Measurement Condition Designation dialog Select this mode Set Mesurement Point MP1 Measurement Point Setting Mode Start Function l Specify the function name Select the start event ATTENTION When the target function calls the other functions the first measurement finishes at the first calling the other function and the second measurement begins at the returning to the target function from the first one 169 7 11 Trace Window The Trace Window is used to display the results of real time trace measurement e Bus mode This mode allows you to inspect cycle by cycle bus information The display content depends on the MCU and simulator system used In addition to bus information this mode allows disassemble source line or data access information to be displayed in combination e Disassemble mode This mode allows you to inspect the executed instructions In addition to disassemble information this mode allows source line or data access information to be displayed in combination e Data access mode This mode allows you to inspect the data read write cycles In addition to data access
185. ion of source lines OverStepInstruaction OI Overstep execution of instructions 243 Path a Sets and checks the search path Pause 5 Waits for user input Print i Check value of specified C variable expression Protect PT Sets and checks protect breaks Radix Sets and checks the radix for numerical input Register R Checks and sets a register value Reload Re downloads the target program Reset i Resets the target MCU Return RET Executes a source line return ReturnInstruction RETI Executes an instruction return Scope Sets and checks the effective local symbol scope Script 4 Opens and executes a script file Section SEC Checks section information Set Set specified data in specified C variable expression SetMemoryByte MB Checks and changes memory contents in 1 byte units SetMemoryLword ML Checks and changes memory contents in 4 byte units SetMemoryWord MW Checks and changes memory contents in 2 byte units Sleep Halts for user input until the specified time has elapsed SoftwareBreak SB Sets and checks software breaks SoftwareBreakClear SBC Clears software breaks SoftwareBreakClearAll SBCA Clears software breaks SoftwareBreakDisable SBD Disables software breakpoints SoftwareBreakDisableAll SBDA Disables all software breaks SoftwareBreak Enable SBE Enables software breakpoint
186. is a char 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 C expression is an array type as same as pointer type a is display to the left of the type name You can see the elements of the array by using this indicating for the details refer 10 2 3 Pointer Types When the number of the array elements is more than 100 the following dialog box open Specify the number of the elements in the dialog box Please set array area Start 0 End fi 023 Cancel 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 10 2 5 Function Types e When the result of calculation is a function type the starting address is displayed in hex as follows void main 0xF000 all Radices 10 2 6 Reference Types e When the result of calculation is a reference type the reference address is displayed in hex as follows signed
187. it is rounded off to the nearest address value in 0x10 byte units before being set 7 1 2 1 Changing the RAM Monitor Area The start address of the RAM monitor area can be changed Specify the start address of the RAM monitor area in the Start field of the Set RRAM Area dialog box No values can be entered in the Size field 87 7 2 ASM Watch Window The ASM watch window is a window in which you can register specific addresses as watchpoints and inspect memory contents at those addresses If a registered address resides within the RAM monitor area the memory content at that address is updated at given intervals by default every 100 ms during program execution Toolbar s ASMWatch 080000 RUNt sk 080655 BufTsk7 1 084620 Dbe_cnt O108CB 4 Dbz_mode2 Address Bit No Expression Radix e The addresses to be registered are called the watchpoints One of the following can be registered Address can be specified using a symbol Address Bit number Bit symbol e The registered watchpoints are saved in the debugger when the ASM watch window is closed and are automatically registered when the window is reopened e If symbols or bit symbols are specified for the watchpoints the watchpoint addresses are recalculated when downloading the target program e The invalid watchpoints are marked by lt not active gt when displayed on the screen e The order in which the watchpoints are listed can be chan
188. l Set Event Status DATA ACCESS Not Specify H po po o WRITE I Mask 122 7 Windows Dialogs 7 7 6 2 Memory Access The debugger for M16C R8C 7 7 6 2 1 Writing Reading a Specified Address Set as below Example Writing to even address 400h Al Set Event Status Event Type DATA ACCESS v Address Data Setting Ranee dan Address ddress1 joo Jal Address2 000000 v Bl Function Source File v Function 7 ACCESS WRITE ADDRESS 000400 GONDITION addr 000400 omei Al Set Event Status Event Type DATA ACCESS v Address Data Setting Range Not Specify 7 Data 1 pooo Data 2 5000 Access WRITE z IT Mask 0000 ACCESS WRITE ADDRESS 000400 CONDITION faddr 000400 canes 123 Example Writing byte length data 32h to even address 400h l Set Event Status DATA ACCESS faddr Address1 v pooo Ba d Al Set Event Status DATA ACCESS vi posz po ooo WRITE A m 124 7 Windows Dialogs Example Writing byte length data 32h to odd address 401h Contents of settings vary with each product and bus width 8 bits bus width Al Set Event Status DATA ACCESS vi addr Address1 E jo l Al Set Event Status DATA ACCESS fm po WRITE m 125 16 bits bus width Al Set Event Status DATA A
189. le you uses don t match with the version of MRxx 185 7 14 1 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Mode Task Displays Task status Ready Queue Displays Ready status Timeout Queue Displays Timeout status Event Flag Displays Event Flag status Semaphore Displays Semaphore status Mailbox Displays Mailbox status Data Queue Displays Data Queue status Cyclic Handler Displays Cyclic Handler status Alarm Handler Displays Alarm Handler status Memory Pool Displays Memory Pool status Message Buffer Displays Message Buffer status Port Displays Port status Mailbox with Priority Displays Mailbox with Priority status Context Displays Context Layout Status Bar Switch display or non display of status bar Refresh Refresh memory data RAM Monitor Enable RAM Monitor Switch enable or disable RAM Monitor function Sampling Period Set RAM Monitor sampling period Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 186 7 Windows Dialogs 7 14 2 Display the Task Status In the MR window select Popup Menu Model gt Task MR Fi wiOPr AmwOD0eoHO lt O HES Current Run Task 1 main ID Stazddr name Pri Status wup count
190. m 0000H 1000H OF1C66H alarml OOOOH ABCDH OF1C72H alarm OOODH 0013H OF1C6AH alarm3 OOcDH 00039 OF1C6CH _alarm4 OOEDH 0003H OF1C6EH _alarm5 OOCDH OAA3H When the realtime OS is MRxx conformed to uITRON specifications V 3 0 the following data is displayed in the status bar Remain Handler Now System Clock Count 0000H 0000H018AH 7 14 10 1 Display the Alarm Handler Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Of all the cycle start handlers defined in the configuration only those which are not started yet at present are listed in the ascending order of start time The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of alarm handler StaAddr Starting address of alarm handler name Name of alarm handler AlarmTime Starting time of alarm handler 7 14 10 2 Display the Alarm Handler Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Of all the cycle start handlers defined in the configuration only those which are not started yet at present are listed in the ascending order of start time The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents ID ID No of alarm handler Name Name of alarm handler Almtim T
191. manner as the operation in the Source window 224 7 Windows Dialogs 7 17 3 Pause the Specified Task Use the MR Task Pause window To open the MR Task Pause window select Menu View gt RTOS gt MR Task Pausel s t MR Task Pause DEMO C Selected Task 5 task5 ID name Pause SEU El V PAU Source D AHCB TIM Lj task2 Pause PC 0FOF2BH task3 task4 in BSS Sa task6 task l tasks task9 task10 mik akn an oid task5 koid task6 ii int i 5000 while 1 I i f int i 6000 while 1 i 1 Click the ID field or name field in the task pause display field of the task line to be paused After the target task is selected the task ID number is displayed in the status bar 2 Ifthe selected task is in a state other than Pause the Pause button is enabled Click the Pause button The task selected at this timing is paused This is enabled only when the selected task is in the execution state ATTENTION You can pause the target task which is in the execution state only If target task is in a state other than execution the pause process is terminated while the target task is not being paused If this happens an error dialog appears If the timing at which the target task enters the execution state is hard to judge use the task C
192. mation is displayed in the status bar e Time value at which start marker is positioned e Time value at which end marker is positioned e Time width of a range indicated by start and end markers e Time value at which indicator is positioned e Scale factor of display e Time width of grid line interval e Range of measurement trace result The grid lines are displayed using the start marker as the radix point The grid lines are displayed using the start marker as the radix point The scale is displayed using the time at which the start marker is positioned as 0 with the left forward in time set to minus and the right backward in time set to plus The grid lines allow you to roughly understand the interrupt occurrence cycle and process time The interval time width of the displayed grid lines appears in the Grid area of the status bar The time value in the MR Trace window means the execution elapsed time using the program execution start time as 0 in all the cases On the contrary the numeric value above the grid lines scale in the MR Trace window is a relative value using the start marker as 0 the grid interval is specified in the Value dialog It has nothing to do with the time value This is provided so that you can see the window easily Note The software interrupt number 1 is different according to product For details about which interrupt number is assigned to which system call refer to the MRxx Reference Manual
193. me 12 1 7 Synchronized debugging Synchronized debugging function is not available 12 1 8 Down load of Firmware To start the debugger a firmware corresponding to the connected emulation pod or emulation probe must be downloaded to the emulator e The emulation pod or emulation probe has been changed e A unknown firmware is downloaded to the emulator e The debugger is used for the first time e The debugger has been upgraded In one of the above cases you must perform the following operation before starting the debugger Press the emulator system reset switch within 2 seconds after turning ON the emulator power switch Then the emulator enters a mode in which the firmware is forced to be downloaded 265 12 1 9 Restriction of LPT port 1 The emulator uses a printer parallel port during LPT communications with personal computer The IAR C compiler also uses this printer parallel port When using the personal computer and the emulator during LPT communications a problem arises that you cannot compile a program using the IAR C compiler If this happens you must take either of the countermeasures listed below Connect the personal computer to the emulator in any mode other than the ECP mode Start compiling the program after the debugger is terminated 2 When you debug programs using the LPT parallel interface on the host PC running Windows XP the following symptoms may appear The debugger becomes frozen The
194. menu by right clicking on the window The Value dialog is opened Specify the time interval in the display Value Grid Time fo h fo m fo s fam ms fo us Rate Expand fi 500000 Reduce fi 500000 ment 718 2 2 3 Change the task display order Select Color from popup menu by right clicking on the window The Color dialog is opened Click the button corresponding to the desired item The Color Setting dialog is opened Change the display color in the dialog 235 7 18 2 3 Measure the Execution Time of Task By changing the start marker position and end marker position in the Task Trace window you can measure the execution time between the markers s t Task Trace HAD Har y Mark 00 00 00190 802 00 00 00 784 555 00 00 00 593 752 Indicator 00 00 01 472 055 Scale 5 600414 Grid 00 00 01 ID name 1 UD AHCBIENDI 1 f mmnmmmmmmmmmmmmmmmmmmmmmmmm Mos 1 1 j d M _task3 M 4 m m M RE _task4j ly 4 4 MB i 4 4 0m 0 4 _task5 M m L Mm 1 mm L Mm 1 i i i 5 i 4 m 4 m 4 task p M 1 Me f
195. n the window In that case the background color shows the access attribute of the first byte of the data 001B 0008 00D2 0000 007C 0000 0000 0000 0000 0000 0000 Mo 0000 0000 0000 0000 0000 0050 0000 The displayed access attributes are initialized by downloading the target program The interval time at which intervals the display is updated may be longer than the specified interval depending on the operating condition shown below Host machine performance load condition Communication interface Window size memory display range or the number of windows displayed 85 7 1 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function RAM Monitor Area Set RAM monitor base address Sampling Period Set RAM monitor sampling period Clear Clear access attribute Up Moves display position to the immediately preceding RAM monitor area smaller address Down Moves display position to the immediately following RAM monitor area larger address Address Display from specified address Scroll Area Specify scroll range Data Length lbyte Display in 1Byte unit 2bytes Display in 2Byte unit Abytes Display in 4Byte unit 8bytes Display in 8Byte unit Radix Hex Display in Hexadecimal Dec Display in Decimal Single Dec Display in Signed Decimal Oct Display in Octdecimal
196. nding on the operating environment Sampling cycle depends on the following environments e Communication interface e Number of the RAM Monitor windows displayed e Size of the RAM Monitor window displayed e Number of ASM watch points within the RAM monitor area of the ASM Watch window e Number of C watch points within the RAM monitor area of the C Watch window 1 1 3 Related Windows The window where the function of the real time RAM monitor function can be used is shown below e RAM Monitor Window e ASM Watch Window e C Watch Window 1 Features 1 2 Break Functions 1 2 1 Software Breaks Function Software Break breaks the target program before execution of the command at the specified address This break point is called software breakpoint The software breakpoint is set reset in the Editor Source window or in the S W Breakpoint Setting window You can also disable enable a software breakpoint temporarily You can specify up to 64 software breakpoints When specifying two or more software breakpoints the breakpoint combination is based on the OR logic Arrival to any one of breakpoints breaks the target program 1 2 1 1 Setting of software breakpoint The software breakpoint can be set by the following windows e Editor Source Window e S W Break Point Setting Window You can double click the mouse to set reset the software breakpoint in the Editor Source window You can also switch to temporarily disable enable the
197. nds on the microcomputer For a microcomputer which sets the stack page selection bit initial value to 0 the allowable designation range is a 0 page address range 0h to FFh For a microcomputer which sets the stack page selection bit initial value to 1 the allowable designation range is a 1 page address range 100h to 1FFh 2POD number Pod Name POD No Firmware File Correspondence MCU M38000T FPD 0 M38000 7200 7450 7470 38000 M38000TL FPD 7500Series 7507 7510 7515 7520 Group 4 M38000TL2 FPD M37207T RPD 80 M38000 M37102 M37201 M37202 M37204 M37207 M37515T RPD 40 M38000 7515 3850 3851 Group M37610T RPD 2 M37600 7610 Group M37640T RPD 4 M37600 7640 Group M37690T RPD 1 M37600 7690 Group M38749T RPD 40 M38000 3874Group 4MCU where emulator MCU does not exist is excluded Target firmware name Omit u s h s or l s which mean types of emulators 3MCU Information No Please describe the MCU information No referring to the following tables MCU Name MCU Information No M3753x M3754x 01 M376xx 02 Others 00 57 ATTENTION For a new MCU new POD number new firmware name and new MCU information number may be used 5 6 2 1 Example 2 3B FF FFFC 0 M38000 00 58 Tutorial Blank Page 60 6 Tutorial 6 Tutorial 6 1 Introduction This section describes the main functions of this debugger by using a tu
198. ne_no source file name e Specify line Nos in decimal e 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 e If you omit the name of the source file the line Nos apply to the source file displayed in active Editor Source Window e Include the file attribute in the name of the source file e Do not include any spaces between the line No and name of the source file 251 9 2 7 Character constants The specified character or character string is converted into ASCII code and processed as a constant e Enclose characters in single quote marks e Enclose character strings in double quote marks e 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 4344h 9 2 8 Operators The table below lists the operators that you can use in expressions e 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 Operator Function Priority level 0 Brackets level 1 Kr Monadic positive monadic level 2 negative monadic logical NO
199. necting with an emulator 4 3 1 Connecting the Emulator Connect the emulator by simply switching the session file to one in which the setting for the emulator use has been registered The session file is created by default The session file has information about the target selected when a project was created In the circled list box in the following tool bars select the session name including the character string of the target to connect gt 8 2 Debug After the session name is selected the dialog box for setting the debugger is displayed and the emulator will be connected When the dialog box is not displayed select Connect from the Debug menu 4 3 2 Ending the Emulator The emulator can be exited by using the following methods 1 Selecting the Disconnect Select Disconnect from the Debug menu ie we 2 0 2 Selecting the DefaultSession Select the DefaultSession in the list box that was used at the time of emulator connection 3 Exiting the High performance Embedded Workshop Select Exit from the File menu High performance Embedded Workshop will be ended The message box that asks whether to save a session will be displayed when an emulator is exited If necessary to save it click the Yes button If not necessary click the No button 32 5 Setup the Debugger 5 Setup the Debugger 5 1 Init Dialog The Init dialog box is provided for setting the items that need to be set
200. ng Wait state slp Wait due to tslp tsk dly Wait due to dly_tsk flg Wait due to twai flg sem Wait due to twai sem mbx Wait due to trev mbx mpf Wait due to tget_mpf sdtq Wait due to tsnd_dtq rdtq Wait due to trev_dtq vsdtq Wait due to vtsnd_dtq vrdtq Wait due to vtrev_dtq e When a task connected to the timeout queue is in the state of forced waiting double waiting a string s which indicates double waiting is appended to a string displayed in the ID Name field Normal display 26 task26 Display when in WAIT SUSPEND 26 task26 sl 193 7 14 5 Display the Event Flag Status In the MR window select Popup Menu Model gt Event Flag MR x ERLT ELA EET eE ID flg_ptn flagg 0000H 8 tasks 0000H 0000H 9 _task9 s 0000H 0000H 0000H 0000H 7 14 5 1 Display the Event Flag Status When the realtime OS is MRxx conformed to uITRON specifications V 3 0 All the event flags defined in the configuration are listed in the order of ID number The function of each item is listed below When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents ID ID No of event flag flg ptn Bit pattern of each event flag flagQ Task ID Nos and task names in the event flag queue e When a task connected to the event flag queue is in the state of waiting with timeout enabled waiting in twai flg a string Itmol which indic
201. ng format The debugger for 740 can use instead of Product Name Register name The debugger for M32C PC USP ISP INTB FLB SVF SVP VCT DMDO0 DMD1 DCTO DCT1 DRCO DRC1 DMAO DMA1 DCAO DCA1 DRAO DRA1 ORO OR1 OR2 OR3 OAO OA1 OFB OSB lt Bank 0 Register 1R0 1R1 1R2 1R3 1A0 1A1 1FB 1SB lt Bank 1 Register The debugger for M16C R8C PC USP ISP SB INTB FLG ORO OR1 OR2 OR3 OAO OA1 OFB lt Bank 0 Register 1R0 1R1 1R2 1R3 1A0 1A1 1FB lt Bank 1 Register The debugger for 740 PC A X Y S PS Uppercase and lowercase letters are not unique in register names You can specify either 9 2 5 Memory variables Use memory variables to use memory values in expressions The format is as follows Address data size e You can specify expressions in addresses you can also specify memory variables e The data size is specified as shown in the following table The debugger for 740 doesn t support four byte length data Length Debugger Specification 1 Byte All Borb 2 Bytes The debugger for M32R Horh Other W or w 4 bytes The debugger for M32R W or w The debugger for M32R M16C R8C Lor Example Referencing the contents of memory at address 8000h in 2 bytes 0x8000 W e The default data size is word if not specified 9 2 6 Line Nos These are source file line Nos The format for line Nos is as follows line_no li
202. nnrnnnsnsssenene 204 7 14 11 Display the Memory Pool Status cccccccccccccssessceccceceesssssceeeeeeeesesssseeeeeesenensaaeeeeees 205 7 14 12 Display th Task Cont xtuumasuasaamesduneesarunsassstaeraratuer 207 7 15 MR Trace Wiidowuunseskkis eneeier ed ccvedinadetancaucsutsceecepevetetes 209 7 15 1 Fxtended Menus ree e aenn keine eneboer sed 211 7 15 2 Refer the Execution History of Task MRxx Window esvrvvrvvervrsververvrsvesveevsssesvresserr 212 TAG MR Analyze Window sssudruatkikkarsausarmuarak loskuetannertGulendkuidiee 218 7 16 1 Configuration of CPU Occupancy Status Display Mode rrrorrrnrnnrvrnrnrsrrnsnnrnrnvnssrennns 218 7 16 2 Configuration of Ready State Duration Display Mode rrrnnnrnrrnonnvnrrssnrverrnnrsrrsennnnnr 219 7 16 3 Configuration of System Call History Display Mode rorvrvrnrrnnronnrnrrrnsrrrsnnrnnnrnssrennns 219 7 16 4 Extended Menus Zrna Eine fete nea Meet avons 220 7 16 5 Analyze the Execution History of Task rrrnnrorvrnrorrrrnsnnrnrnrnrrrensnnrrnnsnrsnensnnrnnnenssnenene 220 TA MR Task Pause Window a aea eda usgeecaascseeaduatatecthacgeatexhovebten eddesseasetaadecseath 223 7 17 1 About Task Pause Function rrnnrororonvrrrroonnvrrrnnrrrsrsnnrrrrssnnvsrsnnrnrsrennrnrsssnnrsrssnrssssennnsnr 223 7 102 Extended Menusraasn su skulnakuskarn atenerne e an area ati 224 7 17 3 Pause the Specified Task ccccccccccccccsssscecccecsesessscesececscsesssseeeesceesesnsseseesesesensaaeeeeecs 225 TVS
203. nrnenannrnrnnnssrenennnnnnrnssnesennnnnsensnenen 49 5 2 5 Setting of the Serial Interface rrrrrrnnnnrnrnrnrrrrnannrnrnrnnrennennrnrnenssrnrennnnrvnnsnnssensnnrvnnensseee 49 5 3 Setup the Debugger for M32C rrrannnnrnrnrenenannrnrnrnsrrsrensnnrrnnssnsrensnnrnnnenssnenennrnnsenssensannnnnsensssnsennen 50 5 3 1 Em n Dialog savn skin arna ken CS a A kunne 50 5 4 Setup the Debugger for M16C R8C rrrrrennnorvrnrnrsrensnnrnrneresernennrnnnenssrenennrnrnensseerennrnnnensssesennrnnnven 54 5 41 M p Commandussisasssrdatvdtrsdraessavalbkoeeramk nee Shas 54 5 5 Setup the Debugger for TAO darreir neee ere E A AAEE EA EENEN Eh 55 5 51 Ma OO a dees a a a a iE 55 5 6 Method of making MCU file rrrrnnnrorvrrrorrrenannrvrnrnrrrerennrnnnenssnerennnnnsrnssrssensnnrvnnsnensensnnrnnnensseensnnsen 56 5 6 1 Method of making MCU file the M16C R8C Debugger rrrrravvrsrarvrsvasservrrssrvvrrvervenser 56 5 6 2 Method of making MCU file the 740 Debugger ccccccsssscssssssssssesesesesnssesencseseeeeeesees 57 Tutorial 59 6 Tutorial 61 6 1 Initroduetion usksdaaksasakenen atra bea saekee cousad es basaeded bean deadosoeted eesacaciene ebsuss Seen 61 O2 SACS sere 62 6 2 1 Step1 Starting the Debugger cccccccccssssssceeececsessnsscecececeeneeseeeeeceesenssaeceeeeeesensaaees 62 6 2 2 Step2 Checking the Operation of RAM c cccccccccssssscecececeesesseceeeeeceesenseaeeeeceeesensaaeas 63 6 2 3 Step3 Downloading the Tutorial
204. nsion Memory Expansion Mode e Microprocessor Microprocessor Mode 6811 2 Inspecting the MCU status Clicking this tab displays the status of each MCU pin It allows to check whether the MCU pin status matches the processor mode to be set R YE HOLD mm EE el If the slider is at the middle position it means that the value is indeterminate 5 3 1 2 Emulation Memory Tab The specified content becomes effective when the next being start 51 53 121 Debug monitor s bank address settings This product allocates a 64 Kbyte contiguous address area as the emulator s work area for use by the debug monitor Specify any bank that the target system does not use The debug monitor uses a 64 Kbyte area from the start address of the specified bank Example If the specified bank is FO then the debug monitor uses a 64 Kbyte area beginning with address FO00000h Debue Monitor Bank Address fo tis e The bank specified here cannot have its contents referenced or set The contents of this area when displayed in the Memory window or the Program Source window s disassemble display mode may not be correct e The following bank addresses cannot be specified MCU internal resources e g SFR and RAM areas DRAM area and multiplexed area Interrupt vector area 53 122 Automatic emulation memory allocation for the internal ROM When single chip or memory extension mode is selected emulation memory is automatically allocated to
205. ntents Register R Checks and sets a register value 8 1 4 Memory Operation Commands Command Name Short Name Contents DumpByte DB Displays the contents of memory in 1 byte units DumpWord DW Displays the contents of memory in 2 byte units DumpLword DL Displays the contents of memory in 4 byte units SetMemoryByte MB Checks and changes memory contents in 1 byte units SetMemoryWord MW Checks and changes memory contents in 2 byte units SetMemoryLword ML Checks and changes memory contents in 4 byte units FillByte FB Fills a memory block with the specified data in 1 byte units FillWord FW Fills a memory block with the specified data in 2 byte units FillLword FL Fills a memory block with the specified data in 4 byte units Move Moves memory blocks MoveWord MOVEW Moves memory blocksGn 2 byte units 8 1 5 Assemble Disassemble Commands Command Name Short Name Contents Assemble A Line by line assembly DisAssemble DA Disassembles memory contents line by line Module MOD Displays modules names Scope Sets and checks the effective local symbol scope Section SEC Checks section information Bit Checks and sets bit symbols Symbol SYM Checks assembler symbols Label Checks assembler labels Express EXP Displays an assembler expression 8 1 6 Software Break Setting Commands
206. o the window center by clicking the Indicator button Or select Indicator from popup menu Note that each marker can move only to the point where an event is established 236 7 Windows Dialogs 7 19 Task Analyze Window The Task Analyze window displays the result of the measurement data statistically analyzed within the range specified by the start marker and the end marker in the Task Trace window The Task Analyze window displays the CPU occupation state The Task Analyze window functions together with the Task Trace window This window is available even when a target program using an OS other than our real time OS MRxx is downloaded The CPU occupation state display mode is used to display the CPU occupation time and ratio by task This mode shows the statistical result within the range specified by the start marker and end marker in the Task Trace window Mark 00 00 00 000 672 00 00 01 569 272 00 00 01 568 600 ID name Hun Max Run Time Hin Run Time Avg Run Time Total Run Time Ratios 10 25 50 75100 U J 1 00700 00 005 195 00700 00 005 195 00700 00 005 195 00 00 00 005 195 0 33 H H 1 mainj 115 00700 00 007 305 00700 00 000 767 00700 00 001 541 00700 00 177 287 11 30 i i 2 task002 12 00700 00 012 067 00700 00 006 915 00700 00 011 552 00700 00 138 630 6 64 3 task003 12 00700 00 012 597 00 00 00 0
207. ome pause a function to pause only the specific task at specified position 225 7 17 3 1 Pause Task Being Executed at a Specified Position w MR Task Pause DEMO C sn E BRV Selected Task 6 task006 ID name Pause Source main task002 task003 task004 taskO005 task006 taskO007 task009 taskO010 task0ll task012 13 _ task013 14 task014 15 task015 16 taskO016 17 task017 18 task018 19 task019 20 task020 21 task021 1 Zz 3 4 3 6 7 8 task008 9 10 at 12 void task006 T VER pk ver E int i while 1 for i 0 i lt 10 get ver 5 rot_rdq 1 fvoid task007 T_VER pk_ver int i while 1 for i 0 i lt 10 get ver 5 v ar 1 Click the ID field or name field of the task pause display field of the task line to be paused After the target task is selected the task ID number appears in the status bar In the task source display area the program starting from the task start address is displayed if the program is in a state other than Pause 2 Click the line to be paused in the task source display area The Come pause button and Pause button are enabled 3 Click the Come button The selected task is paused at the position where
208. on before Use To run the High performance Embedded Workshop and connect the emulator refer to 4 Preparation before Use 6 2 1 2 Setup the Debugger If it connects with an emulator the dialog box for setting up a debugger will be displayed Please set up the debugger in this dialog box To setup the debugger in this dialog box refer to 5 Setup the Debugger After the setup of a debugger it will function as a debugger 62 6 Tutorial 6 2 2 Step2 Checking the Operation of RAM Check that RAM is operating correctly Display and edit the contents of the memory in the Memory window to check that the memory is operating correctly Note The memory can be installed on the board in some microcomputers In this case however the above way of checking the operation of memory may be inadequate It is recommended that a program for checking the memory be created 6 2 2 1 Checking the Operation of RAM Select Memory from the CPU submenu of the View menu and enter the RAM address Here enter 400 in the Display Address edit boxes The Scroll Start Address and Scroll End Address editing box is left to a default setting By default the scroll range is set to Oh to the maximum address of MCU Display Address Display Address fm v Scroll Start Address 000000 x gl Scroll End Address JOFFFFF v Note The settings of the RAM area differ depending on the product For details refer to the hardwar
209. orresponding to the specified condition The specified items are searched using the AND condition If the search condition is met the indicator is moved to that point 214 7 Windows Dialogs 715 242 Change the display magnification Click the Expand button or Reduce button in the tool bar Or select Menu Expand or Reducel The display is expanded or reduced using the left corner of the graph area as the radix point By default the display is expanded or reduced with display scale of 1 5 The display scale appears in the Scale field in the status bar The default expansion reduction scale is 1 5 To change the scale select Menu Value The Value dialog is opened Specify the display expansion reduction scale Grid Time bk op ep m us Rate Expand fi 500000 Reduce fi 500000 Cancel 7 15 2 4 8 Change the grid line display interval Select Menu Value The Value dialog is opened Specify the display time interval Grid Time F h p m fo S f2 ms 232 us Rate Expand fi 500000 Reduce fi 500000 Cancel 215 715 244 Change the task display order Drag the task interrupt routine to be moved the left portion of the graph to the destination s t MR Trace BAD PHR amp QE ru Alv Boo Mark 00 00 00 020 160 00 00 00 131 909 00 00 00 111 749 Indicator 00 00 00 052 734 Scale 2 401435 Grid 00700 00 032832 Area Break VEC table I
210. ory in 4 byte units DumpWord DW Displays the contents of memory in 2 byte units Echo G Displays messages Exec Executes external application Exit Exits the script file Express EXP Displays an assembler expression File Checks a filename and displays the contents of that file FillByte FB Fills a memory block with the specified data in 1 byte units FillLword FL Fills a memory block with the specified data in 4 byte units FillWord FW Fills a memory block with the specified data in 2 byte units Func p Checks function names and displays the contents of functions Go G Program execution with breakpoints GoBreakAt GBA Run target program with software break point GoFree GF Free run program execution GoProgramBreak GPB Run target program with software break point HardwareBreak HB Sets and checks a hardware break Label x Checks assembler labels Load L Downloads the target program LoadHex LH Downloads an Intel HEX format file Loadleee LI Downloads IEEE 695 absolute format files LoadMot LM Downloads a Motorola S format file LoadSymbol LS Loads source line ASM symbol information Logoff 5 Stops the output of the screen display to a log file Logon Outputs the screen display to a log file Map k Checks and sets mapping data Module MOD Displays modules names Move Moves memory blocks MoveWord MOVEW Moves memory blocks in 2 byte units MR i Displays status of realtime OS MRxx OverStep O Overstep execut
211. ory of Task You can reference task trace transition in the Task Trace window s t Task Trace EIT el he ot a Mark 00 00 00 000 442 00 00 01 847 055 00 00 01 846 612 Indicator 00 00 00 940 805 Scale 6 939931 Grid 00 00 01 850 572 Area Break ID name D AHCB ENT task2 task3 task4 task5 task6 task l l y Olin in Nea tasks task9 task10 nknown wo t oa pa ae ae a By moving the mouse to the information displayed in the window a window of the following example is opened showing the detailed information 718 2 2 1 Change the display magnification Click the Expand button or Reduce button in the tool bar Or select Expand or Reduce from popup menu by right clicking on the window The display is expanded or reduced using the left corner of the graph area as the radix point By default the display is expanded or reduced with display scale of 1 5 The display scale appears in the Scale field in the status bar The default expansion reduction scale is 1 5 To change the scale select Value from popup menu by right clicking on the window The Value dialog is opened Specify the display expansion reduction scale Grid Time Rate ES 20 Reduce fam me 234 7 Windows Dialogs 7 18222 Change the grid line display interval Select Value from popup
212. otect break attributes are provided as below Access Disable read write disabled display in red Read Only write disabled display in yellow R W Enable read write enabled display in sky blue e The protect break area is a 256 KB continuous area starting from the 64 KB boundary e You can use the following two methods to set protect break Specify from the target program session information Specify the memory attribute of the desired address range 7 8 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Section Set protect break attribute by the section information Base Address Change protect base address Attribute Set protect break attribute Mode Switch enable or disable protect break function Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window The debugger for 740 doesn t support because the entire memory area is protection area 146 7 Windows Dialogs 7 9 Trace Point Setting Window The Trace Point Setting window is used to set trace points Setting modification flag Setting the effective events Current event list ME Trace Points Setting ADDRESS AGGE CONDITION main FETCH addr 0F0042 Fune_Static FETCH addr OFO1A4 global float WRITE addr
213. pe Note e Note that the expression mp cannot considered as the variable of pointer to member type 10 1 10 Parentheses Use the and to specify priority of calculation within an expression 10 1 11 Arrays You can use the and to specify the elements of an array You can code arrays as follows variable name element No or variable variable name element No or variable element No or variable etc 10 1 12 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 char unsigned short signed int signed long signed Notes e Of the basic types of C casts to bool type wchar t type and floating point type float or double cannot be used e Casts to register variables cannot be used 256 10 C C Expressions 10 1 13 Casting to typedef Types You can use casting to typedef types types other than the C basic types and the pointer types to them When casting to a pointer type you can also use pointers to pointers and pointers to pointers to pointers etc Notes e You cannot cast to struct or union types or the pointers to those types 10 1 14 Variable Name
214. pecify the access size BYTE WORD However if you specify an odd address in the Address field you cannot specify the WORD size Examples to specify the event for data access with its value comparison Address Access size 16bit data bus 8bit data bus Even Address WORD Address 8000h lt ex mov w 1234h 8000h Data 1234h Data Mask Don t care Even Address BYTE Address 8000h lt ex mov b 34h 8000h Data 34h Data Mask 00FFh Odd Address WORD Not supported lt ex mov w 1234h 8001h Odd Address BYTE Address 8001h Address 8001h ex mov b 34h 8001h Data 3400h Data 34h Data Mask FFOOh Data Mask 00 FFh 12 2 6 Time Measurement Resource You need to specify the operating frequency of mcu for debugger to calculate the time for Trace window Time measurement window or other functions You can set it in MCU tab of INIT dialog box If you use the mcu at 10MHz div 8 please enter 10 and 8 to edit boxes 12 2 7 CPU rewrite You can not debug the program using CPU rewrite 12 2 8 MR STK script command The MR STK BASE command automatically sets the area where the stack consumption can be measured The area set by this command is range of 256KB including the start address of the system stack If you want to set other area please use not the MR STK BASE script command but the CoVerage BASE script command 269 12 3 Attention of the M16C R8C Debugger 12 3 1 Map of stack area
215. pressions 10 1 6 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 Notes e There is no support currently for sign inversion of floating point numbers 10 1 7 Member Reference Using Dot Operator You can only use variable_name member_name for checking the members of structures and unions using the dot operator Example class T public int member1 char member2 bi class T t cls class T pt cls amp t cls In this case t cIs member1 pt cls member2 correctly checks the members 10 1 8 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 class T public int member1 char member2 bi class T t cls class T pt cls amp t cls In this case amp t_cls gt member1 pt_cls gt member2 correctly checks the members 255 10 1 9 Pointers to Members Pointers to members using the or gt operator can be refered only in the forms of variable name member name or variable name gt member name Example class T public int member bi class T t cls class T pt cls amp t cls int T mp amp T member In this case t cls mp and tp cls gt mp can correctly reference the variable of pointer to member ty
216. rage area in the PID Address field specify the size of the execution task ID storage area in the Size list box If this information is not set correctly you cannot use the Task Trace window 2 Specify the task start address expression in the Task Entry field Describe the expression in the format in accordance with the description rules Use a macro variable TaskID in the address where the task ID number is supposed to assign If this information is not set correctly the task name is not displayed in the Task Trace window 3 Click the OK button The Task Trace window is opened On debuger for 740 simply by clicking the default button the OSEK OS information is set Once the real time OS information is set in this dialog the information becomes effective from the next time To change the setting data select RTOS from popup menu by right clicking on the window The RTOS Information dialog is re opened 232 7 Windows Dialogs ATTENTION When specifying WORD in the access size when performing PID setting in the RTOS Information dialog you must observe the following limits If these conditions are not met the system does not operate normally e The PID information storage area is allocated to an even address e The PID information storage area is allocated to an area accessed with 16 bit bus width 718 2 1 2 Select the Trace Range The real time trace function is used for task execution history measurement Click
217. ration code or The debugger for M16C R8C reserved words SECTION BYTE switch if etc e You cannot use strings that start with two periods for symbols or labels The debugger for 740 e You cannot use the register name A X Y S PC PS P e You cannot include the assembler structured instructions pseudo instructions macro instructions operation code or reserved words SECTION BYTE switch if etc e You cannot use strings that start with two periods for symbols or labels DO to D65535 FO to F65535 IO to 156635 SO to S65535 0 to 65535 0 to 65535 9 2 2 1 Local label symbol and scope This debugger 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 The scope is switched in this debugger in the following circumstances e 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 e During command execution The current scope automatically switches depending on the program address being handled by the command 249 9 2 2 2 Priority levels of labels and symbols The conversion of values to
218. rder of timeout value When the realtime OS is MRxx conformed to uITRON specifications V 3 0 Item Contents Value Shows the timeout value of each task ID name Shows the ID No and task name of the tasks in the timeout queue e Following character strings are used to indicate the type of wait state Character string Wait state slp Wait due to tslp tsk dly Wait due to dly_tsk flg Wait due to twai flg sem Wait due to twai sem mbx Wait due to trev msg e When a task connected to the timeout queue is in the state of forced waiting double waiting a string s which indicates double waiting is appended to a string displayed in the ID name field Normal display 26 _task26 Display when in WAIT SUSPEND 26 _task26 sl 192 7 Windows Dialogs 7 14 4 2 Display the Timeout Queue Status When the realtime OS is MRxx conformed to uITRON specifications V 4 0 The function of each item is as described below Tasks waiting at present are displayed in the descending order of timeout value When the realtime OS is MRxx conformed to uITRON specifications V 4 0 Item Contents Tmout Shows the timeout value ms of each task ID Name Shows the ID No and task name of the tasks in the timeout queue e Following character strings are used to indicate the type of wait state Character stri
219. re emulator starts 5 2 3 1 Setting the IP Address and Subnet Mask Start the debugger using other communication method After it gets started select Menu Setup gt Emulator gt System to open the Init dialog Then click the Target button of MCU tab The Target dialog will be opened IP Address f1015631600 Port fr SubNetMask 255 2552520 Default Gateway ment Specify the emulator IP address in the IP Address field port number in the Port field and subnet mask in the SubNetMask field The emulator IP address must be registered in the network environment in advance When the PC7501 or PC4701U is used the Default Gateway area becomes effective Please specify the IP address of the default gateway When the PC7501 or PC4701U is used on the identical sub net mask of identical network it is possible to omit the IP address of the default gateway e Specify the IP address subnet mask and Default Gateway in decimal byte by byte by separating every 4 bytes with a period For details on the IP address and subnet mask consult with your network manager e A port number set in the Port field is used to identify the communication process of the server emulator in LAN TCP IP communications Specify the port number which has been set in the emulator in hexadecimal Do not add a prefix which shows a base Click the OK button in the Target dialog The Target dialog is then closed and the Init dialog appea
220. re set Save Saves the contents set in the window to a file Load Loads event information from a file in which it was saved Set Sends the contents set in the window to the emulator Close Closes the window 107 7 7 5 Specify the Events Instruction Fetch To specify an instruction fetch event change the event select dialog box s Event Type to FETCH The event is established when instruction is fetched from the specified address or any address in the specified address range 7 7 5 1 Instruction Fetch of Specified Address Set as below Example Instruction fetch at address 80000h Al Set Event Status addr Address1 vi eooo gn Bl 108 7 Windows Dialogs 7 7 5 2 Instruction Fetch of Specified Address Area In Set as below Example Instruction fetch at address 80000h to 80FFFh Al Set Event Status aie a i moo s o sl 109 7 7 5 3 Instruction Fetch of Specified Address Area Out Set as below Example Instruction fetch at any address other than the range 80000h to 80FFFh T Set Event Status FETGH p faddr lt Address1 Address2 lt addr v po sl pOrFF sl 110 7 Windows Dialogs 7 7 5 4 Entering exiting to specified function Set as below Example Entering a break to function name wait Event Type ligaen hd Fetch m Setting Range Adderss1 lt faddr lt Address2 z Address1 wait z Addre
221. rea emulation memory External The area specified to be External is mapped into the external area external resources in the target system Areas for which No Use is selected for Map and those not specified here are mapped into external areas If compared to the case where areas are explicitly specified to be External the only difference is a download speed Downloading into these areas is slower than downloading into the areas specified to be External The internal ROM area is automatically mapped into the emulation memory Therefore there is no need to set here Be careful that the debug areas will not overlap Make sure the total size of the specified debug target areas does not exceed the emulation memory size of the emulation pod used The size of emulation memory that can be allocated varies with each emulation pod Consult the user s manual of your emulation pod The setting of the emulation memory area varies depending on the specified processor mode Single chip Mode You do not need to specify the area to be assigned as the emulation memory The internal ROM area is automatically mapped into the emulation memory The address range of the automatically mapped area is displayed in the Internal ROM Area field Memory Expansion Mode 8bit and 16bit If you have an area to be assigned as the emulation memory in addition to internal ROM area specify it specify it separately The internal ROM area is automati
222. rence Set as below AT Set Event Status INTERRUPT v 138 7 Windows Dialogs 7 7 8 2 Interrupt Termination Set as below 41 Set Event Status 7 7 9 Specify the Events External Trigger Signal To specify an event for external trigger signal change Event Type in the event select dialog box to TRIGGER When the signal from the external trace signal input cable is in a specified state the event is established Rising falling edges are detected from the signal on the external trace signal input cable included with the emulator A combination of eight signals is possible The following shows the names of signals from the external trace signal input cable and their cable colors Signal Name Cable Color EXTO White EXT1 Brown EXT2 Red EXT3 Orange EXT4 Yellow EXT5 Green EXT6 Blue EXT7 Purple GND Black 7 7 9 1 Detection of Rising Falling Edge Set as below By clicking each trigger button its trigger setting changes in the order of H gt L gt Example Rise of EXTO white signal Al Set Event Status Event Type TRIGGER v Trigger Detect Condition 7 6 sj4 3 2 1 o H 140 7 Windows Dialogs Example Fall of EXT1 brown signal Al Set Event Status Event Type TRIGGER v Trigger Detect Condition 7 6 sja fs 2 ijo L men 7 7 9 2 Combination of rise fall edges Se
223. ress OFO161 Time 00 0000 054 423 Cycle Address Obj code Label Hnemonic Datahccess anm Si ms us LOCAL C 42 for i 0 i lt 10 i 19026 OFO161 778BFD0400 CHP W 0004H 3H FB 00 00 00 054 423 0007E3 OS R 0007E4 00 R 19021 OFO166 7DC439 JGE FO1A1H 00 00 00 054 423 LOCAL C 43 char localScope char a 19019 OFO169 C661FF MOV B 61H 1H FB 00 00 00 054 423 LOCAL C 44 long localScope_long 0 19017 OFO16C D90BF9 MOV UW 0H 7H FB 0007E5 61 W 00 00 00 054 423 19014 OFO16F D90BFB MOV W 0H SH FB 0007DF oo VW 00 00 00 054 423 x 172 7 Windows Dialogs 7 11 3 Configuration of Data Access Mode When data access mode is selected while bus mode and disassemble mode are unselected trace information is displayed in data access mode Data access mode is configured as shown below fa Trace Jopd Cycle 1 05012 global struct 000470 00 00 00 055 299 05007 00047D 00 00 00 055 299 05006 00047E 00 00 00 055 299 05001 00047F 00 00 00 055 299 05000 000480 00 00 00 055 299 04995 000481 00 00 00 055 300 04994 000482 00 00 00 055 300 04989 000483 00 00 00 055 300 04984 000484 00 00 00 055 300 04977 000486 00 00 00 055 301 04972 0007E4 00 00 00 055 301 04971 0007E4 00 00 00 055 301 04964 0007E2 00 00 00 055 302 04963 0007E2 00 00 00 055 302 00 00 00 055 302 04957 0007E4 04949 0007E2 00 00 00 055 302
224. ro o MOE A PE E TA Anh ae E ERN RS TE 107 7 7 5 Specify the Events Instruction Fetch cccccccccsssscssessescsescescsesscecseesesecsessssecseeseeeenes 108 7 7 6 Specify the Events Memory Access c cccssssssessescssessescseescsecsessesecsesscsecsessesecsesseesenes 112 7 7 7 Specify the Events Bit Access ccccccccssessssessescssessescseescsecsessesecsssscsecsesscsecsesseeesseeseeeeaes 136 7 7 8 Specify the Events Interrupt ccccccccccccsscssescssescescsesscecsesscsecsesseeecsessesecsessseecseeseeeenes 138 7 7 9 Specify the Events External Trigger Signal ssrsvarvnrvrrsnrvvrsvervrrvesvervssseevressesvervesvene 140 7 7 10 Specify the Event Combination Condition ccccccccccccesssssscecececsesssseceeeeecsensseseeeeeees 142 7 7 11 Specify the Process ID sirs eion ea t T EE ROA ENE A ONE EEA ah 145 1S RYOLECE WINdOWi neta se leas GRA E E A E T E A E E 146 7 0 1 Extended Mentsen a EERE te mein ELE ER a 146 7 9 Trace Point Setting Windominasuasausuuaasvikerendsasraskeisaninedsavnuakteet 147 7 9 1 Specify the Trace Event cccccsscccccececsessceeececeesessesssceccceceesesseseeececsesessaeseeseeenensaaeees 148 7 9 2 Specify the Combinatorial Condition rrrrororonnvorvrrrnrrrensnnrvrnenrrnensnnrnnnsnnsnenennrnrnsnssnenene 151 7 9 3 Specity the Process ID uunsudiusanagsiakenseo AE E aoee 152 1 9 4 Specify the Trace Ranges sum ans kussansestuhvekkesanersavakutnekuttet 152 7 9 5 Specify the Trace Write Condition
225. rrrnnrnrrrennrnrrssnnrsrrnsnnrsrsnnrnrsssnnrsrssnrssssennn 246 9 1 4 Loop Statement while endw and Break Statement msersnevrrvrrvevrrvrrnevrsververrsvervenrnner 247 9 1 5 Comment statements rerrrrnrrnrrronnrrrrnnrrrrrrnnrrrrrsnnrrrrnnnrsrsnnrnrrssnnrsrrsnnnesssnnrnrsssnnrsrssnrnsssennn 247 lv 10 11 12 10 2 Display Format of C C Expressions 9 2 Writing Expressions c iccccccecccccceede ce iste EEEa EE EAEE N ENEA EEEE EE iE 9 2 1 Constants eee 9 2 2 Symbols and labels 9 2 3 Macro Variables 9 2 4 Register variablesuununarskasenesdnadkoasrinasanerarvenadansdsasardnndaniilha o PAEST Ta aA a Ti DIOS AARE E E AA AS A E Be ee 9 2 6 EINE NOS E a E EE EAE en SEN ao OEE 251 9 2 7 Character OON r a S a a aaa a r E E RE r 252 9 2 8 Operat r S Pe i e A O A eneste 252 C C Expressions 10 1 Writme C C 4 Expressions aa A e A i seed te 10 11 T imediate Values a T a a a a a a a 10 1 2Scop A 10 KO AI L0 a UAE REEE ANE AE NE E EE E EAE SE E E E E E 10 1 3 Mathematical Operators rerrrrrroonannrvrnrrrrrrnannrnnnennsrenennrnrrenssnenennrnnnenssensennrnnssnsseenannnen 10 1 4 Pointers troeon E E E T R A EE E E EE REE 10 1 5 Reference cccccccccssscccssssececseececeessececsesaececseeeeeessaaeeecsesaeeecsaeessesaeeecsesaesscueeesnssaeeseaaeens 10 1 6 St n Inverslonaarsdumsta beck Guarbkdedeamsk tases oa haved adewses EE dks busta EE oaks 10 1 7 Member Reference Using Dot Operator
226. rs again Click the OK button Then exit from the debugger 47 5 2 3 2 Setting of the LAN Interface To set the LAN communication click the LAN radio button of the MCU tab in the Init dialog The setting looks like the figure below Parallel Serial LAN eo USB IP Address fi 0 15 63 151 Target Port 4700 I Self Check Specify the IP address of the connected emulator in the IP address field Specify the IP address in bytes in decimal Delimit each 4 bytes with a period The port No is the ID No for the communication process of the server emulator on the LAN TCP IP Specify in hexadecimal Don t describe prefix which shows a cardinal number the port No set on the emulator 5 2 3 3 LAN connection by couple 1 with emulator Emulators can be connected by LAN TCP IP to a commercially available LAN card inserted in a PC by using a cross conversion cable for 1OBASE T also commercially available A HUB is not necessary in this case The cross conversion cable for 10BASE T converts the male connector of the 10BASE T of a straight LAN cable that is included with the emulators to that of a cross LAN cable Connect a cross conversion cable to the male connector of the 1OBASE T of the straight LAN cable connected to the emulator then connect the male connector of the cross conversion cable to the LAN card The LAN communications can be set up the same way as normal one 48 5 Setup the Debugger 5 2 4 Se
227. rsasheselestekuesadd lend ole du Lada GANG 32 4 3 1 Connecting the Emulator seorrorrrorvrnrorrrensnnrnrneresrrnsnnrnnrenssersennnnnnenssnesensnnrvensnrssensnnrsenene 32 4 3 2 Fndme the Emulatorsuseasesturtsnfsstedavakrasinesskroenabkseneset 32 5 Setup the Debugger 33 ST slit Dialog eaa n eeagacc E A secs Btag tec enc asdes Mena deetned sale Stas vec tance sale Beak dee Stoa NST 33 5 1 1 MCU Tabsinrnesormesnaaatarisanesnarnse een R a elect cevcabedeqctecet 34 5 1 2 Debugging Information Tab c cccccccccccssssscecececsessaeceeececsensaesecececsessnssseeeesceesensaaeeeeecs 37 5 1 3 F W nd Work Ar a Tab e scccccccccccesccsevcescclecicsedscnedeceseciescevescch cshesces ca R EEE E R eee 39 5 1 4 Memory Extension Mode Tab rrorororororororerererererererererererereresereserereseserereresesesesssssssessssnene 40 51 5 Clock Tab anvender eien 43 5 16 Script EAD A EEA EEE Hes eae a hsv ik se Se Nee Aa BR Oa sne BA a as tuer 44 5 2 Setting of the Communication Interface cccccccccccccesssssscecececeesessececececeessaeeeecceceessssceeeeeeeeneas 45 5 2 1 Setting of the USB Interface ccccccccccsessscecececsesssececececseneseceeccecsesenssseeeesceesenssaeseeees 45 5 2 2 Setting of the LPT Interface rerrrnrrrrronnnnrrrnrnrsrenannrrrnenerrrnannrnnnenssnenennnnnnensnnesennvnnsenssseren 46 5 2 3 Setting of the LAN Interface treenaa a a a 47 5 2 4 Setting of the Parallel Interface rrrrnnorrrnrnrrronnnnrvrnrn
228. rtain 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 Electron
229. s SoftwareBreakEnableAll SBEA Enables all software breaks Status a Checks the operating status of the MCU Step S Step execution of source line StepInstruction SI Step execution of instructions Stop Stops program execution Symbol SYM Checks assembler symbols Time 3 Sets the run time display and checks the current setting TraceData TD Realtime trace data display TraceList TL Displays disassembled realtime trace data TracePoint TP Sets and checks a trace points UnAlias Cancels the alias defined for a command UnAliasAll Cancels all aliases defined for commands Up z Displays the calling function UploadHex UH Outputs data to an Intel HEX format file UploadMot UM Outputs data to a Motorola S format file Version VER Displays the version No Wait Waits for an event to occur before command input WatchDogTimer WDT Sets and checks the usage condition of the watchdog timer Where Displays a function call status 244 9 Writing Script Files This debugger allows you to run script files in a Script Window The script file contains the controls necessary for automatically executing the script commands 9 1 Structural Elements of a Script File You can include the following in script files e Script commands e Assign statements e Conditional statements if else endi Program execution branches to the statement s to be executed according to the result of the conditional expression e Loop statemen
230. s and employees against any and all damages arising out of such applications You should use the products described herein within the range specified by Renesas especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas shall have no liability for malfunctions or damages arising out of the use of Renesas products beyond such specified ranges Although Renesas endeavors to improve the quality and reliability of its products IC products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Please be sure to implement safety measures to guard against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas 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 applicable measures Among others since the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you In case Renesas products listed in this document are detached from the products to which the Renesas products are attached or affixed the risk of accident such as swallowing by infants and small children is very high
231. s are not saved The contents of the Watch tab and those of newly added tabs are saved e The RAM monitor obtains the data accessed through the bus Any change other than the access from the target program will not be reflected e The variables which are changed in real time are global variables and file local variables only e Ifthe display data length of the RAM monitor area is not 1 byte the data s access attribute to the memory may varies in units of 1 byte In such a case that the access attribute is not unified within a set of data the data s access attribute cannot be displayed correctly In this case the background colors the access attribute color of the first byte of the data About more information for C variables please refer to 12 1 3 Get or set C variables 91 7 3 1 Extended Menus This window has the following popup menus that can be brought up by right clicking in the window Menu Function Add Add C watchpoint Remove Remove the selected C watchpoint Remove All Remove all C watchpoints Initialize Reevaluates the selected C watchpoint Set New Value Set new data to selected C watchpoint Radix Hex Display in Hexadecimal Bin Display in Binary Default Display in Default Radix Toggle All Variables Change radix toggle Set initial Set initial radix Refresh Refresh memory data Hide type name Hide type names from variables Show char as strin
232. s same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 5 Specify the Events Instruction Fetch 7 9 8 Specify the Events Memory Access How to set events for memory access is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 6 Specify the Events Memory Access 7 9 9 Specify the Events Bit Access How to set events for bit access is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 7 Specify the Events Bit Access 7 9 10 Specify the Events Interrupt How to set events for bit access is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 8 Specify the Events Interrupt 7 9 11 Specify the Events External Trigger Signal How to set events for bit access is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 9 Specify the Events External Trigger Signal 7 9 12 Specify the Event Combination Condition How to set combination of events is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 10 Specify the Event Combination Condition 7 9 13 Specify the Process ID How to set combination of events is same as the way for H W Break Point Setting Window For detail about the setting refer to 7 7 11 Specify the Process ID 154 7 Windows Dialogs 7 9 14
233. s that can be brought up by right clicking in the window Menu Function BUS Display the information of BUS mode DIS Display the information of Disassemble mode SRC Display the information of Source mode DATA Display the information of Data access mode View Cycle Changes the displayed position by specifying a cycle Address Changes the displayed position by searching an address Source Display a selected source file Time Absolute Time Shows elapsed time from the time the program started running up to now in terms of absolute time Differences Shows a differential time from the immediately preceding displayed cycle Relative Time Shows a relative time from the currently selected cycle Trace Forward Changes the direction of search to forward direction Backward Changes the direction of search to reverse direction Step Searches in Step mode in the specified direction of search Come Searches in Come mode in the specified direction of search Stop Stops trace measurement in the middle and displays the measured content at the present point of time Restart Restarts trace measurement Layout Change layout of the corrent view Copy Copy selected lines Save Save trace data to file Load Load trace data from file Toolbar display Display toolbar Customize toolbar Open toolbar customize dialog box Allow Docking Allow window docking
234. sececececsessnsececeeseeenenseaeees 241 8 1 8 Real time Trace Commands oreeson n a E E EE E E 241 8 1 9 Coverage Measurement Commands rannnnrvnnrnnnennannrnrnnnsrernsnnrnnnnnssrenennnnnnenssresennnnnnensnee 241 8 1 10 Seript Log File Commands rornnorornonssessannrnrnnnssnerannnnrrenssresensnnrrnnsnesrensnnrsensnsssensnnrsenene 241 8 1 11 Program Display Commands revorornrnrrrrnannrnrnrnsrrerennnnrnrnssrerensnnrrnnsnsssennnnrnnnsnnssensnnnnnnsne 241 8 1 12 Map Commands a a r E AN R 242 8 1 13 Clock Command issii eesin a a Ea aeee En EEE 242 8 1 14 WatchDog Timer Commands erorornrnrsennannrnrnrnssnnsannnnrnrnssrerensnnrrnnssrssensnnrsensnsssensnnnvenene 242 8 1 15 C Language Debugging Commands ccccccccccccsssessssecececsesesseceeececsesenseceeeeeceenensaaeees 242 81 16 Real time OS Comman ds 2 505 5 4 fips ate bebe caetisdocese tet tests eee 242 8 1 17 Utility Commands cccccccccccecsessscecececeeseneseseeececeessaneeeeececeseseseaeseesceesentsaeaeeeeeenenees 242 8 2 Table of Script Commands alphabetical order cccccccceescesescssecesesecesesscsseesesscessesecssessesseeses 243 9 Writing Script Files 245 9 1 Structural Elements of a Script File rerrrorrronnnnrornrnrrrrnannrnrnrnsrnerennnnrrensnnssensnnnvnnsnssrensnnrnnnsnsenn 245 9 11 Seript Command us oe OEE EEE EEEE EEE EEEE EEEE E 246 O71 2 Assien Statement r E e a a dee das T E A O 246 9 1 3 Conditional Statement rsornrrnannrnrrnnrrrrrrnnrrrrrsnnr
235. ser stack area 3 byte area 12 4 4 Specify the Clock When following Emulation Pod is used the target clock becomes external clock fixation The specified clock is invalid e M38000T FPD e M38000TL FPD e M38000TL2 FPD 12 4 5 Watch dog timer When the watch dog timer is enabled operations other than free run of the target program are inhibited Before starting debugging disable the watch dog timer 12 4 6 Option of C Compiler Assembler Linker The information may not be downloaded debugged normally depending on the option designation of the compiler assembler and linker Please refer to the following for the option specification Refer to 12 5 Option of C Compiler Assembler Linker The compiler that can be used by 740 debugger e the Assembler Package for 740 Family SRA74 e the IAR C Compiler 273 12 4 7 About the single step execution and the program break function in the internal RAM area of the mcu When debugging with the emulation pod M38000L2 FPD single step execution and program break function in the internal RAM area are not available When debugging the program transferred to the internal RAM area please use the free run execution and the trace function 12 4 8 Debugging in the 16 Timer functions The microcomputer 38B5 group etc which supports 16 bit timer has undermentioned limitations e Precaution 1 Outputs for the 16 bit timer may be invalid in the Memory Window etc when the program ex
236. sersrennnnrnenennsnennnnrnnnsnsssenennnsen 268 12 2 5 Hardware Event ion irun e ee RE E ee av AR eY 269 12 2 6 Time Measurement Resource mmrsvvvvrrrrrrersrrvrerrrrrrererrereersrererernnnessersrerernnsssssrsvennnns 269 12 2 7 CPU rewrite ois cetectets Seks ee a eed Seen he eh Pe 269 12 2 8 MR STK seript command vesenet Bsegdeesecss eds Sedvavocvacessdasvanatectscessds askse de 269 12 3 Attention of the M16C R8C Debugger rerrrnrrrrnannrnrnrnrrrssennrnrrenssnerennnnrrnnssrsrensnnrrnnsnsssensnnrsenene 270 12 3 1 Map of stack area used by the emulator orerrrrrrrorovorrrrrrrrrrnonernrnrnrrrrnennrnrnensrrerennner 270 12 3 2 Options for compiler assembler and linker rrrrrannrnrrrnrrrrrennnnrrnnernrrensnnrvnnsnrsrensnnnnen 270 12 3 3 TASKING C Compiler c ccccccsssesscssccccessssncenccescecsensenecesceseensceecccscessenscenacteceseense 270 12 3 4 Target MCU HOLD terminal sororvrorororonnrnrrrnrrrsrennnnrrrnsnrsrennnnrrnnsnnsrensnnrvnnsnsssensnnnsen 270 12 3 5 Hardware Event EEEE AE E E A E ae kula n Gee bn ches hangs aioe tae hee oes 271 12 3 6 Operating frequency Of MCU rrrrnnnnrernrrrrernsnnrnnnenssernsnnrnnnenssrenennrnnnenssesnennrnnnensseesennnen 271 12 3 7 The correspondence OS version of task pause function srrrrrsrvrrrrnrrvrrrrnnrnrrrrrrrernnn 271 12 3 8 Memory Space Expansiones iiri AEEA ASEE A NEER AE E 272 12 3 9 Watch dog timb nre EEE AE E E E N 272 12 310 CPU rewrite porne piia EEE sated
237. ses below 7FFh Al Set Event Status DATA ACCESS m al 7 Bl Al Set Event Status DATA ACCESS Not Specify H po po o WRITE I Mask 7 Windows Dialogs 7 7 6 3 Memory Access The debugger for 740 The debugger For 740 a write of word length data to the even address cannot be detected either 7 7 6 3 1 Writing Reading a Specified Address Set as below Example Writing to even address 400h Al Set Event Status Event Type DATA AGGESS x Address Data Setting Ranee addr Address x Address 400 Jal Address2 000000 v Bl Function Source File v Function 7 ACCESS WRITE ADDRESS 000400 CONDITION addr 000400 omei 41 Set Event Status Event Type DATA ACCESS x Address Data Setting Ranee Not Specify v Data 1 food Data 2 food Access WRITE v IT Mask 5000 ACCESS WRITE ADDRESS 000400 CONDITION addr 000400 canes 131 Example Writing byte length data 32h to even address 400h Al Set Event Status DATA ACCESS Y addr Address1 bo sje d Al Set Event Status DATA ACCESS Y 7 Windows Dialogs Example Writing data 10h 3Fh to even address 400h Al Set Event Status DATA ACCESS Y addr Address v w ll ajz Al Set Event Status DATA ACCESS Y Datal lt data lt Data2 i
238. shown below appears Specification by a state transition diagram or Sequential specification can be used If the content of any event is altered it is marked with an asterisk on the title bar Once conditions are set in the emulator asterisks are not displayed A time out time in each state can also be specified B1 main FETCH B2 000410 WRITE aa de OAE E B3 OFEOOO WRITE t B4 000000 FETCH Time Out B5 000000 FETCH Not Use C Start Statel 0 Stat B6 000000 FETCH Not Use I Sequential Pass Count Stat gt TT gt OK Cancel 7 9 3 Specify the Process ID By specifying a process ID it is possible to detect only event establishment under specific conditions PID Fl JV Enable Detail Example Enable only the event that occurs in a specific task when using the realtime OS 7 9 4 Specify the Trace Range For the PC4701 emulator debugger 32K cycles equivalent of data can be recorded L m Trace Area Break v Break Before 32K 0 About 16K 16K After 0 32K Full Break Stores the 32K cycles 32K to 0 cycles to the point at which the target program stops Before Stores the 32K cycles 32K to 1 cycles to the point at which the trace point is passed About Stores the 32K cycles 16K to 16K cycles either side of the trace point
239. sn t support this function You can only use the MR Window when you have downloaded a program that uses the realtime OS Gf the downloaded program does not use the MR nothing is displayed in the MR Window when it is opened MR xj w Orgu OSUUS oaa Current Run Task 1 main ID Stazddr name Pra Status wup count timeout flg ptn flg mode OF17F8H main 1 RUN 0000H 0F1468H task2 2 RDY 0000H OFIAT6H task3 SUS 0000H OF1484H _task4 WAI SLP 0000H DF1A9AH task5 WAI SLP 5US 00008 DF1ABOH task6 WAT DLY 0000H OF1ACAH task WAI DLY SUS 0000H OF1AE4H tasks WAI FLG 00008 1111H TWE_ORW OF1B02H task9 WAI FLG SUS 0000H 1111H TWF ORW Fa 1 2 3 4 5 6 7 8 9 E gt _ e You can open the MR window as many as the number of display modes e By clicking the desired button the MR window display mode changes and the display data also changes e By double clicking the desired task line you can display the context data of the task e You can drag the cursor to change the width of the display area in each mode e If the downloaded program does not use MR you cannot select all the menu which will select the display mode e The usable display mode depends on MRxx ATTENTION Please use the startup file ertOmr axx start axx whose contents matches with the version of MRxx when you make downloaded program The MR Window and MR command will not run properly if the startup fi
240. source line or data access information in combination In this case the display will be similar to the one shown below k Trace JO x Ve Qaa vas z Ev Range 32511 00000 Area Break File Cycle 32389 Address OFO107 Time 00 00 00 053587 Label Address Data BUS BIU R U RUT CPU ON B T Q T 76543210 Datakccess hom s ms us GLOBAL C 52 for 452 05 16 35 JHH 4 OFO107 CMP W 5H 4H FB 32389 0007E2 0000 16b DW W O CW 1 1 11111111 0007E2 0000 W 00 00 00 053 587 32388 0007E2 0000 16b DW R 0 RB 0 1 1 11111111 0007E2 0000 R 00 00 00 053 588 32387 OFO10A CA7D 16b IW R oO 2 1 1 11111111 00 00 00 053 588 OFO1O0C 7318 16b IV R 0 4 1 1 11111111 00 00 00 053 588 j 171 7 11 2 Configuration of Disassemble Mode When disassemble mode is selected while bus mode is unselected trace information is displayed in disassemble mode Disassemble mode is configured as shown below Kax Range 32511 TD hv Beak Fie Dye o Tae OT ins A Cycle Obj code Laber hrm s ms us a 18960 0F0199 730BFO RO 10H FB 00 00 00 054 427 18957 OFO19C CS1BFD 1H 3H FB 00 00 00 054 427 18953 OFO19F FEC1 FO161H 00 00 00 054 427 18946 OFO161 778BFDOA00 OOO0AH 3H FB 00 00 00 054 428 18943 OFO166 7DCA39 FOIA1H 00 00 00 054 428 18936 OFO1A1 7DF2 00 00 00 054 428 18929 0F0087 F50600 randam FOOSEH 00 00 00 054 429 18920 OFOOSE 7CF204 ran
241. ss2 F018 V Function Source File mainc x Function wait 7 ACCESS KETON ADDRESS CONDITION ED 72 lt addr lt 0F0188 Example Exiting from function name wait Al Set Event Status men Event Type HAJLA v Fetch Setting Range dar lt Address1 Address2 lt addr v Address1 wait z wl Address2 F0188 V Function Function Source File mainc v fra it X ACCESS as ADDRESS CONDITION addr lt 0F0172 0F0188 lt taddr ment 111 7 7 6 Specify the Events Memory Access To specify a memory access event change the event select dialog box s Event Type to DATA ACCESS The event is established when memory is accessed at the specified address or under conditions set for the specified address range 7 7 6 1 Memory Access The debugger for M32C ATTENTION It is not detected that data access to the odd addresses in word size access 112 7 Windows Dialogs 7 7 6 1 1 Writing Reading a Specified Address Set as below Example Writing to even address 400h 41 Set Event Status DATA ACCESS ao v d ra Al Set Event Status DATA ACCESS 113 Example Writing byte length data 32h to even address 400h AT Set Event Status DATA ACCESS poao a 7 Al Set Event Status DATA ACCESS data Datal Re gt po oo we A
242. t Trace gt Data Trace GUI I O Window iew gt Graphic gt GUI I O MR Window iew gt RTOS gt MR MR Trace Window iew gt RTOS gt MR Trace MR Analyze Window iew gt RTOS gt MR Analyze MR Task Pause Window iew gt RTOS gt MR Task Pause Task Trace Window iew gt RTOS gt Task Trace Task Analyze Window iew gt RTOS gt Task Analyze The 740 debuggers are not supported For the reference of the following windows refer to the help attached to a High performance Embedded Workshop main part e Differences Window e Map Window e Command Line Window e Workspace Window e Output Window e Disassembly Window e Memory Window e 10 Window e Status Window e Register Window e Image Window e Waveform Window e Stack Trace Window 7 1 RAM Monitor Window The RAM monitor window is a window in which changes of memory contents are displayed while running the target program The relevant memory contents are displayed in dump form in the RAM monitor area by using the realtime RAM monitor function The displayed contents are updated at given intervals by default every 100 ms while running the target program Label Register 0 F ASCII O003FO 000400 pool SB 000410 000420 000430 000440 000450 000460 000470 000480 000490 D00440 x 000460 CAL all om D e This system provides a 1Kbytes of RAM monitor area which can be placed
243. t a watch on the long type array a declared at the beginning of the program by using the following procedure Click the left of displayed array a in the Editor Source window to position the cursor and select Add C Watch with the right hand mouse button The Watch tab of C watch window in which the variable is displayed opens mx Ri E 2 Ine Gal amp Watch Local File Local Global Name Value Address Scope signed long 10 a 000414 Auto The user can click mark at the left side of array a in the C Watch window to watch all the elements mx AY E 2 ner Gl amp Watch Local File Local Global Name Value Address Scope signed long 10 a 000414 Auto signed long a 0 16838 000414 signed long a 1 5758 000418 signed long a 2 10113 00041C signed long a 3 17515 000420 signed long a 4 31051 000424 signed long a 5 5627 000428 signed long a 6 23010 00042C signed long a 7 7419 000430 signed long a 8 16212 000434 signed long a 9 4086 000438 6 Tutorial 6 2 9 2 Registering Variable The user can also add a variable to the C Watch window by specifying its name Click the C Watch window with the right hand mouse button and select Add from the popup menu The following dialog box will be displayed Enter variable i Add new watch point Watch Local File Local Global Name Value Address S
244. t as below Example Rise of EXTO white EXT7 purple signal fall of EXT1 brown signal 41 Set Event Status Event Type TRIGGER v Trigger Detect Condition meee H L H ment 141 7 7 10 Specify the Event Combination Condition Use the Combination group of the event setting windows to specify the combinatorial conditions of events The combination of two or more events can be used One of the following combinatorial conditions can be selected AND All of the specified events are established AND Same Time The specified events are established at the same time OR One of the specified events is established STATE TRANSITION Established upon entering a break state in the state transition diagram Pass counts number of times passed can be specified for each event 1 255 If the specified combinatorial condition is AND Same Time no pass counts can be set fixed to 1 7 7 10 1 Select AND OR Change the Combination group to AND to specify AND for the combinatorial condition or OR to specify OR for the combinatorial condition Next check turn on an event in the event specification area that you want to use and specify a pass count for that event To alter the pass count while the event to alter is being selected click the pass count value of that event ME HAV Break Points Setting IV Enable HAW Break ADDRE GONDITION Al 000400 WRITE
245. t sys driver as explained below every time after ending debugging operations and disconnecting the emulator To make LptFix exe ineffective to enable Parport sys execute following command line 266 12 Attention 12 1 10 Notes for coverage function Coverage Measurement is a function to record the addresses accessed by the target program These accessed addresses will flow to the microcomputer address bus This may cause unexecuted addresses to be treated as executed addresses when calculating coverage 12 1 11 Emulator reset switch If system reset of the emulator does not function normally terminate the debugger turn ON the emulator again and restart the debugger Then re download the program 12 1 12 Debugging Resource on Emulator The debugging resource on the emulator is shared the window between the dialogs plurals Therefore either of the window the dialog which can be used at the same time is only one Trace Event e Trace Point Setting Window TracePoint Command e MR Trace Window MR Analyze Window e Task Trace Window Task Analyze Window e Time Measurement Window 267 12 2 Attention of the M32C Debugger 12 2 1 Stack area used by the emulator The emulator uses the interrupt stack area as a work area 20 bytes Before starting debugging be sure to reserve the user stack area 20 byte area 12 2 2 Interrupt stack pointer when resetting the target program The emulator sets the interrupt stack pointer
246. the After button or select After from popup menu by right clicking on the window or Break button or or select Break from popup menu in the Task Trace window After Records a task execution history until the trace memory is filled with recorded data Break Records a task execution history as much as trace memory available until before the target program stops Only an specific cycle required to know the task execution history is recorded in the trace memory ATTENTION A trace point set in the Trace Point Setting dialog is disabled 718 2 1 3 Start the Target Program Execute the target program Record the information required to know the task execution history in the trace memory When you select After for the trace range the execution history is displayed in the Task Trace window immediately after the trace memory is filled or immediately after the target program stops When you select Break for the trace range the execution history is displayed in the Task Trace window immediately after the target program stops You can stop task execution history measurement To do this click the Stop button in the Task Trace window Or select Trace Stop from popup menu by right clicking on the window To restart task execution history measurement click the Restart button in the Task Trace window Or select Trace Restart from popup menu by right clicking on the window 233 7 18 2 2 Refer the Execution Hist
247. the Next button To cancel registration click the Close button If not displayed check whether the communication interface switch is set correctly and after temporarily turning off the power turn it back on again Then click the Search button 16 3 Before starting the debugger 5 Click the Next button and the dialog box shown below appears Set the IP address subnet mask port number and default gateway IP address When using the emulator on the same network s same subnet mask the default gateway IP address may be omitted Set IP Mask Port GateWay pl ESEA IP Address f192168110 Subnet Mask 255 2552550 0 Port Number fr n Default GateWay 921681254 0 Cancel Use any 4 digit number to specify the port number Enter that number when starting the debugger For details about the contents of the IP address subnet mask and default gateway to be specified contact your network administrator 6 Click the Set button on the dialog box The IP address etc that have been set are registered in the emulator When registered correctly the dialog box shown below appears Setting was successful Please reboot the emulator After checking the contents of the dialog box click the OK button 7 Temporarily turn off the power to the emulator and turn it back on again The registered IP address becomes effective after the emulator is powered up again ATTENTION e If multiple Emulators in default settin
248. the internal ROM area The automatically allocated internal ROM address range is displayed in this field Internal ROM Area F80000 FFFFFF is allocated 812 8 Emulation memory allocation for an extended area When memory extension or microprocessor mode is selected emulation memory can be allocated to the extended area to be debugged in up to four areas Here allocate memory for the debug target area and specify its mapping information Emulation Memory Allocation Bank Length Map Area 1 fo fime f INTERNAL Area 2 f2 256kB6 f EXTERNAL Areas fo f256KB mj Nouse f Bread fo f256KB mj Nouse f 52 5 Setup the Debugger Follow the procedure described below Specify size of area Bank Specify the bank address of the debug target area to be allocated in Set bank address hexadecimal If specified as CO CO0000h is the start address of the debug target area Length Specify the size of the debug target area 256 bytes or 1 Mbytes If Length is specified to be 256 bytes banks 00 04 08 and up to FC every four banks are specified for Bank if Length is specified to be 1 Mbytes banks 00 10 20 and up to FO every 16 banks are specified for Bank Map Specify the mapping information Internal or External for the Specify area map specified area If no area is specified select No Use Internal The area specified to be Internal is mapped into the internal a
249. the type of bit field as unsigned short int 12 3 4 Target MCU HOLD terminal When the target MCU HOLD terminal is set to LOW you cannot stop execution of the target program Set the HOLD terminal to High and try to stop the target program again Even if the HOLD terminal is set to LOW for a short period of time you may stop the target program with the HOLD terminal set to LOW If this happens try to stop the target program again 270 12 Attention 12 3 5 Hardware Event e If you specify word length 2 byte length data from an odd address as an event in the following data accesses the event is not detected Also even when any other bit of the address that contains a specified bit is accessed during bit access the event may become effective Hardware Break Event Real time Trace Event Time Measurement Event e To detect a byte access to an odd address in 8 bit bus width specify the compare data to HI BYTE e You cannot specify a PID data in word length when the specified PID address is an odd address e Examples to specify the event for data access with its value comparison Address Access size 16bit data bus 8bit data bus Even Address WORD Address 8000h lt ex mov w 1234h 8000h Data 1234h Data Mask Don t care Even Address BYTE Address 8000h lt ex mov b 34h 8000h Data 34h Data Mask 00FFh Odd Address WORD Not supported lt ex mov w 1234h 8001h Odd Address BYTE Address
250. tion programs for each MCU 2 1 Communication methods The supported communication methods vary with the type of emulator used UF Emulator PC4701U PC4701M PC4701HS USB Support i LAN Support Support LPT Support Support z Proprietary parallel Support Support Serial Support Support Depending on communication methods it is necessary to set up some items before the debugger can be started Please see 3 3 Setting before emulator starts 2 2 Function table The supported functions vary with the type of emulator used PC4701U M HS S W Break 64 points H W Break 6 points Real Time Trace 32K Cycles RAM Monitor 1K bytes area CO Coverage 256K bytes area Time Measurement Go to Stop 4 points interval Protect Break Access Protect 11 3 Before starting the debugger 3 1 Communication method by emulator The supported communication methods are as follows The supported communication methods vary with the type of emulator used USB LAN LPT Proprietary parallel Serial 3 1 1 USB Interface Supported only when using the PC4701U emulator Compliant with USB Standard 1 1 Connections via USB hub are not supported By connecting the host computer and the emulator with USB cable it is possible to install the supported device drivers using a wizard The necessary cable is included with the emulator 3 1 2 LAN Interface Support
251. to the original display double click the line now indicated by the This function allows you to check the members of structures and unions Attention If a variable is declared with the same name as the type definition name declared by typedef you cannot reference that variable e 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 261 11 Display the Cause of the Program Stoppage If the program is stoped by the debug function the cause of the stoppage is displayed in the Output window or Status window Platform sheet The contents of a display and the meaning of the cause of the stoppage are as follows Display The cause of the stoppage Halt The stop by the Halt Program button menu S W break Software break Address match interrupt break Address interrupt break H W event Combination Hardware break logical combination AND or AND same time condition was met H W event Combination Ax Hardware break logical combination OR condition was met Ax The event number of which condition was met H W event State transition from xx Hardware break State Transition condition was met from xx previous state start statel state2 H W event State transition Timeout Hardware break State Transition Time Out condition was met H W event Access protect
252. toolbar Open toolbar customize dialog box Allow Docking Allow window docking Hide Hide window 89 7 3 C Watch Window The C Watch Window displays C C expressions and their values results of calculations The C 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 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 Watch Local File Local Global Name Value Address struct tag 8 ps 0x1 000410 struct tag_s ps 000001 signed short global short 0 000412 signed long global long 1 000414 signed int 5 5 global array 15 000418 signed int 5 global array 0 15 000418 signed int global array 0 0 15 000418 signed int global array 0 1 2649 000412 signed int global array 0 2 0 000416 signed int global array 0 3 2649 OOO41E signed int global array 0 4 0 000420 signed int 5 global array 1 768 000422 siqned int 5 global array 2 3842 000420 e Variables can be inspected by scope local file local or global e The display is automatically updated at the same time the PC value changes e Variable values can be changed e The display radix can be changed for each variabl
253. torial program The tutorial programs are installed to the directory YWorkSpaceYTutorial of the drive you installed High performance Embedded Workshop There are workspaces for each targets and each MCUs Please select the corresponding one to your system and open the workspace file hws from the menu Open Workspace The tutorial program is based on the C program that sorts ten random data items in ascending or descending order The tutorial program performs the following actions e The tutorial function generates random data to be sorted e The sort function sorts the generated random data in ascending order e The change function then sorts the data in descending order Note After recompilation the addresses may differ from those given in this section When using the assembler package for 740 family The tutorial program for the assembler package for 740 family is prepared If you use the assembler package for 740 family please use it e Please read this tutorial with replacing function names with subroutine name e g replace function sort with subroutine sort e About the source file name also please replace it with the corresponding one e The diagrams in this tutorial are for C program The displayed diagram for the assembler program may different from them e Step9 and Step12 are descriptions of C program 6 2 Usage Please follow these instructions 6 2 1 Step1 Starting the Debugger 6 2 1 1 Preparati
254. ts while endw A block of one or more statements is repeatedly executed according to the expression e break statement Exits from the innermost loop e 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 Notes e You cannot include comments on the same lines as script commands e You can nest script files up to five levels e You can nest if statements and while statements up to 32 levels e If statements must be paired with endi statements and while statements with endw statements in each script file e 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 e You can specify up to 4096 characters per line An error occurs if a line exceeds this number of characters e When a script file containing illegal commands is automatically executed when you select Option gt Script gt Run from the Script Window menu after opening a script file or click the 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
255. tting of the Parallel Interface Special parallel communication uses a special parallel interface board PCA4202G02 option which is inserted in the extension slot ISA bus of the personal computer Special parallel communication can only be used on the PC4701HS emulator To set the parallel communication click the Parallel radio button of the MCU tab in the Init dialog The setting looks like the figure below Parallel Serial C LAN C LPT C USB Host JIBM PC AT z Target I O Address fi 00 Self Check Specify the I O address in the I O Address field which is the I O address set on the parallel interface board in hexadecimal Don t describe prefix which shows a cardinal number e Please specify the value of the hexadecimal number for the I O address Don t describe prefix which shows a cardinal number e For detail about parallel board PCA4202G02 refer to PCA4202G02 Instruction Manual ATTENTION Combination of Windows and Parallel Interface It is necessary to set the I O address used for the device driver for a parallel communication Please refer to Setting before emulator starts 3 3 Setting before emulator starts 5 2 5 Setting of the Serial Interface Serial communication uses a serial interface RS 232C of the personal computer This communication method is available for all the PC4701 emulator series Serial communication can only be used on the PC4701M HS emulator To set the Serial communication click the
256. up by right clicking in the window Menu Function Allow Docking Allows the window docking Hide Hides the window 237 7 19 2 Analyze the Execution History of Task You can reference the execution history statistical processing in the Task Analyze window This window shows the CPU occupation time and ratio by task The Task Analyze window functions together with the Task Trace window If the Task Trace window is not open or the Task Trace window does not show any data the Task Analyze window will not function Mark 00 00 00 000 672 00 00 01 569 272 00 00 01 568 600 ID name Num Max Run Time Min Run Time Avg Run Time Total Run Time Ratios o 25 50 75100 1 f j 1 00700 00 005 195 00700 00 005 195 00700 00 005 195 00700 00 005 195 0 33 H H 1 main 115 00700 00 007 305 00700 00 000 767 00700 00 001 541 00700 00 177 287 11 30 i i 2 task002 12 00700 00 012 067 00700 00 006 915 00700 00 011 552 00700 00 138 630 8 84 m 3 task003 12 00700 00 012 597 00700 00 006 892 00700 00 012 111 00 00 00 145 332 3 27 m i i 4 task004j 12 00 00 00 012 170 00700 00 006 505 00700 00 011 604 00700 00 139 252 8 65 mm 5 task005j 12 00700 00 012 277 00 00 00 006 577 00700 00 011 795 00 00 00 141 540 9 02 m i H 6 task006 11 00700 00 013 435 00700 00 006 490 00700 00
257. ution history the real time trace function is used Click the After button or select Menu Trace Range gt After or Break button or select Menu Trace Range gt Break in the MR Trace window After Stores the cycles of trace data after the trace point Break Stores the cycles to the point at which the trace point is passed Execute the target program Record the information required to know the task execution history in the trace memory ATTENTION trace point set in the Trace Point Setting dialog is disabled 7 15 2 2 Stop the Task Execution History Measurement Click the Stop button in the Task Trace window Or select Menu Trace Stop The measurement results so far are displayed in the MR Trace window 7 15 2 3 Restart the Task Execution History Measurement Click the Restart button in the Task Trace window Or select Menu Trace Restart When restarting the trace measurement all the measurement results so far are deleted 212 7 Windows Dialogs 7 15 2 4 Refer the Execution History of Task You can reference the task execution transition in the MR Trace window s t MR Trace Haaa h pi d a ao Mark 00 00 00 020 160 00 00 00 131 909 00 00 00 111 749 tor 00 00 00 052 734 J 2 401435 eie 00 00 032 832 table ID name EA OFFD80 SYSCALLO 33 DFFD84 SYSCALL1 38 OFFD98 SYSCADLZ Idle 1 taskl 2 task2 3 task3 4 5
258. v 8 please enter 10 and 8 to edit boxes 274 12 Attention 12 5 Option of C Compiler Assembler Linker We do not evaluate other settings so we can not recommend to append other options 12 5 1 When Using NCxx When O OR or OS option is specified at compilation the source line information may not be generated normally due to optimization causing step execution to be operated abnormally To avoid this problem specify ONBSD or Ono Break source debug option together with O OR or OS option 12 5 2 When Using the Assembler Package for 740 Family Please assemble according to the following procedures and link At assemble e c option outputs debugging information concerned with source line to a relocatable file Note When the directive comand FUNC is specified to a function in a source file if c option is used the name of the function will be not available Please do not use the option to make the name available e s option outputs local labels local equ symbols and local bequ symbols to a relocatable file At link e s option generates a symbol file We do not evaluate other settings so we can not recommend to append other options 12 5 2 1 Command Execution Examples The following shows examples of entering commands depending on the product e The Debugger for 740 gt sra74 c s main a74 lt Enter gt gt sra74 c s sub a74 lt Enter gt gt link74 main sub s lt Enter gt 275
259. window Coverage measurement function Coverage window Coverage command Memory protect function Protect window Protect command Hardware event H W break event Real time trace event Time measurement event MCU switches the bank to be accessed based on the value in the bank selection register A signal which can distinguish which bank accesses the bus information is not output Therefore the above function may work as expected By specifying Simultaneous And AND logic same time for the hardware event and the bank selection register both of which are detected as the combined condition in the State Transient Break Trace window the hardware event for the bank duplicated area can be detected e If you use the Memory Reference Change command for the bank duplicated area before MCU is switched from the normal mode to the memory space expansion mode 2 by the target program the function may not work as expected e The memory map shows the following data after the debugger gets started Start Address End Address Map Attention 00000 003FF External Cannot be changed SFR area 00400 3FFFF Internal The internal RAM area cannot be changed 40000 BFFFF External Cannot be changed C0000 FFFFF Internal 42 5 Setup the Debugger 5 1 5 Clock Tab The specified content becomes effective when the next being start Main Internal C External Sub Internal External Attempt to acc
260. xecution 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 Toolbar JO x DEKKER OM Script Script File Name Loe Log File Name gt assemble main LABEL PROGRAM main Execution Result Area assemble main Command History Area gt Enter Command Command Input Area e 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 e 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 e When a script file is open you can invoke script commands from the command input area provided the script file is not being executed e 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 96 7 Windows Dialogs 7 5 1 Extended
261. y of bus information on the 740 Debugger From left to right the contents are as follows Address The status of the address bus Data The status of the data bus Sync This signal is output when fetching an instruction op code When an op code is being fetched this signal indicates a logic 1 This Sync value is sometimes displayed as 1 In this case it denotes a dummy Sync meaning that the instruction on the line is not actually executed Read This signal determines the direct ion of the data bus When data is to be read this signal indicates a logic 0 Write This signal determines the direct ion of the data bus When data is to be written this signal indicates a logic 0 B T Shows the level of the external break trigger the EXTIN7 pin of the external trace signal input cable High level 1 Low level 0 Q T Shows the level of the external trace trigger the EXTING pin of the external trace signal input cable High level 1 Low level 0 76543210 Shows the status of the 8 bit external signal pins EXTINO to EXTIN7 of the external trace signal input cable High level 1 Low level 0 h m s ms us Show the elapsed time from the target program beginning 180 7 Windows Dialogs 7 12 Data Trace Window The Data Trace Window is used to analyze the results of real time trace measurements and graphically show data access information It operates in conjunction with Trace Window Time at ind

Download Pdf Manuals

image

Related Search

Related Contents

User Manual - Controls Warehouse  Manuale di Installazione Manuale Utente  取扱説明書 - 三菱電機  BMC Performance Manager for Hardware  Philips Economy Stick Stick energy saving bulb 871829121787900  User Manual - Johnson Systems Inc.  User manual  

Copyright © All rights reserved.
Failed to retrieve file