Home

F MC-8L/8FX FAMILY OPERATION MANUAL

image

Contents

1. EI sample Source file name main er val 4 Function name A startup asm see i The source file name and function name acquired from the debug information are listed B Function Display the following information from the debug information Load module name Source file name Double click the source file name to open the source window Function name Double click the function name to jump to the source window of the function definition position Coverage rate Indicates the coverage rates of load module source file and function Update of the ABS tab is required to display the latest coverage rate The coverage rate is displayed as when all areas are out of range of the coverage measurement If a part of the area falls in the outside of the coverage measurement rage an asterisk is attached to the end of the coverage rate This function only becomes valid while MB2141 emulator debugger B ABS Tab Bitmap Image List Load module name C source file Assembler source file BAF I Function name 54 CHAPTER 3 Windows E Short Cut Menus Click the Right Button of the Mouse on a Load Module Name Figure 3 4 20 shows a short cut menu Figure 3 4 20 Short Cut Menu on a Load Module Name SIJCTI Order by name Order by address Order by coverage rate Coverage v Coverage rate display Refresh Property Open Cannot be selected Order
2. D TEN 10 Cancel Apply 1 Select the Include Path category The include path setup dialog shown in Figure 4 5 23 opens 2 Specify an include path Clicking the Browse button to the right of the input field enables directory selection 3 Click the Add button The specified include path is added to the end of Include Path List E Resetting an Include Path 1 Select the Include Path category The include path setup dialog shown in Figure 4 5 23 opens 2 Select the include path you want to reset from Include Path List 3 Click the Delete button 219 CHAPTER 4 MENUS E Changing the Include Path Retrieval Order Include paths are retrieved in turn from top of Include Path List The order in which include paths are registered in the list can be changed in the following procedure 1 Select the Include Path category The include path setup dialog shown in Figure 4 5 23 opens 2 Select the include path whose order is to be changed from Include Path List 3 Click the Up or Down button to move the cursor to a relevant position E Setting List Output Figure 4 5 24 List Output Setup Dialog Setup Project MB83w625 sample prj iO utput Iv M M M M M M 1 Select the Output List category The list output setup dialog shown in Figure 4 5 24 opens 2 To output a list file set a check mark to the left of Creates a list file When the list file is not out
3. sssssssssseeseseeeneeeenen nnne 389 F 15 SSDI Set Interrupt Set Interrupt Source sssssssssssssseseeeeeee eene 390 F 16 SSDI Set Timer Set Timer seessssssisssssesse essen nennen nain tnsn itn n seine nes raaa nnns 391 F 17 SSDI Request Abort Request Abor ssssssssssssssseeee eene enne nnns nenne 392 FAS SSDI Set Area Set Area ate Determina ate ei pete dee er 393 F 19 SSDI Clear Cycle Clear cycle count sssssssssssssssseeeee enne nnne 394 F 20 SSDI Execute MCU Execute target program sssssssssssssseseeeeeeen nennen 395 F 24 SSDI GetCurrentExecuteAddr Get the Address in Execution ssssssssssss 396 CHAPTER 1 OUTLINE OF SOFTUNE Workbench This chapter gives an outline of SOFTUNE Workbench SOFTUNE Workbench integrates language tools and debuggers into one to provide the integrated development environment that totally supports processing from programming and debugging to creation of data to be written to ROM Language tools include a C compiler assembler and linkage kit etc Debuggers are a simulator debugger emulator debugger and monitor debugger 1 1 Outline 1 2 What is SOFTUNE Workbench 1 3 Procedure for Developing Programs with SOFTUNE Workbench CHAPTER 1 OUTLINE OF SOFTUNE Workbench 1 1 Outline This section gives an outline of the development tools integrated by SOFTUNE Workbench E Lang
4. is displayed State of monitoring is displayed blue on red off E Function Drag and Drop 1 Sort variables in the window If you register multiple variables in the window you can change the order of the variables by dragging a variable and dropping it into a desired place 2 Cooperation between the watch windows You can copy move the variables by dragging a registered variable and dropping it into another watch window If you drag a structure member only the member is copied to another window and the structure remains in the original window Multiple selection of variables You can select multiple variables at a time for the batch operation Available operations are as follows Copy Move by drag and drop Setting of the radix Delete On Off of monitoring 84 CHAPTER 3 Windows E Short Cut Menu Radix See Section 4 4 7 Watch If multiple variables are selected they are deleted all together Set See Section 4 4 7 Watch Element See Section 4 4 7 Watch Edit See Section 4 4 7 Watch Delete See Section 4 4 7 Watch If multiple variables are selected they are deleted all together All Delete Deletes all variables being stored from the window Inaccessible area Call up the Inaccessible area tab in the Debug environment of the Setup menu Memory window Display the memory window based on the selected variables Monitoring Swit
5. The position of the int i struct table value 16 current instruction pointer is displayed The break point position sort_val value 16 is displayed 68 Pop up display of a variable followed by its address in parentheses E Short Cut Menu Edit Update Inline Assemble Find Jump Go to Current Break point Set Reset Break point Enable Disable Break Watch Stack Set coverage Property Display coverage Mix Display Activate when stop Close Edit CHAPTER 3 Windows Opens the edit window Updates the contents of the specified window When Display coverage is turned on the display is updated with the latest coverage It is only valid while MB2141 emulator debugger See Section 4 4 3 Assembly Opens the character string search dialog Figure 3 7 2 Displays jump dialog Displays current PC location This function is to set or to cancel the break point in the line pointed by cursor To make break point in the line pointed by cursor enable or disable See Section 4 6 4 Break Point Additionally sets watch point See Section 4 6 7 Stack Please refer to Section 4 4 12 Coverage It is only valid while MB2141 emulator debugger Displays source window properties Switches on off the display of the coverage When Display coverage is turned on the executed lines are displayed in green and the une
6. Logical AND Logical OR CHAPTER 2 OPERATION Note When the comparison result is true the relational operator becomes H 1 When false it becomes H O The SOFTUNE Workbench does not support the conditional operator comma operator increment operator and decrement operator of C language CHAPTER 2 OPERATION 2 1 5 Address Formula Specification Address formula specification is divided into the addressing and address range specification E Addressing The addressing format is as follows 16 bit addressing l6 bit addressing Expression for addressing Bi Address Range Specification Address range specification representing a memory range consists of two addressings it has any of the following two formats Addressing addressing from starting address to ending address Addressing offset from starting address to starting address offset offset Value relative to addressing starting address E Bit Addressing The notation below is used to represent a bit address Symbols for bit address attributes can be also used Bit addressing is valid when BIT is specified in the command qualifier addressing bit offset bit offset Value used to specify a bit position When addressing is omitted address 0 is assumed CHAPTER 2 OPERATION 2 1 6 File Name Specification File name specification complies with Windows rules E File Name Specification
7. 16bit_PPG prj Debug EL D Source Files pes autabaat c E rel Fom_cFg asmi 2 Interrupt rautine c main PPG c i A EM startup asm veckar c Include Files Be 5 Dependencies D Hp _Femc8fx h be E extern h J 12 rel TO prj Debug J FGM rel FGM prj Debug 358 APPENDIX E Installing Monitor Debugger Changes to the application program Table E 5 Changes to the Application Program Remarks Function name Description Reset vector Change this to the monitor program start address FGM_INIT Stack area Add 4 bytes to the monitor program area Watchdog timer start Replace this with the monitor program API FGM_WDTON routine Interrupt level setting Allow UART SIO interrupt requests to be Bits 1 and 0 in the ILR1 register accepted register UART SIO interrupt Register the UART SIO interrupt service to the vector definition vector FGM INT Addition of auto boot checker Add the process of checking for auto booting 2 See I Creating an Auto boot Checker B Changing Monitor Operation Settings fgm cfg h To use Monitor Debugger you have to correct the settings of the following items to suit the application program The set values will be macro defined define to be included as the operation definition table via the monitor operation definition file fgm_cfg asm If you use symbols in place of numeric values they must be able to b
8. E Setting Method When Debug Information Existence Check for Library File Module is Inhibited 1 Select the Control Library category The library control setup dialog shown in Figure 4 5 30 opens 2 Seta check mark to the left of Don t check debug information existence in library E Setting a Library Retrieval Path 1 Select the Control Library category The library control setup dialog shown in Figure 4 5 30 opens 2 Set Search Path Clicking the Browse button to the right of the input file enables path reference 3 Click the Add button The set library retrieval path is added to the end of Search Path List 226 CHAPTER 4 MENUS E Resetting a Library Retrieval Path 1 Select the Control Library category The library control setup dialog shown in Figure 4 5 30 opens 2 Select the path you want to reset from Search Path List 3 Click the Delete button E Changing the Library Retrieval Path Retrieval Order Library retrieval paths are retrieved in turn from top of Search Path List The order in which library retrieval paths are registered in the list can be changed in the following procedure 1 Select the Control Library category The library control setup dialog shown in Figure 4 5 30 opens 2 Select the library retrieval path whose order is to be changed from Search Path List 3 Click the Up or Down button to move the cursor to a relevant position E Setting Register Bank Figure 4 5 31
9. If the timer setting number is set to 1 it is set to an unassigned number Remarks 391 APPENDIX F 17 SSDI Request Abort Request Abort Format void SSDI Request Abort char message Argument char message Abort message Return value None Explanation Requests the ISS to abort When an abort is requested the ISS aborts processing when the current instruction execution is terminated The abort message message is displayed as the abort message for the debugger Remarks 392 APPENDIX F External I F for Simulator F 18 SSDI Set Area Set Area Format int SSDI Set Area int no unsigned long start unsigned long size int attribute int id Argument int no Area setting number unsigned long start Starting address of area unsigned long size Area size unsigned long attribute Attribute int id Always set 0 Return value Area setting numbers 0 to 31 1 Error Explanation Sets the area where a read event write event or execute instruction event occurs An event occurs only upon access to the area in which an area is set Set an area by using SSDI_Init Initialize If the area setting number is set to 1 the area setting address area size is valid In other cases set the attributes for the settings in the area setting numbers Set the attributes as follows attribute Read 1 Enabled 0 Disabled Write 1 Enabled 0 Di
10. Requests abort of instruction execution B Simulator External I F Specification Function List ISS gt DLL SSDI Entry Startup SSDI Init Initialize SSDI Ready Ready SSDI End End SSDI Reset Event Post Reset SSDI Read Event Post Read SSDI Write Event Post Write SSDI Execute Event Post Execute Instruction Dy GO ON om US Sept ces SSDI Interrupt Event Post Interrupt 10 SSDI Timer Event Post Timer DLL ISS 11 SSDI Read Memory Read from Memory 12 SSDI Write Memory Write to Memory 13 SSDI Read Register Read from Register 14 SSDI Write Register Write to Register 15 SSDI Set Interrupt Set Interrupt Source 16 SSDI Set Timer Set Timer 17 SSDI Request Abort Request Abort 18 SSDI Set Area Set Area 19 SSDI Clear Cycle Clear cycle count 20 SSDI Execute MCU Execute target program 21 SSDI_GetCurrentExecuteAddr Get the Address in Execution 375 APPENDIX F 1 376 SSDI Entry Start Format int SSDI Entry int id HINSTANCE hInstance Argument int id DLL ID HINSTANCE hInstance External I F module handle Return value Return NORMAL O Returning any value other than NORMAL O causes a failure to start debugger Explanation A call is made when the debugger is started Perform necessary initialization Remarks DLL ID id always indicates 0 The external I F module handle hInstance is used to obtain an ISS entry At this point no exte
11. Start Address Specifies start address of search range End Address Specifies end address of search range Type Selects data type Byte Word Long ASCII Find Data Specifies matching data type When ASCII is selected as the data type specify a character string To search for several data items continuously when the data type is not ASCII write each item delimited by a comma Skip Data Count To search the search range continuously set 1 When a value greater than or equal to 2 is set as the skip byte count addresses are skipped for each set count and the search range is searched 159 CHAPTER 4 MENUS E Special Operation To fill memory with data or to copy data to memory start debugging click the right button of the mouse in the Memory Window to display the menu then select Special Operation from the menu The memory operation dialog opens Clicking the OK button from this dialog starts the function of the open tab Fill Figure 4 4 8 Memory Operation Dialog Fill Memory operation x Copy to emulation memory Match with emulation memory Fill Copy Start address HF305 End address HIF365 Type Byte E Fill data H 0S To fill memory with data open the Fill tag then set the start address end address data type and filling data Start Address Specifies start address of memory area to be filled with data Data filling is started at this address End Address Specifies en
12. r Break list Status Address Pass count Symbol enable 1 0 sort val 1 0 main 1 0 sample c 75 i gt Enable Disable Delete All delete Break address In this field the address that sets a break point is specified Pass count In this field the count of times the PC passes that point a particular point before causing a break is set This field is only enabled for the simulator debugger Break list A list of code break points currently being set is displayed State Enable or disable is displayed Address The set address is displayed Pass count The set pass count is displayed In the count of times the PC has passed that point by the present time is displayed Symbol The symbol given to that address is displayed Set button These buttons are used to set a break point at the specified address When an address that is already set in the break list is specified the set data of the break point at this address is changed Enable button This button is used to enable the break points in the break list currently being selected Disable button This button is used to disable the break points in the break list currently being selected The break points are simply disabled that is the setting itself of the break points is not canceled 257 CHAPTER 4 MENUS Delete button This button is used to delete the setting of the break points in the break lis
13. Condition Explanation Match whole word only Does not search partial character strings of words Effective in searching for independent words that may become parts of other words such as able Match case Distinguishes uppercase characters from lowercase characters or vice versa Regular Expression Specifies a search character string in regular expression Enables use of a wild card etc Direction Specifies a search direction Up or Down Up searches the file upward Down searches the file downward Position Specifies a search start position cursor top bottom 127 CHAPTER 4 MENUS 4 3 5 Find in Files This section explains how to search the specified file for the specified character string B Find in Files SOFTUNE Workbench searches the specified file for the specified character string and displays the search result in the output window SOFTUNE Workbench can search several files at a time A line can be immediately edited by double clicking the mouse on the line in the output window E Search Procedure l 128 Select the Edit Find in Files menu Dialog shown in Figure 4 3 3 opens Specify a character string The dialog showing the character strings in the clipboard opens Specify the file to be searched A wild card can also be used to specify the file to be searched Specify the directory to be searched Click the button to the right of the specified fie
14. Delete all bookmarks from a bookmark list Jump button Move a start position for displaying a source window to location of bookmark selected in bookmark list E Setup or Cancel of a Bookmark 1 Please put a cursor to line where you want to set or cancel a bookmark 2 Please execute any of following operations Select Edit Bookmark Setup cancel bookmark Click on Setup cancel bookmark at toolbar Find Add or delete bookmark to from Source tab in dialog bookmark E Move the Caret to the Next Bookmark 1 Please make sure that there is a cursor in a source window 2 Please execute any of following operations Select Edit Bookmark Subsequent bookmark Click on Subsequent bookmark at toolbar Find 3 If no subsequent bookmark is exist on a window proceed to the subsequent bookmark located on the next file E Move the Caret to the Previous Bookmark 1 Please make sure that there is a cursor in a source window 2 Please execute any of following operations Select Edit Bookmark Previous bookmark Click on Previous bookmark at toolbar Find 3 If no previous bookmark is existed on a window proceed to previous bookmark located on the last file E Move the Caret to the Next Bookmark in the Current Window 1 Please make sure that there is a cursor in a source window 2 Please execute any of following operations Select Edit Bookmark Next bookmark in the current window Click o
15. Option Executing Directory Browse Editor List Standard Editor Jelete m Macro define 42 t Filename Zl Line Number x Project Path OK Cancel E Editor Registration Procedure 1 Select Editor from the Setup menu The editor setup dialog shown in Figure 4 7 30 opens 2 Set a unique title that differs from the registered names 3 Specify the execution file name of the editor to be registered Clicking the Browse button to the right of this field opens the file selection dialog The execution file name of the editor can be selected from this dialog 4 Set an option 315 CHAPTER 4 MENUS 6 Macro description can be used in this field For macro description refer to Section 1 9 Registering External Editors in SOFTUNE Workbench User s Manual Write a run time directory This description may be omitted if control need not to be moved to any specific run time directory Clicking the Browse button to the right of this field opens the file selection dialog A run time directory can be selected from this dialog Click the Set button E Editor Deletion Procedure 1 2 3 Select Editor from the Setup menu The editor setup dialog shown in Figure 4 7 30 opens Select the title of the editor to be deleted from the editor list Click the Delete button E Editor Change Procedure 1 5 Select Editor from the Setup menu The edi
16. When the absolute format assemble list file is not output no other item need to be set from the absolute format assemble list setup dialog Execute Step 3 and after only when outputting the absolute format assemble list file 3 Select the module to which the absolute format assemble list is to be output from Output File Name List then set a check mark to the left of the selected module 4 Select the module to which the ROM RAM ARRAY list is to be output from ROM RAM ARRAY List then set a check mark to the left of the selected module 5 Select Display Position of Symbol and Address from the drop down list In Order Address to Symbol In Order Symbol to Address 225 CHAPTER 4 MENUS E Setting of Options for Library Control Figure 4 5 30 Library Control Setup Dialog Setup Project x General MCU C Compiler Assembler Linker Librari_4 gt Category Control Library bz Don t retrieval the default library Don t check debug infomation existence in library Search Path Target of setting MBB9W625 Search Path List Add Delete Up os ENV FETOOL MIbS836 o INROMUT OxCOOD O FFFF ta_INRAMO1 0 0080 0 027F OK Cancel Apply E Setting When the Default Library is not Used 1 Select the Control Library category The library control setup dialog shown in Figure 4 5 30 opens 2 Seta check mark to the left of Don t retrieve the default library
17. 3 Select a display position 4 Click the OK button Move to Defined Line Move to the defined line of function Perform this operation in the following procedure 1 Select the function name in the source window or move the cursor on the function name 2 Click the right button of the mouse to display the short cut menu then select Move to Defined Line from the menu 3 If the same function names exist the Resolve Ambiguity dialog is displayed then select the function name and click the OK button Figure 3 7 3 Resolve Ambiguity Dialog Resolve Ambiguity func Break Point Set Reset After moving cursor to the line where you want to set or to cancel a break point click the right button to display short cut menu Then please select Break Point Set Reset 70 CHAPTER 3 Windows Break Point Enable Disable After moving cursor to the line where break point is set to be enable or disable click right button to display the short cut menu Then please select Break Point Enable Disable This enables to switch the break point which is pointed by cursor enable or disable Watch Specifies the variable to watch and opens the watch window Perform this operation in the following procedure 1 Click the right button of the mouse in the source window to display the short cut menu then select Watch from the menu See Section 4 4 7 Watch 2 Specify a variable name 3 Select a mode as requir
18. Close all windows closes all currently open windows other than the Project and Output Windows If the file edit window being edited has not saved yet the dialog asking you whether to save the window opens The file opened by the external editor cannot be closed by this function Even if all windows are closed the SOFTUNE Workbench state remains unchanged For this reason register values etc are not affected even during debugging 326 4 9 Help CHAPTER 4 MENUS Help displays online help E Online Help Help Topics Support Information E Version Information Version Information 327 CHAPTER 4 MENUS 4 9 1 Help Topics Help Topics retrieves help items according to keywords E Contents Contents hierarchically displays online help contents It is used to search the contents for the item to be searched B Keyword SOFTUNE Workbench searches the help file for the directly specified item 328 CHAPTER 4 MENUS 4 9 2 Support Information Support Information opens the attached support information file in the Edit Window E Support Information Support information provides the information not written in the attached manual Please read through support information once before using SOFTUNE Workbench 329 CHAPTER 4 MENUS 4 9 3 Version Information About Fs896s displays SOFTUNE Workbench version information E Version Information Display when SOFTUNE Workbench is not in
19. Tab Figure 4 7 19 Debug Environment Setup Dialog Tab Setup debug environment Tab Specifies the Tab D 4 D 8 CHAPTER 4 MENUS 299 CHAPTER 4 MENUS Error output Figure 4 7 20 Debug Environment Setup Dialog Error Output Setup debug environment In GUI Operation Specifies an error output type at GUI operation In Command Operation Specifies an error output type at command operation In Batch Operation Specifies an error output type at batch operation Error Output Level Sets the output type when several errors occur 300 CHAPTER 4 MENUS Load Figure 4 7 21 Debug Environment Setup Dialog Load Setup debug environment x Execution Step execution Watch Radix Monitoring Directoy Tab Error output Load r Specification batch file before after load Before Browse After Browse Only debug information v Auto mapping Cancel This sets the environment when loading a target file registered in the project Specification batch file before after load Before This specifies the batch file to execute prior to the loading of the target file This can be changed using the Debugger s setup wizard After This specifies the batch file to execute after the loading of the target file This can be changed using the debugger s setup wizard Only debug information This specifies whether or not to load only the debug information
20. drive name directory path name file name extension When drive name is omitted the current drive is selected CHAPTER 2 OPERATION 2 2 Starting and Terminating SOFTUNE Workbench This section explains how to start and terminate SOFTUNE Workbench E Starting SOFTUNE Workbench With SOFTUNE V3 to start SOFTUNE Workbench double click the F MC 8L Family SOFTUNE Workbench icon in the SOFTUNE V3 group When this program is started for the first time with SOFTUNE Manager V01 or V02 installed the dialog is displayed which asks whether or not to take over information for Setting editor Setting tools and Setting error jump set in the previous version To take over the information click the Yes button Not to take over it click the No button E Terminating SOFTUNE Workbench To terminate SOFTUNE Workbench select Exit from the File menu or click the x button above and on the right of the window SOFTUNE Workbench cannot be terminated when compile assemble make build or tool is being executed Be sure to terminate SOFTUNE Workbench after compile assemble make build or tool has been terminated or suspended CHAPTER 2 OPERATION 2 3 Creating Workspace Workspace is follow the ste necessary to store projects in SOFTUNE Workbench to register project ps below E Creating of Workspace S OFTUNE Workbench uses the following methods to create workspace Creating workspace in creating new proje
21. 290 CHAPTER 4 MENUS Event MB2141 Figure 4 7 11 Debug Environment Setup Dialog Event Setup debug environment Event Mode Specifies an event mode Single Trace Specifies the normal mode Multi Trace Specifies the multi trace mode Performance Specifies the performance mode 291 CHAPTER 4 MENUS Watch Figure 4 7 12 Debug Environment Setup Dialog Watch Setup debug environment Watch Mode Automatic Sets the watch mode automatically according to the analysis result C Language Sets the C language mode interpretation as C language expressions Assembler Sets the assembler mode interpretation as assembler expressions Data Size Sets the display size in the assembler mode Byte word long single precision double precision Memory Buffering Enable In case of variables as arrays or structures the memory of whole variables is read They are accessed by size of the top variable Disable The default of this control is Enable If Disable is selected the watch window and the local window may be displayed slowly In case of variables as arrays or structures the memory of each element and member unit is read 292 CHAPTER 4 MENUS Specified number of array element Enable Debugger displays a warning dialog in case of array element larger than the number of limited array element when you registering or expanding an array with a watch variable Element Specifies number
22. 4 Click the Set button 211 CHAPTER 4 MENUS The specified macro name is set as a define D option 5 To set the specified macro name as an undefine U option reset the check mark of the macro name from Macro Name List Note When undefine is set both the define and undefine options are output for the same macro name This causes no problem because the undefine option precedes the define option E Resetting a Macro Name 1 Select the Define Macro category The macro name setup dialog shown in Figure 4 5 16 2 Select the macro name to reset from Macro Name List 3 Click the Delete button E Setting an Include Path Figure 4 5 17 Include Path Setup Dialog Setup Project LX General MCU C Compiler Assembler Linker Librari 4 Category Include Path omman iri Include Path APRIPATH el Include Path List Add Delete o down include Target of setting MB89w 625 OK Cancel Apply 1 Select the Include Path category The include path setup dialog shown in Figure 4 5 17 opens 2 Specify the include path Clicking the Brows button to the right of the input field enables directory selection 212 CHAPTER 4 MENUS 3 Click the Add button The specified include path is added to the end of the Include Path List E Resetting an Include Path 1 Select the Include Path category The include path setup dialog shown in Figur
23. For details on syntaxes refer to Section 1 7 Error Jump Function in SOFTUNE Workbench User s Manual 3 Enter a comment as required A comment can be added to each syntax 4 Click the Set button Figure 4 7 31 Error Jump Setup Dialog Setup Error Jump x Syntax Comment Syntax List SYSTEM f 1 h DEBE SYSTEM h fi aan SYSTEM 1 ff Up Down Apply Macro define cf File Name Zl Line Number zh Help Keyword Any String Char Some Characters Char t or DK Cancel E Syntax Deletion Procedure 1 Select Error from the Set menu The error jump setup dialog shown in Figure 4 7 31 opens 2 Select the syntax to be deleted from the syntax list 3 Click the Delete button 317 CHAPTER 4 MENUS il Syntax Modification Procedure Modify a set syntax in the following procedure 1 Select Error from the Set menu The error jump setup dialog shown in Figure 4 7 31 opens 2 Select the syntax to modified from the syntax list The syntax and comment are displayed in the associated fields 3 Modify the syntax and comment then click the Set button The modified syntax and comment are newly set 4 Delete an unnecessary syntax syntax used before modification B Analysis Order Change and Application ON OFF Analysis order change Error messages are analyzed from the patterns registered in the upper part of the syntax list To assure
24. Inquiry for save at close workspace When a check mark is set to the left of this item SOFTUNE Workbench asks you whether to save the currently open file to the workspace file when the workspace is closed 280 CHAPTER 4 MENUS Inquiry for save at compile assemble When a check mark is set to the left of this item SOFTUNE Workbench asks you whether to save the file currently being edited before compile assemble Figure 4 7 2 Development Environment Setup Workspace Dialog Setup Development m MM mo I Termination messages are highlighted at make build When this item is checked the display color of termination messages abort no error warning error fatal error or fail during start during Compile Assemble Make or Build can be changed To change the display color click the Detailed optimize button at the right of this field the termination message display color dialog is displayed Figure 4 7 3 Change the display color 281 CHAPTER 4 MENUS Figure 4 7 3 Display Color of Messages Dialog Display color of messages x Display color Abort No Error mm Warning mm Enor Fatal Error Fail During Start m Cancel Close the edit window when debugging By checking this item on a box edit window which opens as debugger is started will be closed 282 CHAPTER 4 MENUS 4 7 2 Debug Environment Debug Environment sets the debug environment it
25. Replace Find in Files Jump Bookmark Set Standard Editor Status Bar Property Source Window Copies the selected character string to the clipboard Pastes the character string in the clipboard to the cursor position Deletes the selected character string Selects all characters in the buffer Prints the file Adds the file being edited to the active project Opens the character string find dialog Opens the character string replacement dialog See section 4 3 5 Find in Files Opens the jump line number specification dialog See Section 4 3 7 Bookmark See Section 3 6 1 Setting Standard Editor Switches status bar display for each window Display file information properties 1 Click the right button of the mouse to display the short cut menu then select Source Window from the menu When SOFTUNE Workbench is in the debug session the Source Window is displayed See Section 3 7 Source Window When SOFTUNE Workbench is not in the debug session this menu cannot be selected Undo 1 Click the right button of the mouse to display the short cut menu then select Undo from the menu SOFTUNE Workbench cancels the last editing and undoes the status before the editing See Section 4 3 1 Undo Redo Redo 1 Click the right button of the mouse to display the short cut menu then select Redo from the menu SOFTUNE Workbench cancels the last editing See Section 4 3 1 U
26. See Section 4 4 6 Local Memory window Display the memory window and setup bookmark Property Displays symbol properties Close Closes local window Memory window When selected the following two submenus are opened Jump Display memory window by using selected address of variable Add bookmark By using selected variable address bookmark will be added to memory window For details See Section 4 3 7 Bookmark Property Information for the variable is displayed For details see Section 4 3 9 Property 83 CHAPTER 3 Windows 3 13 Watch Window This window is displayed only when SOFTUNE Workbench is in the debug session The watch window is used to display and modify the values of the specified variables Variables are displayed in the tree format E Watch Window The watch window can be opened independent 4 windows The watch window can be specified when the variables for each window is registered Figure 3 13 1 shows an example of the watch window Figure 3 13 1 Example of Watch Window mm of x DJ a H 00 A normal variable is displayed esas 3 lt D 0 struct A structure variable is displayed H 00001418 H 30 H 00000458 Structure members are displayed The value of a pointer variable is H O000FFZS8 displayed struct struct An array variable is displayed Each element of the array variable
27. Specifies frame number corresponding to Trace Window B Save Select Save from the short cut menu Save the trace data to the specified file Figure 4 4 24 Save Trace Data Dialog Savein E Poet OOOO i e PV EK e File name samplelog O Save as type Loggina log Cancel Li 175 CHAPTER 4 MENUS When specifying a file name specify an existing file and select whether to save or not Figure 4 4 25 Save Dialog Select whether to add and save when selecting Yes Save Selecting No does not save trace data to the file Figure 4 4 26 Add Save Dialog Softune896 Selecting Yes Add Save adds and saves trace data to the file Selecting No saves trace data to in the file 176 CHAPTER 4 MENUS 4 4 9 Command Command displays the Command Window E Command A debugger command can be entered and executed directly from the displayed Command Window The command execution result is also displayed in the Command Window For the supported debugger commands refer to SOFTUNE Workbench Command Reference Manual 177 CHAPTER 4 MENUS 4 4 10 Tool Bar Status Bar Tab Tool bar sets display items Status Bar or Tab switches display to nondisplay or vice versa E Tool Bar Any of the following tool button sets displayed in the tool bar can be selected Common bar Find Debug Flag Flash Build Project For the buttons included in the above sets see S
28. To create a new workspace select Workspace Project File When the New dialog for project is opened select the Workspace tab Figure 4 2 2 Set the basic items regarding workspace to be created For details about the setting procedure see Section 2 3 Creating Workspace 106 CHAPTER 4 MENUS Figure 4 2 2 Project New Creation Dialog Workspace Blank works H Softune lt BIN E Creation of New Project To create a new project select Workspace Project File J When the New dialog for project is opened select the Project tab Figure 4 2 3 Set the basic items regarding project to be created When creating a new workspace in creating a new project see Section 2 3 Creating Workspace and when adding to a existing workspace see Section 2 4 Storing of Project 107 CHAPTER 4 MENUS Figure 4 2 3 Project New Creation Dialog Project MCU chage MBS9051 v w C Softune Jin Dependencies areri pK Cancel E Creating Source File and Document Files Etc To create a source file and document file etc select Text File from the new creation dialog The editor is started in the status in which a new file is created 108 CHAPTER 4 MENUS 4 2 2 Open Open opens existing files Selecting Open from the file menu opens the open dialog asking the file you want to open Figure 4 2 4 E Open Dialog Selecting Open from the file menu o
29. When selected the following two submenus are displayed Individual Setting A project is set See Section 4 5 5 Setup Project Return to Common Setting All individual options in the specified folder are returned to common options Make Build Making or building is performed in the active configuration of the currently selected project to create a target file Delete The selected folder and all files in the folder are deleted from the project The files themselves are not deleted If the files RCF files that cannot be deleted are included the folder is not deleted Property Information on folders is displayed see Section 4 3 9 Property ii Short Cut Menus Click the Right Button of the Mouse on a Dependencies Category Figure 3 4 10 shows a short cut menu Figure 3 4 10 Short Cut Menu on a Dependencies Category Make Build Property Make Build Making or building is performed in the active configuration of the currently selected project to create a target file Property Information on folders is displayed see Section 4 3 9 Property E Short Cut Menus Click the Right Button of the Mouse on a Debug Category Figure 3 4 11 shows a short cut menu Figure 3 4 11 Short Cut Menu on a Debug Category Add Setup gt Property Add Setup When selected the following two submenus are displayed New When selected the Create New Setup dialog Figure 3 4 12 is opened Enter the set
30. click the No button Clicking the Cancel button cancels file open operation 109 CHAPTER 4 MENUS Bl Opening the Binary File Specify the start address for binary data read in Start Address Bl Opening the Batch File Setting Run in Icon State starts batch processing in the icon state 110 CHAPTER 4 MENUS 4 2 3 Close Close closes open files and windows E Close Close closes the files open in the Edit Window or debug windows e g Register Window Edit Window When an unsaved modified file is in the Edit Window the dialog for asking the operator whether to save the file opens Yes button Saves the file using the existing file name No button Does not save the file and closes the Edit Window Cancel button Cancels the close operation Debug windows e g Register Window SOFTUNE Workbench closes debug windows immediately 111 CHAPTER 4 MENUS 4 2 4 Open Workspace Open Workspace opens the existing workspace file il Opening the Existing Workspace File 112 The file dialog for selecting the file you want to open opens When the existing workspace file has been already opened and SOFTUNE Workbench is in the debug session The dialog for asking the operator whether to terminate debugging opens OK button Terminates the debugger and continues workspace open processing Cancel button Cancels workspace open processing When the existing workspa
31. is opened Figure 4 5 34 Setup ROM RAM Area Name Dialog ROM RAM Area Name fo Area Attribute RAM E Start Address End Address 2 Specify a ROM RAM area name Specify the ROM RAM name that differs from the set names 3 Select ROM or RAM as Area Attribute 4 Specify a start address and end address starting address and end address of ROM RAM area 5 Click the OK button The specified ROM RAM area is registered in ROM RAM Area List In Auto Disposition Mode 2 the linker searches an available ROM RAM area beginning at the top of the ROM RAM Area List Click the Up button or the Down button to move to a proper position 231 CHAPTER 4 MENUS E Deleting a ROM RAM area 1 Select the ROM RAM area you want to delete from ROM RAM Area List 2 Click the Delete button E Method of Outputting Warning When ROM RAM area is Specified Outside Range of Internal ROM RAM 1 Puta check mark in the checkbox When a ROM RAM area is specified beyond the internal ROM RAM range the warning is issued When an area outside the internal ROM RAM area is specified in the dialog a warning dialog is displayed When an area outside the internal ROM RAM area is set a warning is output at linking Bi Method of Outputting Warning When Section is Placed Outside Specified ROM RAM area Range 1 Put a check mark in the checkbox When sections are arranged beyond the range of specified ROM RAM area the warning is issued W
32. then click the Set button Repeat this operation Sections are allocated in the specified order For how to change this order see the next changing the section allocation order E Changing the Section Allocation Order 1 Click the Set Section button The section setup dialog shown in Figure 4 5 33 opens Specify the area you want to change in ROM RAM Area Name When an address is directly specified select Addressing The sections to be allocated to the area or address are displayed in Section Name List Select the section name whose order is to be changed then click the Up or Down button to move the cursor to a relevant position For addressing also see Notes in addressing in the next item E Notes in Addressing Examples of relationship between descriptions in Section Name List and the linker options to be generated are given below Pay special attention when changing the section allocation order 230 CHAPTER 4 MENUS Example 1 When descriptions in Section Name List are as follows secl H 1000 sec2 sec3 H F000 sec4 The following sections are generated sc secl sec2 H 1000 sc sec3 sec4 H F000 Example 2 When the sec4 allocation order is changed as follows sec1 H 1000 seca sec4 sec3 H F000 The following sections are generated sc sec 1 sec2 sec4 H 1000 sc sec3 H FO00 E Defining the ROM RAM area Click the Add button The Setup ROM RAM Area Name dialog Figure 4 5 34
33. 0X0 address 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF01234 Display tab This line is not scrolled Measured address Count of access Unaccessed 1toF Accessed count in 16 addresses All 16 addresses were accessed Coverage rate Figure 3 17 2 Coverage Window 1 Address Unit E Coverage Jof x address 00 01 02 03 04 05 06 07 08 09 04 0B 0C 0D 0E 0F 10 CO amp Measured address Count of access 1 Unaccessed Addressed Coverage rate Display tab This line is not scrolled 95 CHAPTER 3 Windows B Function 96 Drag and Drop By dropping variable name function name label or address from source window to window display will be jumped to a location where an address of dropped character string E Short Cut Menu Refresh Jump Source window 16 Address Unit Address Unit Set Total Coverage Rate Clear Close Refresh Coverage Window display Opens the jump dialog Display the source window based on the address of cursor position In case the line numbers corresponded to address are not existed disassemble window will be displayed Displays the coverage measurement result in the unit of 16 addresses Displays the coverage measurement result for each address See Section 4 4 12 Coverage See Section 4 4 12 Coverage Clears the coverage measurement bu
34. 23 uiti etae rte aque ribi t e ear nt eae etat 112 4 2 5 Close WORKS ACCS 6 s eee tet tetas merde Eee cage trist eio deri Uber tesvar a MR eI Seu tppbe oed 113 4 2 6 DAVE EP 114 4 2 7 REM Pam 115 4 2 8 SAVES All PERLE 117 4 2 9 aS 118 4 2 10 Recent Text File Recent Workspace File ssssseee eee enne 119 AQAA d e M 120 4 3 Edt MEMI cuiii DIR BIG 121 4 3 1 Undo REO isti alee totes UE a dd 122 4 3 2 Gut Gopy Paste Delete eire card treten rhe o epa Ee e Toad arva aaa aepo d ea EB Y e de quas 123 4 3 3 All Selecte ss oto e ehe aet dutch matita bem ier roses I LEM 125 4 3 4 Find Fleplace 4n e a ts e ten ette 126 4 3 5 Firid Ini Elles sitet tare tet aive D utate isst te v IPSE 128 4 3 6 Nero xc cc 129 4 3 7 Bookmark istic mI 130 4 3 7 1 Bookmark Source window ssssssssssssssssseeeeeen nennen nnne nnns 131 4 3 7 2 Bookmark Memory WIndOW i c tt eerte aer qo ey e t eg dvo 134 4 3 7 3 Bookmark Edit window eiie ete tente ete e noes Ree LUE Ce de D He Quae Re dean 137 4 3 8 Previous error Next error Top of Error Bottom of Error 139 4 3 9 PIODOILtVo esed ete ee peru reete Er Re CD eee ef HERES ER RU E DERE EU MER CER FERE AE 140 4 3 9 1 Property Project Window ccia eriein ieiti eE Eia E nennen nennen eren EEEE inne 141 4 3 9 2 Property Edit Window esseessesesseeeseeeseeeen nennen nennen tenent rin nnn ener i
35. 4 5 11 Correspondence between External Interrupts and ICRs Correspond Interrupt and E3 Vector ted 207 CHAPTER 4 MENUS Setup CPU Information Internal RAM Area Figure 4 5 12 CPU Information Setup Dialog Internal RAM Area Setup CPU Information Start Address Sets start address of internal RAM area End Address Sets end address of internal RAM area Setup CPU Information Standby Control Register Figure 4 5 13 CPU Information Setup Dialog Standby Control Resister Setup CPU Information Address Sets STBYC address E Setting of MCU Change Dialog 1 Click MCU change button The MCU change dialog shown in Figure 4 5 10 opens 2 From Current file choose the CPU information file to be used If a CPU information file to be used is not found add it with the Add button for CPU information file list The MCU list for the selected CPU information file appears in Chip and Target MCU 208 CHAPTER 4 MENUS 3 Choose the MCU to be changed from the Chip and Target MCU and click OK button The change you specified takes effect Figure 4 5 14 MCU Change Dialog Chip Target MCU pem Fuca zl MB89051 CPU information file list E Softune Lib 896 896 csv Current file Choose the CPU information file to be used The MCU list for the selected CPU information file appears in Chip and Target MCU Chip Choose a chip type Target MCU Ch
36. 5 2 ebrii radari iaieiiea eden tin E edie lene en ei 193 4 5 2 1 Add Project Create sssssssssssssssssessseee senses nnne enn sns nnns entres nens intret inns senten tnn 194 4 5 2 2 Add Project Existing Project sssssssssssseeeeneeeenenee enne nene 196 4 5 8 Pe BUCO 197 4 5 3 1 Add Member Elle c ete ete ni Ente dette 198 4 53 2 Add Member Directory teer e aed erede ee Ete 199 4 5 4 Set p WOrKS PACS Rm 200 4 5 5 Setup Project c E 201 45 551 General evasive ithe pe OA eh evens eat Laan ees LU Uu 204 4 5 5 2r MCOULa EES A x een Ead om Mer tL M beendet ee cert M ose ere reece 206 4 5 5 3 Setting C Compiler Options epe eee mtr aaa aE EAA aAa EPEa a EEEE Ea 210 4 5 5 4 Setting Assembler Options sss nnne nennen entretenir nnns 217 4 5 5 5 Setting Linker Opgoss aniio aa aa aeaa a a tnter enisi nnne nnns 222 4 5 5 6 Section Disposition Connection Specifying sse 228 4 5 5 7 Setting Librarian Options uacua greet oec ex dre Dre asd v e eaa Ghee 233 4 5 5 8 Setting Converter Options riesi etie ere dete eti C terere ne bna 235 4 5 5 9 Setting Debug Options ssssssssssssssssseseeeenen enne nre inneren sitter enn snnt nnns 238 4 5 6 Setting Customize Bulld 2 io entre Er eame tiet eee Ee CU a EIU e Elide i o 241 4 5 7 Project Dependencies i iie emet eai quic lg ape Pee e E Ee bes 245 4 5 8 Project Configuration 1 poste
37. ALIAS In line expansion of function below the specified number of lines x auto In line expansion of specified functions x E Setting In line Expansion of Specified Functions 214 1 Select the Optimization category The Set Optimization dialog See Figure 4 5 19 opened Set General purpose Optimization Level to any values other than 0 and click Detail optimize button Specify Function name Click the Set button CHAPTER 4 MENUS E Canceling In line Expansion of Specified Functions 1 Select the Optimization category The Set Optimization dialog See Figure 4 5 19 opened 2 Sets General purpose Optimization Level to any values other than 0 and click Detail optimize button 3 Select the function name to be deleted from List of function 4 Click the Delete button Note If an optimization level is changed options set in the Detail Definition Dialog are initialized according to the optimization level E Setting of Options Included in Language Specifications Figure 4 5 20 Language Specification Option Setup Dialog Setup Project x General MCU C Compiler Assembler Linker Librari gt Target of setting Vgesweos z Category s Common pion Language specification Treat floating point numbers for which suffixes not specified In line expansion of the function which qualified by interru Treat as amp volatile the va
38. Bookmark By selecting Edit Bookmark Bookmark dialog as shown in Figure 4 2 6 will be opened This dialog is to indicate the list of bookmark set in source window Figure 4 3 6 Bookmark Dialog Source Window Source Memory Bookmark position Ds oftune sample 8SB Projectsample c 71 Bookmark list Delete All delete sample c 12 D Softune sample 8964Project sample c sample c 66 D Softune sample 8964Project sample c Jump Hh Bookmark position This is a field to specify the position to set a bookmark Entering relative path function name or label name into the field can specify position of bookmark Bookmark list The list of bookmark which is currently set in a source window will be displayed Name Name of bookmark will be displayed Name of bookmark will be appeared as line number or symbol name Position File name of which bookmark is set will be displayed Line Line number where bookmark is set will be displayed Symbol Symbol which is allocated to bookmark name will be displayed If a symbol is allocated Bookmark position will be updated based on debug information although the line number of symbol changes along with the change in file Please refer to Note for allocatable symbol 131 CHAPTER 4 MENUS Add button Set a bookmark to a location specified by Bookmark position Delete button Delete selected bookmark from a list All delete button
39. Customized Build Project Dependence Project Configuration Include Dependencies Compile Make Build Stop Debug Run Abort Reset MCU Break point 103 CHAPTER 4 MENUS Break Point Set Reset Event Sequence Stack Time Measurement Call Clear Call Vector Load Target File Start Debug Terminate Debug Setup Development Debug Environment Memory Map Flash area control Tool Keyboard Editor Error Start Tool Window Cascade Vertical Horizon Split Arrange Icons Refresh Refresh All Windows Close All Windows Help Help Topics Support Information About Fs896s 104 4 2 File Menu CHAPTER 4 MENUS File Menu of SOFTUNE Workbench has the following functions Workspace and file accessing Printing End of SOFTUE Workbench E Functions Related to Project and File Accessing The project and file accessing functions are as follows New Open Close Open Workspace Close Workspace Save Save As Save All Recent Text File Recent Workspace File E Other Functions Other functions are as follows Print Exit 105 CHAPTER 4 MENUS 4 2 1 New New creates a workspace project and file newly Selecting New from the file menu opens the new creation dialog asking the operator whether to create a workspace project or text file Figure 4 2 1 E New Creation Dialog Figure 4 2 1 New Creation Dialog e Cancel E Creation of New Workspace
40. Data storage area Return value 0 Normal end 0 Error Explanation Writes data to registers Remarks The register number is defined in the include file SSDI REGISTER H SSDI_REGISTER H is installed X Y Y Y LIB 896 SSDI folder X YYY It is the drive amp folder which it installed SOFTUNE in 389 APPENDIX F 15 SSDI Set Interrupt Set Interrupt Source Format int SSDI_Set_Interrupt int int_no int sw Argument int int_no Interrupt number int SW Interrupt state 0 OFF Z1 ON Return value 0 Normal end 0 Error Explanation Sets the interrupt state If an interrupt is accepted the call back SSDI_Interrupt_Event is called Remarks If the interrupt state is set ON an interrupt request always occurs Set the interrupt state OFF in the timing in which the interrupt source flag is cleared 390 APPENDIX F External I F for Simulator F 16 SSDI Set Timer Set Timer Format int SSDI_Set_Timer int no unsigned long cycle int sw int id Argument int no Timer setting number unsigned long cycle Cycle count int SW Condition 0 Repeat 1 Only once int id Always set 0 Return value Timer setting numbers 0 to 31 1 Error Explanation Generate a timer event after an elapse of the set cycle count after the timer is set There are two timer setting conditions repeat and only once To clear the timer setting set the cycle count cycle to 1
41. Display the dialog Select View Customize Bar Setting to display the Customize Bar Setting dialog Figure 5 1 11 Number Select the number to be registered in the customize bar Kind Select Menu Entry Enter the Workbench menu to register in the customize bar Specify with the Menu List dialog Figure 5 1 7 displayed when you click the reference button on the right Add Check the input contents of 2 to 4 If they are correct click Add This completes the registration of Workbench menus The registered contents are displayed in File List and are restored when the Workspace is opened Figure 5 1 11 Setting Dialog Menu CHAPTER 5 Add in Module Customize bar Setting Dialog C Softune Initialize pre RunBreak SetupDbgenv NPTEPAD 343 CHAPTER 5 Add in Module 5 1 3 3 Registering External Tool This section describes how to register the external tool in the customize bar E How to Register External Tool 344 1 Display the dialog Select View Customize Bar Setting to display the Customize Bar Setting dialog Figure 5 1 12 Number Select the number to be registered in the customize bar Kind Select Tool Entry Enter the external tool to be registered in the customize bar Specify with the Select Tool Dialog Figure 5 1 8 displayed when you click the reference button on the right Select tool dialog shows the contents tools that are set wit
42. Keyword List Click Delete button Click the OK button The keyword files is changed When not setting other items click the OK button When selecting a display function set all the related items then click the OK button E Customization Procedure Initialization of Keyword 1 Click the right button of the mouse in the edit window to display the short cut menu then select Customize from the menu The standard editor dialog shown in Figure 3 6 2 opens Click View2 tab to choose the keyword type to be changed from the combo box Click Detail button The keyword dialog shown in Figure 3 6 4 opens 3 Click Reset button 66 Click the OK button The keyword files is changed When not setting other items clock the OK button When selecting a display function set all the related items then click the OK button Figure 3 6 2 Standard Editor Dialog Standard Editor Ea View View ltem View w Ret Tab Bookmark El v EOF EE Line Number Error mm vRuler v ap Maik Emphasis Characters VIC Keywor Ld wjASM Keyword C E Assembly Li Tab Size 4 E Fort Cancel CHAPTER 3 Windows Figure 3 6 3 Standard Editor Dialog View2 Standard Editor include int 67 CHAPTER 3 Windows 3 7 Source Window The source window displays the source program
43. MBEsw625 0 BJS Browse Listfile Directory MBESWEZE LSTS O00 Browse Cancel Apply Remove this file from target of build The file selected in the tree view is removed from the Make Build target This item can be set when C source file Assembler source file Library file Object file or Relative file is selected Project The full path to the project file is displayed 204 CHAPTER 4 MENUS Project Type Set the type of project file selected in the tree view absolute ABS relative REL library LIB If the REALOS ABS type is selected the project type cannot be changed This item can be set when the project file is selected singly The project type cannot be set for each configuration Target File Name Set the main file name of the file This item can be set when only Project two or more items may be set is selected Target File Directory Set the directory of the target file This item can be set when only Project two or more items may be set is selected Object File Directory Set the output directory of the object file output in compiling or assembling This item can be set when only Project two or more items may be set is selected List File Directory Set the output directory of the list file output in compiling assembling or building This item can be set when only Project two or more items may be set is selected 205 CHAPTER 4 MENUS 4 5 5 2 MCU
44. OPERATION Data and Address Formulas Numerical Constant The SOFTUNE Workbench provides numeric constants as the terms of data and address formulas An integer or floating point number can be written as a numerical constant B Integer When writing an integer specify a specifier B Q D H Ox representing the radix of the numerical value If no specifier is specified the radix specified by the default is used The default radices are determined for each of the locations from which values must be entered For details see each dialog The numerical value representation range is from 0 to H FFFFFFFF However this range is further restricted depending on the values to be entered The minus values are represented such as D 1 Example Binary constant B 1010 Octal constant Q 1267 Decimal constant D 1800 Hexadecimal constant H 12AF or 0x12AF Note No blank is allowed between a specifier and a numerical value E Floating point Number The following two floating point numbers are supported Single precision floating point number S float Double precision floating point number D double long double The internal format and size comply with the floating point number type handled by the C compiler F dld d j STD Fl d d specifies an unsigned decimal number Nearest value rounding applies to input values If the represented value is not a normalized number a warning message is display
45. Register value rrooooocra Cancel Register name Specify a register name Register value Specify the value set in a register 156 CHAPTER 4 MENUS 4 4 5 Memory Memory displays the Memory Window E Displaying Memory Data When the Memory Window is opened memory data dump is displayed starting from the specified address Memory data can be also modified using the short cut menu This function command can be used only when SOFTUNE Workbench is in the debug session When the Memory Window has been already opened The Memory Window is activated When the Memory Window is not opened The dialog for specifying the display start address Figure 4 4 4 opens Figure 4 4 4 Dialog for Specifying Display Start Address Position fHro000c120 Cancel window Memory Type Specify the type of display start position Line number Address Frame Position Display disassembling from the position specified in the above type Window To specify the window where jump is implemented For details see Section 4 3 6 Jump If it is a disassemble window default will be shown as Memory E Changing Memory Data Memory data can be changed by rewriting the displayed dump value directly When a character string is entered from the ASCII character string display field the ASCII code of each character is set automatically in the corresponding address The address where the memory dump is to be started can be
46. Setup I O port Port Address Specifies a port address Mask Data Specifies address mask Only the addresses whose bits are 1 are to be compared Data Size Specifies a data output type When Binary is selected specify its size Byte Word Long Output Type Specifies a port data output destination Output Port List Displays the currently specified ports Output terminal When an output request is issued during program execution with Output Type set to Terminal in output port setting the Terminal Window is displayed The output type also depends on Data Type 286 CHAPTER 4 MENUS Figure 4 7 7 Output Terminal Window Binary 8 Terminal of x 81235456789 K HRBCDEFGHIJKLHMNOPQ 80123456789 5 lt gt 7 ABCDEFGHI JKLMNOPQ 4 4 E Resetting an Output Port 1 Select the output ports you want to reset from Output Port List 2 Click the Delete button 3 When resetting all the selected ports is completed click the Close button 287 CHAPTER 4 MENUS 4 7 2 2 Interrupt This section explains the interrupt setup procedure Setting an Interrupt 1 When the interrupt setup dialog shown in Figure 4 7 8 opens set an Interrupt number 2 Select an Request timing One Time or Interval can be selected 3 Set the Cycle count 4 Click the Append button The set interrupt number issuance timing and interrupt cycle count are displayed in Interrupt Lis
47. The following can be selected as TYPE Line number Address Frame The following can be selected as WINDOW Source Window Memory Window Disassemble Window Figure 4 3 5 Jump Dialog Debug Type address bal Position main Cancel Window Source i 129 CHAPTER 4 MENUS 4 3 7 Bookmark It is convenience in setting a bookmark for referring the location specified for source memory and edit windows often Once a bookmark is set there will be a mark on specified location This enables to jump to the specified location by using menu or key operation Bookmark will be validated until it is canceled B Bookmark Bookmark is a function to specify the location in window and enable to jump to the location by using menu or key operation Bl Compliant Window Bookmark is valid in following windows Source window Memory window Edit window E Bookmark Menu Menu related to bookmark is located at Edit Bookmark in a menu Submenu consists of 7 types as follows Menu becomes valid when it is in debug session or each window is activated Bookmark Setup cancel bookmark Next bookmark Previous bookmark Next bookmark in the current window Previous bookmark in the current window Clear all bookmarks in the current window 130 CHAPTER 4 MENUS 4 3 7 1 Bookmark Source window This section explains the operation when source window is activated To Display a Dialog
48. This button is used to delete the setting of all the break points in the break list E Setting and Resetting a Break Point In the Source or Assembly Window a break point can be easily set at the address indicated by the cursor The break point set at the address indicated by the cursor can be also reset easily Set and reset this break point as follows Select Break Point Set Reset from the Debug menu The break point is alternately set and reset each time Break Point Set Reset is selected Click the left button of the mouse in the break point display field of each window The break point is alternately set and reset each time the left button is clicked 261 CHAPTER 4 MENUS 4 6 4 1 Break Point Details Setting Setting of break point details is explained here E Details of Data Break Point For MB2146 09 Figure 4 6 6 Data Break Point Details Dialog Data break point details x Attribute Break address H 0085 v Read VV Write Data v Data valid Data Haa Watch break v Link Code address HSI 2 Break address In this field the address that sets a break point is specified Attribute The attribute at the time of data access is specified Data valid This checks when the data watch is specified in the break point condition Data In this field data at the time of data access is specified Link This checks when the link is used as the data monitoring break
49. This section explains the items that can be set MCU in the Setup Project dialog E Setting of MCU 1 Click the MCU tab in the Setup Project dialog 2 Set the following items as needed Chip Classification Target MCU Set CPU information MCU Change Figure 4 5 9 Setup Project Dialog MCU Setup Project C Compiler Assembler Linker Libra eL MBS9W625 RI sample prj fav SA CPU main Chip Classification Selects the type of chip Target MCU Select the target MCU of the chip type selected in Chip Classification Set CPU Information The Set CPU Information dialog is opened MCU Change Open MCU Change dialog 206 CHAPTER 4 MENUS E Setting of CPU Information Setup CPU information IRQ and ICR Figure 4 5 10 CPU Information Setup Dialog IPQ and ICR Setup CPU Information Ea Internal RAM Area IRO and ICR Standby Control Register Specify external interrupt and correspond ICR Relationship between Vector and ICR The correspondence between external interrupts Vector and the interrupt control register ICR varies with the target MCU This correspondence is specified by the simulator debugger Setting Correspondence between External Interrupts and ICRs Set the interrupt control registers ICRs corresponding to vector numbers When a vector number is selected and the Change button is clicked the dialog shown in Figure 4 5 11 opens Figure
50. UCKO Serial clock input pins Connected to the flash programmer Connected to the flash programmer The pin must be supplied with Vcc Supply voltage feeder pin power from the system at a voltage that enables flash memory pro gramming Vss GND pin Connected to the flash programmer The settings may vary depending on the flash programmer used Using a microcontroller with a monitor program already programmed 368 Additional programming is not required 1 unless the monitor program is erased Note that except the MOD and P13 pins the Monitor Debugger connection pin and flash programmer connection pin are common You should therefore configure your system such that the MOD and P13 pins are reconfigurable When the application program is modified the debugger performs loading APPENDIX E Installing Monitor Debugger E Provided Sample Programs The following files are provided as the monitor program and sample application program Table E 11 List of Provided Sample Programs Monitor program File name fgm_cfg asm Description Monitor operation definitions Folder name 16bit_PPG FGM rel Monitor program main routine 16bit_PPG fgm h Header file for including the monitor program 16bit_PPG fgm_cfg h Monitor operation setting header Sample application programs 16bit_PPG File name startup asm Description Startup routine Folder name 16bit_P
51. and development procedure of SOFTUNE Workbench CHAPTER 3 Windows This chapter explains SOFTUNE Workbench windows CHAPTER 4 MENUS This chapter explains the SOFTUNE Workbench menu configuration and the dialogs to be started from each menu CHAPTER 5 Add in Module This chapter explains SOFTUNE Workbench Add in module APPENDIX The Appendixes describes the register name downloading monitor program setting LAN interface setting USB interface creating ROM on monitor debugger target external I F for simulator The contents of this document are subject to change without notice Customers are advised to consult with FUJITSU sales representatives before ordering The information such as descriptions of function and application circuit examples in this document are presented solely for the purpose of reference to show examples of operations and uses of Fujitsu semiconductor device Fujitsu does not warrant proper operation of the device with respect to use based on such information When you develop equipment incorporating the device based on such information you must assume any responsibility arising out of such use of the information Fujitsu assumes no liability for any damages whatsoever arising out of the use of the information Any information in this document including descriptions of function and schematic diagrams shall not be construed as license of the use or exercise of any intellectual property right such as patent r
52. are defined other symbol than assumed one may be used To specify a symbol with the same name please determine the name of module and function name first then specify a symbol 136 CHAPTER 4 MENUS 4 3 7 3 Bookmark Edit window This section explains the operation when edit window is activated To Display a Dialog Bookmark By selecting one of following menus dialog as shown in Figure 4 3 8 will be opened This dialog is to display the list of bookmark that is set to an edit window 1 Edit Bookmark Bookmark 2 Short cut menu of Edit window Bookmark Figure 4 3 8 Bookmark Dialog Edit Window Bookmark x D Softune sample 8964Project sample c 12 D Softune sample 896 Project sample c 66 Bookmark list The list of a bookmark file name line number which is set currently to an edit window will be displayed Add button Setup of a bookmark to location of an edit window where cursor is put Delete button Delete selected bookmark from a list When more than one bookmarks are selected delete all items Jump button Move a start position for displaying a edit window to location of bookmark selected in bookmark list E Setup or Cancel of a Bookmark 1 Please move a cursor to line where you want to set or cancel a bookmark 2 Please execute any of following operations Select Edit Bookmark Setup cancel bookmark Click on Setup cancel bookmark mark at too
53. as a starting address for loading at the time of debugging Output range ran Specifies the range to be adjusted by an address when selecting the option adjust for adjusting an output file Selecting Auto will obtain the starting ending address for adjustment from the absolute format load module to set automatically Padding data p When selecting the option adjust for adjusting an output file the area of the file where no data exists is packed with data having a specified value The macro description can be used to describe options For the macro description refer to Section 1 11 Macro Descriptions Usable in Manager of SOFTUNE Workbench User s Manual CHAPTER 4 MENUS Figure 4 5 37 Converter Option Setup Dialog Setup Project x Dale MB89W 625 E c EN 32 bit Intel HEX format f2hs M M None 237 CHAPTER 4 MENUS 4 5 5 9 Setting Debug Options This section explains how to set debug options E Setting Debug Options 1 Click the Debug tab from the project setup dialog The debug option setup dialog shown in Figure 4 5 38 opens 2 Select category General or Setup can be selected as category E Setting Options in General 1 Set an alias file Clicking the Browse button to the right of the input field enables file reference 2 When setting other options write them in Other Parameter Figure 4 5 38 Debug Option Setup Dialog Setup Project
54. by name Sort items in the tree in alphabetical order Order by address Sort functions in the tree in address order and sort other items in the tree in alphabetical order Order by coverage rate Sort items in the tree in ascending order It is only valid while MB2141 emulator debugger Set coverage Opens the coverage setting dialog It is only valid while MB2141 emulator debugger Display coverage rate Switches on off the display of the coverage rate When Display coverage rate is turned on the coverage rate of each item is displayed It is only valid while MB2141 emulator debugger Refresh Updates the contents of the window When Display coverage rate is turned on the display is updated with the latest coverage rate It is only valid while MB2141 emulator debugger Property Information on the load module file is displayed See Section 4 3 9 Property 55 CHAPTER 3 Windows E Short Cut Menus Click the Right Button of the Mouse on a Source File Name 56 Figure 3 4 21 shows a short cut menu Figure 3 4 21 Short Cut Menu on a Source File Name Open Order by name Order by address Order by coverage rate Coverage v Coverage rate display Refresh Property Open Opens the selected source file in the source window Order by name Sort items in the tree in alphabetical order Order by address Sort functions in the tree in address order and sort other items in the
55. bytes like address 4 and address 8 and the search range is searched Example Suppose the data in memory is 0000 01 02 03 01 02 01 02 03 04 01 01 02 03 When Data Type is Byte Search Data is 01 and Skip Byte Count is 1 all search data is found However when Skip Byte Count is 2 only 01 search data at address 0000 and 0004 is found 01 search data at other addresses is not found When Data Type is Byte Search Data is 01 and 02 and Skip Byte Count is 3 only 01 and 02 search data at address 0000 and address 0003 is found 01 and 02 search data at address 0005 and address 000A is not found To edit memory data click the right button of the mouse in the Memory Window to display the menu then select Edit from the menu The edit dialog shown in Figure 4 4 13 opens Address Specifies address to edit Data Specifies memory data to rewrite Type Specifies size of data to rewrite Byte Word Long Figure 4 4 13 Memory Edit Dialog Data H F1 Close Type Byte J B Setup CHAPTER 4 MENUS To set the display format of the Memory Window click the right button of the mouse in the Memory Window then select Setup from the menu The setup dialog shown in Figure 4 4 14 opens Type Specifies display format of Memory Window Bit byte word or long can be selected Type Selects whether to display ASCII characters at right of Memory Window Columns To specify the number of bytes display in a line The nu
56. changed by changing the address field display 157 CHAPTER 4 MENUS E Add Bookmark Please click on the right button of the mouse on memory window to display short cut menu Then select Add bookmark Add bookmark Dialog will be displayed Figure 4 4 5 Figure 4 4 6 Figure 4 4 5 Add Bookmark Dialog Address Add bookmark Figure 4 4 6 Add Bookmark Dialog Symbol Add bookmark x Pen Ee e target 0 Bookmark name Specify the name of bookmark Default will be changed as follows depending on setup made in Area If the Area is Address Start address If the Area is Symbol Variable name Color Specify the color of background in bookmark 158 CHAPTER 4 MENUS Area Specify the method for determining the address range of bookmark Address Specify with start address or end address Symbol Specify the address range with the name of symbol Start address Specify the start address of bookmark End address Specify the end address of bookmark Variable name Specify the name of symbol for setting a bookmark il Searching Memory Data Click the right button of the mouse in the Memory Window to display the short cut menu then select Search from the menu The search dialog shown in Figure 4 4 7 opens Figure 4 4 7 Search Dialog Start address H F305 End address H F365 Close Type Byte m Find data HUS Skip data count Di
57. correct analysis the analysis order may have to be changed The analysis order can be changed in the following procedure 1 Select Error from the Set menu The error jump setup dialog shown in Figure 4 7 31 opens 2 Select the syntax whose order is to be changed from the syntax list 3 Click the UP or Down button to move the cursor to the position where error jump is to be set Application ON OFF When the check mark to the left of Apply is not set error messages are not analyzed according to the registered syntax When a check mark is set to the left of Apply ON is displayed in the syntax list When a check mark is not set OFF is displayed in the syntax list E Example of Error Jump Setup When the error format is error message line number file name Syntax 06 00 Pf Comment sample Note The syntax for which SYSTEM is displayed in the syntax list cannot be deleted 318 CHAPTER 4 MENUS 4 7 9 Tool Startup This section explains how to start a registered external tool E Tool Startup The tools set by Section 4 7 5 Tool are registered in the submenu A tool can be started by selecting it from this submenu Setting a check mark to the left of Designate Additional Option when Executing in tool setup opens the additional option setup dialog shown in Figure 4 7 32 before the tool is started Set an additional option from this dialog then click the OK button The option specified fro
58. display in the uppermost part of the Setup Section dialog The linker option setting dialog need not be returned each time sections are allocated to an area 27 CHAPTER 2 OPERATION 2 10 Make Build SOFTUNE Workbench can create a program in two methods make and build B Make Compiles or assembles only the modified source file and then links all objects to the library to generate an object program SOFTUNE Workbench recognizes the dependency of the include files registered in the Dependencies category of the SRC tab of project Window to compile or assemble the source file Use the Project Make menu to execute make B Build Not only modified source file but compiles or assembles all the source files registered in the project and then links all objects to the library to generate a target file Use the Project Build menu to execute build B Stop Stop is the function that forcibly suspends processing during make build compilation or assembling Execute stop with the Project Stop menu during make build compilation or assembling 28 CHAPTER 2 OPERATION 2 10 1 Making or Building of Project SOFTUNE Workbench enables making or building for each project configuration Bi Making or Building of Project Make or Build in the menu applies to the active configuration of an active project If a subproject is defined priority is given to making or building of the subproject For details about how t
59. et Search address Specifies start address of search range Address mask Specifies mask address of search range Searching start number Specifies number of frame where search to start 173 CHAPTER 4 MENUS Trace Emulator Figure 4 4 22 Trace Search Dialog Trace Search trace mE Read Write m Search Address Specifies address to search Address Mask Specifies address mask Only bit 1 addresses are compared Search Data MB2141 Specifies data to find Data Mask MB2141 Compares only 1 bit data Search Start Number Specifies number of frame where search to start Access Attribute MB2141 Specifies access attribute Code Read Write Code Read Read Write Code Read Write Level Change Point Search MB2141 Specifies sequencer level change point This item is not displayed when multitrace search is executed 174 CHAPTER 4 MENUS E Example of address Mask The relationship among search address address mask and the actual address to be found is shown in Table 44 1 Table 4 4 1 Relationship Among Search Address Address Mask and the Actual Address to be Found Search address Address mask Actual address to be found H FFFF H F8CA H F8CA H FF00 Any address from H F800 to H F8FF BB Back Trace Select Back Trace from the short cut menu Figure 4 4 23 Back Trace Dialog Back trace x Frame number D16 Previous Next gt gt Frame Number
60. field specify the data to be written to this temporary file For example when the tool option becomes very long it is possible to specify TEMPFILE for Option and specify that option in this field However this is only valid when the tool to be executed permits specifying the option in the file Macros can be input in this field For the macros refer to Section 1 11 Macro Description Usable in Manager in SOFTUNE Workbench User s Manual E Setting Procedure 1 Select Project Customize Build The Customize Build setting dialog is displayed Figure 4 5 40 2 Select the tool registered position from the tree view and then press the NEW button When a category is selected and the NEW button is pressed a tool entitled NEWTOOL is created at the end of the category When a tool is selected and the NEW button is pressed a tool entitled NEWTOOL is created immediately after the selected tool Tools in the Before After category are executed sequentially from the top 3 Set the title of the tool to be registered 243 CHAPTER 4 MENUS 8 9 Set the execution file name to be registered When the Browse button at the right of this field is clicked the file selection dialog is displayed and the tool execution file name can be selected from this dialog Set the option if necessary Set the execution time directory if necessary When the Browse button at the right of this field is clicked th
61. ie eb eee pide ue 75 3 10 Register WindOw erriari iiti er nre eese iege enger Cc e enu e aera e dee 78 3 10 1 Setting Register Display iie tes varies thts eite ave in ated 79 3 11 Memory WNION 5e oie alie d eee b Bp ive xara ende 81 3 2 bocalVariable WihdOW 5 lu teet tete HE eei nce xe EE o EIE Eee ene a 83 Sih Match WindOW e ant e Ri i d e e obtu eR ii tides dey daeddtinan 84 3 14 Trace WIndOW 5 eie ee Lice eed iE LU ve Pep decet nde beu EL ee TE Eden e E eode eee tcd 86 2 15 Command WIndOow dde ten lo tre de eet Cancer eaae ova oe ue ds drag safe 87 3 15 1 Setting Character String Replacement sssssssssssssssseeeeenn enne nennen nnns 89 3 15 2 LOGGING ssepe ettet atm as bait tates 92 9 16 ObJecEMWIDdOW sistemi eee nte te see 93 9 17 Coverage WINDOW 5e turo rte te ERU ER a raa AREE UU E eb ER EDDA EC 95 3 18 Performance WindOwW seonneet ea eene nnn nnn en nn nnn enne innen tenni rennen rrr enne rre n nnns 97 3 19 Sequence Window siistii o retient Ee hae ele DRE dan ee dr pa ee 99 CHAPTER A MENUS niece seines dana apana danada re ceu ca aves napa orae caosa iaSaSaUs 101 4 1 Menu Configuration Tree sssessssssesessssssss senten enne nnmis st entr r enne sensns entrent nnns sinet en 102 4 2 miS uM 105 4 2 1 NACE 106 4 2 2 Opern isi nue om tan c sub foo e eu 109 4 2 3 C088 sd debt E E dox rhet b A E EE A A deae e ey Lenta ox A E 111 4 2 4 Open Workspace
62. inserted into the hierarchy immediately below the project Set Project A project is set See Section 4 5 5 Setup Project Set Linkage Order When selected the Set linkage Order dialog Figure 3 4 6 is opened The files displayed in the Link Order box are linked from top to down To change the link order select the configuration to be set from the Setting Target box followed by the file name and use the Up or Down button to move the file to a desired position The Export dialog Figure 3 4 7 allows the current order to affect other configurations The files not subject to link are displayed in gray CHAPTER 3 Windows Figure 3 4 6 Set Linkage Order Dialog Set linkage order weeswe2s x ae sample c E xport Debug Make Build Making or building is performed in the active configuration of the currently selected project to create a target file Executing linker or librarian The linker or librarian is started in the active configuration of the currently selected project to create a target file Delete Project The specified project is deleted from workspace The project file itself is not deleted 47 CHAPTER 3 Windows Property File information is displayed See Section 4 3 9 Property Open List File Select the list file you want to open from the submenu If the list file you want to open is not created no submenu item can be selected Open HEX File S
63. menu Figure 3 4 15 Short Cut Menu on a Library File Name Set gt Delete Property 51 CHAPTER 3 Windows Set When selected the following two submenus are displayed Individual Setting A project is set See Section 4 5 5 Setup Project Return to Common Setting All individual options in the specified folder are returned to common options Delete The specified file is released from the project member The file itself is not deleted Property File information is displayed See Section 4 3 9 Property E Short Cut Menus Click the Right Button of the Mouse on a File in the Dependencies Figure 3 4 16 shows a short cut menu Figure 3 4 16 Short Cut Menu on a File in the Dependencies Category Open Property Open When SOFTUNE Workbench is in the debug session the specified source file is displayed in the Source Window When SOFTUNE Workbench is not in the debug session the specified source file is displayed in the edit window Property File information is displayed See Section 4 3 9 Property E Short Cut Menu Click the Right Button of the Mouse on Setup Name 52 Figure 3 4 17 shows a short cut menu Figure 3 4 17 Short Cut Menu on a Setup Name Start Debug Change Delete Property Start End Debug During debugging session the confirmation dialog Is the current session ended to start debugging is displayed Select Yes The current debu
64. of the interrupt processing routine The address at which this interrupt processing routine is set is called a vector Vectors are determined in advance according to the kind of the MCU E Display and Setting Vectors Display Figure 4 6 18 shows the vector display dialog Figure 4 6 18 Vector Display Dialog Vector table reset external external external external S bit PUM PUC timer 16 bit tii bit The start address of a bit ser program is usually set 1 2 3 4 5 6 7 3 3 System re timebase 17 in the reset vector Qu omm i Setting an address Change the address set in a vector as the following procedure 1 Select a vector table number then click the Edit button The vector edit dialog opens 2 Set an address then click the OK button B Jump Display the source of the stored program at the address set in the vector table in the following procedure 1 Select a vector number 2 Click the Jump button If the starting address of the program set in the vector table is incorrect the source cannot be displayed disassemble display 274 CHAPTER 4 MENUS Note The jump function merely displays the jump destination program it does not update the program counter to move control to the address set in the vector table 275 CHAPTER 4 MENUS 4 6 12 Load Target File This section explains how to load the target file to be debugged by SOFTUNE Workbench Ta
65. or not When checked only the debug information is loaded Auto mapping This specifies whether or not to enable the Auto Map Setting When checked Auto Map Setting is enabled This is valid the simulator only 301 CHAPTER 4 MENUS Response speed MB2146 09 Figure 4 7 22 Debug Environment Setup Dialog Response Speed Setup debug environment During Debugging response speed optimization When the user program is broken the CPU clock is automatically adjusted and it specifies whether to set the response speed of the debugger to the optimal value Further when the user program is executed be sure to return the CPU clock to the original value 302 4 7 2 4 CHAPTER 4 MENUS Setup Wizard This section explains how to operate the debugger s Setup Wizard E Setup Wizard Operation Procedure 1 Select Setup Name from Debugger Startup Selection then click the OK button The check dialog opens Click the OK button Setup Wizard is started 3 Click the Next button Select a debugger type then click the Next button Setting of the subsequent items depends on the debugger s type To reset an item click the Return button The immediately preceding setup screen is redisplayed E Procedure When the Emulator MB2141 is Selected 1 2 RS NO e Select the emulator type Click the Next button Select RS232C or LAN as the device type When RS232C is selecte
66. recurrent definition that the parent project itself serves as a subproject is impossible E Defining Subproject between Existing Projects 1 Select Project Dependence 2 Select the parent project in which a subproject is defined When the Dependence dialog is opened select the name of the parent project in which a subproject is defined from the Project Name box 3 Select the project that is defined as a subproject Check the project that is defined as a subproject from those in the Dependent Project list 4 Click the OK button E Deleting Subproject from Project 1 Select Project Dependence 2 Select the parent project from which a subproject is deleted When the Dependence dialog is opened select the name of the parent project from which a subproject is deleted from the Project Name box 3 Select the subproject to be deleted Deselect the subproject that is deleted from the Dependent Project list 4 Click the OK button 22 CHAPTER 2 OPERATION 2 7 Creation of Project Configuration This section explains how to create a project configuration E Creation of Project Configuration The project configuration is a series of settings for specifying the characteristics of the target file By creating a new project configuration two or more tool settings can be stored in the project When a new project is created the project configuration is created under a default name of Debug In SO
67. sem wait state 179 CHAPTER 4 MENUS TTW_FLG wai_flg wait state TTW MBX rcv msg wait state TTW MPL get blk wait state Wakeup Count Wakeup request count Timeout Control Data Timeout management data Stack Pointer Stack pointer Stack Area Stack area E Detailed Display of Semaphore Figure 4 4 28 Detailed Semaphore Display Dialog Semaphore ID Semaphore ID number Address Address of semaphore control block Count Current semaphore count Semaphore Address Semaphore queue address Waiting Task ID number of task in queue E Detailed Display of Event Flag Figure 4 4 29 Detailed Event Flag Display Dialog Event x mem 180 CHAPTER 4 MENUS ID Event flag ID number Address Address of event flag control block Flag value Current event flag pattern Flag address Address of current event flag table Waiting Task ID number of task in queue E Detailed Display of Mailbox Figure 4 4 30 Detailed Mailbox Display Dialog ID 0001 Close Address 222f Message address NONE NONE ID Mailbox ID number Address Address of mailbox control block Message State Message address Waiting Task ID number of task in queue Waiting Task or Message State is displayed according to the wait factor 181 CHAPTER 4 MENUS E Detailed Display of Cyclic Handler Figure 4 4 31 Detailed Cyclic Handler Display Dialog Cyclic handler ID ID number of cyclic handler Addres
68. tartup g D Betean ALL RIGHTS RESERVED COPYRIGHT C lid Dependencies LICENSED MATERIAL amp PROGRAM PROPER EH By A Sample program for initialization Simulator sup 2 PROGRAM start A TITLE start Project Window EHAE LL startup asm f oes rot Ee Output Window Status Bar MB89W825 T 38 CHAPTER 3 Windows 3 2 Tool Bar Command buttons to be used often are assigned to the tool bar for each group The groups that can be selected and the command buttons in the groups are shown below il Common Bar O New Open Save Cut Copy Paste Undo Redo Jump to Next error Jump to Previous error Jump to Top error Jump to Bottom error Project window Docking Output window Docking Open Project window Eae ie EE es ea i 05 e i es OL Open Output window B Find Find Next ze Find Previous Find Find in files Setup cancel bookmark Next bookmark Previous bookmark Next bookmark in the current window Previous bookmark in the current window Clear all bookmarks in the current window s a at lat lm i 39 CHAPTER 3 Windows E Project Bar The active project and its active configuration name are set and displayed E Build Bar E Debug Bar Bl P e 2 JEH w E amp E E Flash MB2146 09 amp amp B Flag Bar sample Debug Compile Assembly Make Build Sto
69. the Debug Session About Fs896s opens the version information dialog showing the SOFTUNE Workbench logo mark and version number E Version Information Display when SOFTUNE Workbench is in the Debug Session About Fs896s opens the version information dialog showing the SOFTUNE Workbench logo mark version information type of the currently selected debugger and type of the target MCU being debugged Reference Be sure to let us know the displayed version number when asking our company about SOFTUNE Workbench 330 CHAPTER 5 Add in Module This chapter explains SOFTUNE Workbench Add in module 5 1 Customize Bar 331 CHAPTER 5 Add in Module 5 1 Customize Bar This chapter describes the Customize Bar of the SOFTUNE Workbench 5 1 1 What is Customize Bar 5 1 2 Customize Bar Menu 5 1 3 Registering in the Customize Bar 5 1 4 Warning and Error Messages 5 1 5 Note 332 CHAPTER 5 Add in Module 5 1 1 What is Customize Bar This section describes the customize bar and how to install it What is Customize Bar The customize bar registers batch file Workbench menus and external tools used while running the Debugger in a tool bar This function enables you to call them up easily by clicking one of the buttons You can register up to ten objects Items that have been set once are restored when the Workspace is opened Figure 5 1 1 Customize Bar 77x zi By registering batch files W
70. the selected character string All select Selects all the entered character strings Undo 1 Click the right button of the mouse on the command input field to display the short cut menu 2 Select Undo from the short cut menu Cut 1 Select the character string you want to cut 2 Click the right button of the mouse on the command input field to display the short cut menu 3 Select Cut from the short cut menu Copy 1 Select the character string you want to copy 87 CHAPTER 3 Windows 2 Click the right button of the mouse on the command input field to display the short cut menu 3 Select Copy from the short cut menu Paste 1 Click the right button of the mouse on the command input field to display the short cut menu 2 Select Paste from the short cut menu Delete 1 Select the character string you want to delete 2 Click the right button of the mouse on the command input field to display the short cut menu 3 Select Delete from the short cut menu All select 1 Click the right button of the mouse on the command input field to display the short cut menu 2 Select All select from the short cut menu E Short Cut Menu Other than the Command Input Field 88 Load Batch File Opens the file dialog for specifying the batch file Load Alias File Opens the file dialog for specifying the alias file Macro etc Displays Command Replacement Dialog Logging Sets log start log st
71. tree in alphabetical order Order by coverage rate Sort items in the tree in ascending order It is only valid while MB2141 emulator debugger Set coverage Opens the coverage setting dialog It is only valid while MB2141 emulator debugger Display coverage rate Switches on off the display of the coverage rate When Display coverage rate is turned on the coverage rate of each item is displayed It is only valid while MB2141 emulator debugger Refresh Updates the contents of the window When Display coverage rate is turned on the display is updated with the latest coverage rate It is only valid while MB2141 emulator debugger Property Display the properties of the source file CHAPTER 3 Windows E Short Cut Menus Click the Right Button of the Mouse on a Function Name Figure 3 4 22 shows a short cut menu Figure 3 4 22 Short Cut Menu on a Function Name Jump Order by name Order by address Order by coverage rate Break Coverage v Coverage rate display Refresh Property Jump Opens the selected function in the source window Order by name Sort items in the tree in alphabetical order Order by address Sort functions in the tree in address order Order by coverage rate Sort items in the tree in ascending order It is only valid while MB2141 emulator debugger Break Opens a break dialog to set a break point at the selected function Set coverage Opens the covera
72. variable setting dialog shown in Figure 3 15 3 opens Set a variable Specify the variable name that does not conflict with the variable names that have been already registered Write the character string to be assigned to the specified variable name Click the Append button Deleting a variable 1 2 Click the right button of the mouse in the Command Window to display the short cut menu Select Macro etc from the short cut menu The character string replacement setting dialog shown in Figure 3 15 2 opens Click the Variable tag The variable setting dialog shown in Figure 3 15 3 opens Select the variable name to be deleted from the debug variable list 5 Click the Delete button Figure 3 15 3 Variable Setting Dialog Replace command x Alias Variable Macro Variable top20 Append Sung 000 101 Variable list Variable name command Delete Close B Macro CHAPTER 3 Windows A combination of the special commands to be used often can be named and used as a macro Add and delete a macro in the following procedures Adding a macro l 2 6 Click the right button of the mouse in the Command Window to display the short cut menu Select Macro etc from the short cut menu The character string replacement setting dialog shown in Figure 3 15 2 opens Click the Macro tag The macro setting dialog shown in Figure 3 15 4 opens Seta mac
73. 10 2 opens 2 Select the register you want to delete from Current Display Register lower part of display register setting dialog then click the Delete button 79 CHAPTER 3 Windows The selected register is deleted from Current Display Register lower part 3 Set all the registers you want to delete by repeating the above operation 4 Click the OK button E Restoring Registers to the Initial Status Restore the registers in Current Display Registers to the initial status status when SOFTUNE Workbench was installed in the following procedure 1 Click the right button of the mouse in the Register Window to display the short cut menu then select Setup from the menu The display setting dialog shown in Figure 3 10 2 opens 2 Click the Reset button The registers in Current Display Registers lower part of display register setting dialog are restored to the initial status 3 Click the OK button 80 CHAPTER 3 Windows 3 11 Memory Window This window opens only when SOFTUNE Workbench is in the debug session The memory window is used to display and modify memory data at the specified address E Memory Window B Function Figure 3 11 1 shows an example of the memory window When debugging memory values can be displayed The register values can be directly rewritten To modify by specifying the expression and symbol in the memory values select Edit from the short cut menu for the memory wind
74. 12 SSDI Write Memory Write to Memory Format int SSDI Write Memory unsigned long addr int size int length void data Argument unsigned long addr Access address int size Access size 1 Byte 2 Word 4 LONG int length Write data count void data Data storage area Return value Count of data completely written If the return value is different from the write data count length an error occurs Explanation Writes data to memory The type of the data storage area data differs depending on the access size Byte 1 byte unsigned char Word 2 bytes unsigned short Long 4 bytes unsigned long Remarks In this access the writing of data is not posted 387 APPENDIX F 13 SSDI Read Register Read from Register Format int SSDI Read Register int reg no unsigned long data Argument int reg no Register number unsigned long data Data storage area Return value 0 Normal end 0 Error Explanation Reads data from registers Remarks The register number is defined in the include file SSDI REGISTER H SSDI_REGISTER H is installed X Y Y Y LIB 896 SSDI folder X YYY It is the drive amp folder which it installed SOFTUNE in 388 APPENDIX F External I F for Simulator F 14 SSDI Write Register Write to Register Format int SSDI Write Register int reg no unsigned long data Argument int reg no Register number unsigned long data
75. 18 Variable Edit Dialog Edit variable x Cancel max H 0000001 q E Canceling Display of Unnecessary Variable Display of a set variable that is no longer needed can be canceled from the Watch Window using the following procedure 1 Click the right button of the mouse in the line displaying the variable to cancel The short cut menu is displayed 2 Select Delete from the short cut menu Note Display of each array element or each member e g structure cannot be canceled When delete is executed in each element or member line display of the array or structure is canceled Setting Display Range at Array Expansion When an array is expanded a range of the element displayed in the window can be specified When clicking the right button of the mouse on an array variable in the watch window to select Element in the short cut menu the array expansion dialog Figure 4 4 19 is displayed Figure 4 4 19 Array Expansion Dialog value 15 Start element D End element D 5 Cancel 169 CHAPTER 4 MENUS Start element number Specifies start element number displayed at array expansion End element number Specifies end element number displayed at array expansion Only specified range is displayed at array expansion At default all elements are displayed In the watch window the setting value is restored when reactivating the debugger Note The value of one dimensional array regist
76. 2 4 Setup Wizard When all settings with Setup Wizard are completed click the Complete button When the Project Setup dialog is redisplayed click the OK button When all the above steps are completed save the project then close it once 31 CHAPTER 2 OPERATION E Starting Debugging When steps from Creating a project to Setup Wizard are completed open the project SOFTUNE Workbench automatically migrates to the debug session enabling the immediate start of debugging Select Open from the File menu and specify the load module file to load the target program 32 CHAPTER 2 OPERATION 2 13 Reading SOFTUNE Project Files of Old Versions The SOFTUNE project files of old versions can be read E Procedure For project files of SOFTUNE Workbench V3 1 Select Open Workspace from the File menu 2 Select Project file from File Type and specify the project file made by the early version of SOFTUNE Workbench If the specified file is one made by the early version of SOFTUNE Workbench a dialog asking whether to convert the file to a workspace project format is opened Yes button The project file is converted and opened in the workspace project format No button The project file is not converted and is opened in the old project format In this case some functions cannot be used For details of functions that can be used in the old project format refer to Section 1 2 Management Function for Project of SO
77. 2 vector Reset vector 2 UART SIO ch 0 Figure E 4 Outlined Resources Used for Object Loading 0x0080 0x03AF 0x045C 0x047F RAM in detail reprogramming flash memory Monitor work area 1 RAM monitor for F2MC 8FX UART SIO I O Wild register 1 About 0 8 Kbyte in total Flash memory in detail Monitor program oce CALLV 0 vector IRQ4 2 vector Reset vector 2 UART SIO ch 0 E Including and Setting Up the Monitor Program To use Monitor Debugger add and modify the monitor program files listed below In addition part of the application program must also be modified See the following sections for details E Changing Monitor Operation Settings fgm_cfg h B Modifying the Application Program B Creating an Auto boot Checker 357 APPENDIX Additional files Table E 4 Monitor Program Files to be Added File name Description Remarks FGM rel Monitor program main routine Source Files fgm_cfg asm Monitor operation definitions Source Files fgm h Header file for including the monitor program Dependencies fgm_cfg h Monitor operation setting header Dependencies must be modified ui 1 See Bl Changing Monitor Operation Settings fgm cfg h Figure E 5 Example of Sample Program File Configuration H workspace MBS5F128 E 16bit_PPG abs
78. 8 4 9 2 Support Information i ette EA edet e ad te Duet C TE S 329 4 9 3 version InformatilOn 5 i ni obe i eii ep eolit eite ee 330 GHAPTER 5 Add in MOdUle ae aeaa ena tie Cr Rin vasa c edd dad Se lon a ewe aaen eis 331 5 1 eeuiraztig EE 332 5 1 1 What Is CUStOMIZE Bat eee ttn iere et dE dee een aA 333 5 1 2 Customize Bat Men isnot a te teet iEn Fai nau Ra Qa eee Resa eer so a ale Cx uuo ona 335 5 1 3 Registering in the Customize Bar ssssssssssssssssesseseeen trennen nennen nennen nens 336 STAT Registenng BatchiFile inocente tie epe ege eae 340 5 1 3 2 Registering Workbench Menu sssssseseseeeeenne eee nnnm en nnn nn enne 342 5 1 3 3 Registering External ToO meie errietara i eee EARRA aer E enne trennen nnne nnn en nennen nennen 344 5 1 4 Warning and Error Messages usana a AAE en nnne enn en nns en nennen nnn nnns 346 5 1 5 acce 348 viii PPP END eU M 349 APPENDIX A List of Register Names sessesseseseesseeeeeenenee nennen nennen nen nnne ARENAER terres nennen nennen 350 APPENDIX B Downloading Monitor Program essen nenne nennen enne nnns 351 APPENDIX C Setting LAN Interface ssssssssssssssssseee eene nnnnren resin ner innert nennen nennen 352 APPENDIX D Setting USB Interface ooo eee ccc ee cence cece eeeeeaaeeeeeeeeeeaaeseeeeeeseaeeseeaaeee
79. BUHI aeea etA 28 2 10 1 Making or Building of Project corer A E A AEO 29 2 11 DebUggING ince Aiea eter ech tiie tt eder d Oe Ro dante toh ens 30 2 12 Executing Debugging Only ssssssssssssssssseseeeeeee entren enne nnn nen renes nr inn tenr tennis usent enn 31 2 183 Reading SOFTUNE Project Files of Old Versions sse 33 214 Moving Project FBS i eee perte dee mei teme pee ee ime er tees 35 2 15 Useful Functions iua a oan eel ld end ceded en Get eee Dei UD eee N Ten een eode dete ies 36 CHAPTER 3 MWIBUOWS coire o demere Dena eee edt Tide Facio cue dad Sete C ecd Fe DO v CR 37 3 1 Window Configuration 2 inked el i iv ied Le DERE ED P d atelier 38 3 2 Neri u M 39 3 3 Status Bar vi 22k PI x 41 3 4 Project WINdOW 5 2 ot eter tein dee E ebd Det eerte rete teg 42 3 4 1 She it Lo Barrer ete reece eee REP A EL C ecd cel eer et M Cre olet c CE 43 39 4 2 JABS Tab euet ated teet p la Pun a rien tr EE e ERE EME erc eet aut 54 3 5 Output WInOOW 4 1 ettet e ere dete nae Aa tree E e ee t et ei p ttes 59 3 6 Edit Window Standard Editor ssssssssssssssssssseseeee eene nennen nennen nnn sinere 61 3 6 1 Setting Standard Editor 5255 2 5 02 d tori ed ta ad eat o ac et rh dert 64 3 7 SOUNCO WINDOW cL 68 3 8 Symbol Window eee ted e nee toe eG a Ae A aes 73 3 9 Disassemble WindOW 5 etude ete
80. Event TIMER EVENT info Argument typedef struct unsigned long total cycle Total cycle count unsignedlong inst cycle Differential cycle count from previous event int time id Set timer ID unsigned long cycle Count of cycles delayed TIMER EVENT Return value None Explanation Posts the occurrence of a timer event set in the ISS Set the count of cycles generated during processing as the count of cycles delayed info cycle In the ISS this value is added to the cycle count If this event causes an error stop instruction execution by using SSDI Request Abort Remarks Set the timer event conditions in SSDI Set Timer 385 APPENDIX F 11 SSDI Read Memory Read from Memory Format int SSDI_Read_Memory unsigned long addr int size int length void data Argument unsigned long addr Access address int size Access size 1 Byte 2 Word 4 LONG int length Read data count void data Data storage area Return value Count of data completely read If the return value is different from the read data count length an error occurs Explanation Reads data from memory The type of the data storage area data differs depending on the access size Byte 1 byte unsigned char Word 2 bytes unsigned short Long 4 bytes unsigned long Remarks In this access the reading of data is not posted 386 APPENDIX F External I F for Simulator F
81. F function E Outline of External I F DLL The Simulator Debugger for SOFTUNE Workbench supports the I O simulation function ports interrupts for aiding in debugging applications using microcontroller resources However this function is simple so that it cannot cover the simulation of complicated microcontroller resources therefore providing interface between the instruction set simulator ISS and a microcontroller resource simulator that the user describes in the C language This microcontroller resource simulator is created by the dynamic link library DLL file for Windows E Configuration Figure F 1 External I F Module The microcontroller resource simulator is read only when the Simulator Debugger for SOFTUNE Workbench is started The interface between the ISS and the microcontroller resource simulator is called in the following timing When the Debugger is started When the Debugger has been initialized When the Debugger is terminated When the target is reset Immediately before data is read from memory I O Immediately after data is written to memory I O Immediately before fetching is performed When an interrupt occurs When a timer event occurs There are the following functions for operating the ISS from the microcontroller resource simulator Reads writes data from to memory 374 APPENDIX F External I F for Simulator Reads writes data from to registers Sets interrupt sources
82. FTUNE Workbench Users Manual Cancel button Opening of the project file is canceled For project files of SOFTUNE Manager V01 V02 1 Select Open Workspace from the File menu 2 Select Project file from File Type and specify the project file made by SOFTUNE Manager If the specified file is one made by SOFTUNE Manager a dialog asking whether to convert the file to a workspace project format is opened 3 Click the OK button to start conversion Click the Cancel button to cancel opening of the project file 4 When the New Project Creation Window opens set the chip type and target MCU then click the OK button 5 When conversion is completed the dialog showing the end of conversion opens Click the OK button to close the dialog B Backup File In SOFTUNE Workbench when a project file is converted to a workspace project format a backup file is made automatically The extension of backup file varies with the type of project file The method for opening the backup project file is also different depending on the extension SOFTUNE Workbench V3 Old project file prj p03 Old option data file dat gt d03 SOFTUNE Manager V01 V02 Old project file prj V01 33 CHAPTER 2 OPERATION SOFTUNE Workbench V3 p03 e Change the extension of the backup project file p03 and option data file d03 to prj and dat respectively SOFTUNE Manager V01 V02 v01 e Change the ext
83. FTUNE Workbench the project configuration is created as follows Creating project configuration on settings of existing project configuration A new project configuration is created on the settings of the selected existing project configuration In the new project configuration the same files as those in the original project configuration are always used E Creating Project Configuration on Settings of Existing Project Configuration l 2 Select Project Project Configuration Add and Delete Select the project to which a project configuration is added When the Add and Delete Project dialog is opened select the project to which a project configuration is added Click the Add button Click the Add button The Add Project Configuration dialog is opened Enter the project configuration name Enter the unique name of a new project configuration The characters that can be used to form a name are a to z A to Z 0 to 9 and _ Select the project configuration to which settings are copied Select the initial settings of a project configuration to be added The selected settings of the project configuration such as tool options file configurations and configurations of subprojects to be build are copied as they are Click the OK button Click the OK button in the Add Project Configuration dialog and the OK button in the Add and Delete Project Configuration dialog E Setting Active Proj
84. FUJITSU SEMICONDUCTOR CONTROLLER MANUAL CM25 00322 2E F MC 8L 8FX FAMILY SOFTUNE M workbench OPERATION MANUAL co FUJITSU F MC 8L 8FX FAMILY SOFTUNE workbench OPERATION MANUAL FUJITSU LIMITED PREFACE E What is the SOFTUNE Workbench SOFTUNE Workbench is support software for developing programs for the F MC 8L 8FX families of microprocessors microcontrollers It is a combination of a development manager simulator debugger emulator debugger monitor debugger and an integrated development environment for efficient development Note F2MC is the abbreviation of FUJITSU Flexible Microcontroller E Purpose of this manual and target readers This manual explains how to operate the SOFTUNE Workbench and design the product This manual is intended for engineers designing several kinds of products using SOFTUNE Workbench Be sure to read this manual completely B Trademarks SOFTUNE is a trademark of FUJITSU LIMIITED Microsoft and Windows are registered trademarks in the United States and other countries of United States Microsoft Corporation The company names and brand names herein are the trademarks or registered trademarks of their respective owners E Organization of Manual This manual consists of five chapters and appendix CHAPTER 1 OUTLINE OF SOFTUNE Workbench This chapter gives an outline of SOFTUNE Workbench CHAPTER 2 OPERATION This chapter describes the basic operation method
85. Figure 5 1 10 Number Select the number to be registered in the customize bar Kind Select Batch File Entry Enter the batch file name to register in the customize bar You can specify using the Open File dialog Figure 5 1 5 displayed when you click the reference button on the right Parameter Input here when specifying a parameter for a specified batch file Use a comma to separate multiple parameters Display the Parameter Setting dialog Figure 5 1 6 To set a parameter when executing a batch file with the customize bar apply a check mark to this This is convenient when you want to specify change parameters each time you execute a batch file Iconic To make Workbench an icon when executing a batch file with the customize bar apply a check mark to this Add Check the input contents of 2 to 7 If they are correct click Add This completes the registration of a batch file The contents of the registration are displayed in File list and are restored when the Workbench is opened Figure 5 1 10 Setting Dialog Batch File CHAPTER 5 Add in Module Customize bar Setting Dialog C Softune Initialize pre RunBreak SetupDbgenv NPTEPAD Batch File C Softune Initialize pre 341 CHAPTER 5 Add in Module 5 1 3 2 Registering Workbench Menu This section describes how to register the Workbench menu in the customize bar il How to Register Workbench Menu 342 1
86. HAPTER 4 MENUS 4 5 6 Setting Customize Build This section explains how to start a different tool before or after executing the language tool during Make or Build E Customize Build Function In SOFTUNE Workbench it is possible to make a different tool operate automatically before or after executing the language tool during Compile Assemble Make or Build Using this function makes it possible to make a customer tool operate before the Compiler is executed make the object module conversion tool operate after the Linker is executed This setting is stored on a project by project basis Figure 4 5 40 Setup Customize Build Dialog Setup Customize Build Ea Target of setting sample prj m TreeView x t 4 Assembler Before After 3 4 Compiler amp Before After Linker amp Before After a Librarian amp Before After 5 Converter amp Before B After Title M2bs exe Execute Filename D SoftunesBin amp M2bs Browse Option FZ TEMPFILE gt Executing Directory 4ABSPATH Browse MV Enable Designate additional option when executing M Use output window Contents of the temporary file OxcO00 OxFffF ui 241 CHAPTER 4 MENUS E Tool Button List eJ New x Delete f v Down E Setting Target There are two types of setting t
87. HAPTER 4 MENUS E Setting Items The following items can be set or changed in tab form General The project type target name output directory and file building are set MCU The items regarding the MCU such as the chip type and target MCU are set C Compiler The C compiler options are set Assembler The assembler options are set Linker The linker options are set Librarian The librarian options are set Converter The converter start and converter options are set Debug The debug options and debugger setup information are set 203 CHAPTER 4 MENUS 4 5 5 1 General This section explains the items that can generally be set in the Setup Project dialog E Setting of General 1 Click the General tab in the Setup Project dialog 2 Set the following items as needed Remove this file from target of Build Project type Output Directory Even though any category is selected all the C compiler option currently being set is displayed at the bottom of the dialog Figure 4 5 8 Setup Project Dialog General Setup Project x General mcu C Compiler Assembler Linker Librari 4 gt Target of setting Remove this file from target of build Project E55 oftunesample 8SB Project sample prj Project Type Loadmodule AB5 m Targetfile Name sample abs Output Directory Targetfile Directory MBEsWwE254BS Browse Objectfile Directory
88. MB90F394 v sample prj Ey Source Files f sample c R startup asm E Setting Options in Setup 1 Click the Debug tab from the project setup dialog 2 Select Setup category 238 CHAPTER 4 MENUS 3 Set Setup Name Set a different name from registered setup names 4 Click the Add or Browse button Clicking the Add button starts the Setup Wizard and adds the new setup See Section 4 7 2 4 Setup Wizard Clicking the Browse button reads information from the set file for setup When the file selection dialog opens select a file from the dialog then click the Open button Figure 4 5 39 Debug Option Setup Dialog Setup Project MBSIW625 E sample prj MB2141 Bi Deleting Debugger Setup 1 Click Debug tab from the project setup dialog 2 Select Setup category 3 Select the setup name to be deleted from Setup Name List 4 Click the Delete button 239 CHAPTER 4 MENUS B Changing Debugger Setup 1 Click Debug tab from the project setup dialog 2 Select Setup category 3 Select the setup name to be changed from Setup Name List 4 Click the Change button Setup Wizard is started See Section 4 7 2 4 Setup Wizard E Changing Setup Name 1 Click Debug tab from the project setup dialog 2 Select Setup category 3 Select the setup name to be changed from Setup Name List 4 Click the Change Setup Name button 240 C
89. OFTUNE Workbench Tool of the Start Menu The LAN address setup program is started Select emulator name MB2141 Click Set Communication to set the RS 232C interface Click Read to read the current emulator setting status Set IP Address and Port Address The IP address and port address set values at the PC side are displayed Usually Universal is used as MAC Address However when using Local as MAC Address consult the LAN address administrator Select Exit from the Setup menu to exit the LAN address setup program 10 Press the emulator reset button button on rear to reset the emulator 352 APPENDIX D Setting USB Interface APPENDIX D Setting USB Interface Communication via USB requires installation of the USB driver in the personal computer Installation of USB Driver WindowsXP and Windows2000 connect the emulator to a personal computer via USB To install the USB driver proceed as follows 1 Connect the emulator to a personal computer with the USB cable 2 When the power supply of the emulator is turned on the OS requests installation of the USB driver Specify the directory Drivers on this product CD ROM Note The following emulator have USB interface MB21 46 09 353 APPENDIX APPENDIX E Installing Monitor Debugger This appendix describes the requirements for using Monitor Debugger Conditions required for the target system Including and setting up the mon
90. OM RAM Area List Click the Set Section button The section setup dialog shown in Figure 4 5 33 opens Specify the name of the section to be allocated to the selected area A wild card character can be also used Select a content type from the drop down list as required None Code Data Stack Const IO Click the Set button The set section is added to the end of Section Name List When all settings are completed click the OK button The order in which sections are allocated to the specified ROM RAM area is the same as the order in Section Name List For how to change this order see Changing the section allocation order next by one E When a Section is Allocated to the Specified Starting address 1 7 Click the Set Section button The section setup dialog shown in Figure 4 5 33 opens Select Specify in Address from the drop down list for ROM RAM Area Name Specify the name of the section to be allocated to the ROM RAM area A wild card character can be also used Specify the starting address to which the section is to be allocated Select and set a content type from the drop down list as required Click the Set button The specified section is added to the end of Section Name List When all settings are completed click the OK button To continuously allocate several sections to the specified address execute step 6 set Section Name and Contents Type only
91. PENDIX B Downloading Monitor Program To use the emulator debugger the monitor program corresponding to the chip to be used must be written to the emulator This processing is called monitor program download BB When the emulator is the MB2141 series The Downloading Monitor Program procedure is described below 1 Connect the emulator to a personal computer PC with an RS 232C or LAN interface When connecting the emulator to the LAN see APPENDIX C Setting LAN Interface 2 Press the reset switch then turn on the emulator Check that the READY LED of the emulator body turn on 3 Execute the Monitor Loader menu from SOFTUNE V3 of F2MC 8L Family SOFTUNE Workbench Tools of the Windows Start Menu The monitor loader program is started 4 Select the monitor program to be loaded Select the monitor program corresponding to the chip to be used 5 Specify a communication type To use the RS 232C interface specify a communication port and a baud rate To use the LAN interface specify the host name of the emulator 6 Click Start Load The selected monitor program is downloaded to the emulator 7 Select Exit from the File menu to exit the monitor program Table B 1 Monitor Program Chip type Corresponding chip Monitor program F2MC 8L MB896XX EML96A HEX 1 EML96N HEX 2 EML96NW HEX 3 1 For MB2144 505 emulation pod 2 For MB2144 508 emulation pod 3 For MB2144 508 emulation pod new emulator in
92. PG main c PPG c Main routine 16bit PPG resource initialization 16bit_PPG 16bit_PPG Interrupt_routine c 16bit PPG interrupt routine 16bit_PPG vector c Interrupt reset vector definitions 16bit_PPG extern h Application program header 16bit_PPG autoboot c Auto boot checker Sample I O register file 16bit_PPG File name Description Sample I O register file main Folder name The following source is also attached as a reference material Table E 12 Provided Source Code Reference Material Monitor program source reference File name Folder name Description 369 APPENDIX B Prohibitions and Restrictions This section summarizes the items to follow and note on debugging with the monitor program included Prohibitions Prohibited Do not manipulate any resource being used by Monitor Debugger Monitor Debugger may behave unpredictably if you manipulate RAM or a UART SIO register being used by Monitor Debugger When using the I O ports such as P13 to P15 in particular be careful not to change the settings of P10 to P12 Prohibited Do not manipulate the PLLC or SYCC register via the debugger Monitor Debugger adjusts the communication speed based on the values of the PLLC and SYCC registers If you manipulate the PLLC or SYCC register directly from the memory window or watch window the monitor program and Monitor Debugger canno
93. PTER 3 Windows E Short Cut Menu 76 Inline Assemble Jump Go to Current Break Point Set Reset Break Point Enable Disable Break Watch Stack Set coverage Display coverage Activate when stop Close Jump See Section 4 4 3 Assembly Displays jump dialog Displays current PC location This function is to set or to cancel the break point in the instruction pointed by cursor To make break point in the instruction pointed by cursor enable or disable See Section 4 6 4 Break Point See Section 4 4 7 Watch See Section 4 6 7 Stack Please refer to Section 4 4 12 Coverage It is only valid while MB2141 emulator debugger Switches on off the display of the coverage When Display coverage is turned on the executed lines are displayed in green and the unexecuted lines are in brown It is only valid while MB2141 emulator debugger break point Specify whether the window should set to active or not when the program is stopped Closes disassemble window Specifies the position to display in the disassemble window Perform this operation in the following procedure 1 Click the right button of the mouse in the disassemble window to display the short cut menu then select Jump from the menu The jump dialog opens See Section 4 3 6 Jump 2 Select a specification format 3 Specify a cursor display position 4 Click the OK button Display coverage 1 Click the righ
94. Radix Hexadecimal Type Word Address H FFFF Expression The selected item is displayed Value The value of the selected expression is displayed Radix The base in which the value is given is displayed Type The type of the selected expression is displayed Address The symbol address of the selected expression is displayed 148 CHAPTER 4 MENUS 4 3 9 6 Property Watch Window This section explains the property in the Watch window E Property General Figure 4 3 19 Property Watch Window General ariable Ea General Expression val Value H 2000 Radix Hexadecimal Type Address H FFFF Expression The selected item is displayed Value The value of the selected expression is displayed Radix The base in which the value is given is displayed Type The type of the selected expression is displayed Address The symbol address of the selected expression is displayed 149 CHAPTER 4 MENUS 4 4 View Menu The View Menu displays each window It also sets the tool bar and status bar to view or non view E Window View Non view The View Menu can set the following windows to view or non view Project Window Output Window E Window Display Debug Session The View Menu displays the following Debugger windows valid only when SOFTUNE Workbench is in the debug session Symbol Assembly Register Memory Local Watch Trace Coverage Pe
95. Resister Bank Setup Dialog Setup Project x General MCU C Compiler Assembler Linker Librari_ gt Category Register Bank Register Bank List Target of setting MBB9WE25 BankO Bank4 Bank Bank6 Bank Bank8 Bank3 Bank10 o INROMUT OxCOOD O FFFF ta _INRAMO1 0 0080 0 027F Cancel Apply 1 Select the Register Bank category The register bank setting dialog is displayed Figure 4 5 31 2 Set the check mark for the register bank list to be used 227 CHAPTER 4 MENUS 4 5 5 6 Section Disposition Connection Specifying This section explains how to set the section allocation link option linker option E Section Disposition Connection Specifying 1 Click the Linker tab from the project setup dialog 2 Select the Disposition Connection category The disposition connection setup dialog shown in Figure 4 5 32 opens 3 Select Auto Disposition from the drop down list None Mode1 Mode2 NONE The linker does not allocate the sections automatically Model If any absolute sections exist when allocating sections in a ROM RAM area specified in the ROM RAM Area List the linker allocates relocatable sections to avoid an overlap to each of the addresses to be allocated It will properly allocate the sections in a descending order of their alignment values and sizes so that empty area is minimized M
96. STACK ALIGN 1 RES B 30 Application Program RES B 4 Monitor Debugger STACK_TOP omission SSECTIONCODE CODE ALIGN 1 MOVW A STACK_TOP MOVW SP A Watchdog timer start routine If the watchdog timer is used replace the routine for starting it first after releasing the microcontroller from a reset with a monitor program API of FGM WDTON Using this API can prevent the watchdog timer from generating a reset even when control is passed to the monitor program Note that the argument of the API is set in the WDTC register This API can be called not only from a source written in C but also from a source in the assembler by stacking the arguments in the stack Table E 8 API FGM WDTON Monitor program API FGM WDTON Processing Starts the watchdog timer unsigned char SETVAL Argument Value set in the WDTC register Return value void None Sample use define SETVAL 0x45 Canngldee FGM WDTON SETVAL define SETVAL 0x45 mov a SETVAL Assembler pushw a call FGM_WDTON popw a Figure E 10 Coding Example in C include fgm h omission IO WDTC byte 0x45 FGM_WDTON 0x45 Start Watchdog Timer 362 APPENDIX E Installing Monitor Debugger Figure E 11 Coding Example in the Assembler include Agfgm hAh omission mov IO _WDTON 0x45 mov a 0x45 pushw a call _ FGM_WDTON Note Do not single step through the API FGM_
97. Select Edit Bookmark Setup cancel bookmark Click on Setup cancel bookmark mark at toolbar Find Setup a book mark with short cut menu Add a bookmark For details refer to Section 4 4 5 Memory Add or delete a book mark at tab Memory in the Bookmark dialog E Move the Caret to the Next Bookmark in the Current Window 1 Please make sure that there is a cursor in a memory window 2 Please execute any of following operations Select Edit Bookmark Next bookmark in the current window Click on Next bookmark in the current window at toolbar Find E Move the Caret to the Previous Bookmark in the Current Window 1 Please make sure that there is a cursor in a memory window 2 Please execute any of following operations Select Edit Bookmark Previous bookmark in the current window Click on Previous bookmark in the current window at toolbar Find E Clear all Bookmarks in the Current Window 1 Please make sure that there is a cursor in a memory window 2 Please execute any of following operations Select Edit Bookmark Clear all bookmarks in the current window Click on Clear all bookmarks in the current window at toolbar Find Click on AlI delete at tab Memory in the Bookmark dialog 135 CHAPTER 4 MENUS Note Symbol which can not be allocated to the name of bookmark will be member of automatic variables structure union and class If some symbols with the same name
98. Specify the type of display start position Line number Address Frame Position Display disassembling from the position specified in the above type Window To specify the window where jump is implemented For details see Section 4 3 6 Jump If itis a disassemble window default will be shown as Assembly 153 CHAPTER 4 MENUS B Inline Assemble Selecting Inline Assemble from the short cut menu opens the Inline assemble dialog shown in Figure 4 4 2 Figure 4 4 2 Inline Assemble Dialog Start address ir 20 Code data E 400FE Mnemonic Mow A 00FE Fics Writing a mnemonic in the Mnemonic edit box and clicking the Update button assembles and sets the mnemonic starting from the start address The start address subsequently advances to the next address To change the address where the mnemonic is to be written change Start Address When mnemonic change is completed click the Close button 154 4 4 4 CHAPTER 4 MENUS Register Register displays the Register Window E Register When the Register Window is opened the selected target MCU register name and each register retention value are displayed This function command can be used only when SOFTUNE Workbench is in the debug session Selecting Register when the Register Window has been already opened activates the Window E Changing Register Values The values saved by the registers displayed in the Register Window can be changed
99. To select from a list specify with the Open File Dialog Figure 5 1 5 displayed when you click the reference button on the right 2 When Menu is selected in Kind Enter the Workbench menu to be registered in the customize bar Specify with the Menu List Dialog Figure 5 1 7 displayed when you click the reference button on the right 3 When Tool is selected in Kind Enter the external tool to be registered in the customize bar Specify with the Select Tool Dialog Figure 5 1 8 displayed when you click the reference button on the right Parameter Enabled only when Batch File selected in Kind Input the parameter for executing a batch file Parameter Setting Dialog Enabled only when Batch File selected in Kind Displays Parameter Setting Dialog Figure 5 1 6 that can set change parameters with the customize bar when executing a batch file Iconic Enabled only when Batch File selected in Kind This makes Workbench an icon when executing a batch file with the customize bar Function Explain Enabled only when Menu selected in Kind Displays a description of the Workbench menu to be registered in the customize bar Up Changes the order of the registered contents displayed in the File List to one above Switches that order when there is already one registered to a number one above Down Changes the order of the registered contents displayed in the File List to one below Switches that order when ther
100. Uc aede eee LL e Pee Pai EID d EU PEE aie 246 4 5 8 1 Project Configuration Add and Delete sssssssssssseeeeenennenenen nennen 247 4 5 8 2 Project Configuration Configuration at Build 249 4 5 9 Include Dependencies 2 entree te dte e tret 250 4 5 10 Compile Make Build and Stop sssssssssssseseeeeee enne 251 4 6 Bj gcc ccce 252 4 6 1 RU oss tasse ouleU t tnt eee OR SII Ui e ote e cix E M IIS IS La 253 4 6 2 ADOS eique Ga ERE ce hi a ane 254 4 6 3 Reset MG it tier ie tt it ttu n e eth dre ot eei ee peep titel 255 4 6 4 liiis E 256 4 6 4 1 Break Point Details Setting ssesssssesssssssseseeeeee eene nennen intres nnne nnns 262 4 6 5 EVO omae noe a T EE e CONI Uc 265 vii 4 6 6 SEQUENCE 555 since t ar en tete ee et ee ute et ls ae ini bal ds 267 4 6 7 BSL el eee ere ee A A De Mut Line e ME kabel uia cd me 269 4 6 8 Time Measurements 2 etate t e HE Gur vo Fr rt ER RD teeth eet t 270 4 6 9 Gall zi ttsitiete sceau dite de poi e cS LN E Lice nE etre IS M eL e err 271 46 10 Cl ar Gall me inn tete eb p aito ELT Ie EHI decis 273 AOA MOGIQD ii remite E nei ete tre ti tte TOi ee 274 4 6 12 Load Target File 5 aulis rete ne ea d a ene ole aee Ye Lee da ege Ld 276 4 6449 Start Debug End Debug ire eet tenere eed eed teens 277 4 7 AS Uo marries Poe cee i CURES e I E LIUMK LE dE Ml C USE 278 4 7 1 Developmiernt i to ree eripe tute teer ar dedrera thu c
101. WDTON Otherwise the watchdog timer is started before the monitor program is set up involving the risk of generating a reset by the watchdog timer Interrupt level setting Allow UART SIO interrupt requests to be accepted If the ILR1 register is manipulated within the application program therefore modify the program such that bitl and bitO are set to B 00 request interrupt level 0 If the ILR1 register is not manipulated by the application program the monitor program sets ILR1 to OXFC during its internal initialization eliminating the need for additional setting Figure E 12 Coding Example in C L07 0 L06 1 L05 2 TO_ILR1 byte Ox1B L04 3 IO ILRI byte 0x18 L0420 Figure E 13 Coding Example in the Assembler L07 0 L06 1 L05 2 mov JO_ILR1 0x1B L04 3 mov IO ILRI 20x18 L04 0 UART SIO interrupt vector definition The forced break of Monitor Debugger is implemented by the UART SIO interrupt routine The UART SIO interrupt routine FGM_INT must therefore be registered to the vector Figure E 14 Coding Example in C Excerpt from Sample Program vector c ftinclude fgm h omission fpragma intvect FGM INT 4 UART SIO ch0 363 APPENDIX Figure E 15 Coding Example in the Assembler include fgm h omission SECTION INTVECT CONST LOCATE 0xFFF2 DATA H FGM INT IRQ04 UART SIO ch0 Q Ad
102. a complicated program several areas may be specified The number of areas that can be set is not limited set all the areas necessary to configure the memory map of the program to be developed In Auto Disposition Mode 2 the linker automatically allocates sections unspecified for allocation in a ROM RAM area The linker searches an available ROM RAM area beginning at the top of the ROM RAM Area List Click the Up button or the Down button to change the desired number E Setting of Sections 26 Selecting the area from the ROM RAM area list and clicking the Setup Section button open the Setup Section dialog enabling the sections to be allocated to the selected area When selecting an area click the start address of the area When the Setup Section dialog opens specify section names in the order the sections are allocated to the area Specify section names one by one When section name specification is completed click the Setup button to register the section names in the section name list When make or build is executed the sections are allocated to the area in the order the section names were registered in the section name list When setting the sections to be allocated to one area is completed click the OK button to return the linker option setting dialog Also set other areas in the same way CHAPTER 2 OPERATION Reference Allocating sections to several areas can be continuously set by changing ROM RAM area name
103. a default is D 256 of array element The default of this control is Enable If Disable is selected the watch window and the local window may be displayed slowly Note If memory buffering is set as valid correct value such as I O to request read of fixed size cannot be displayed Radix Figure 4 7 13 Debug Environment Setup Dialog Radix Setup debug environment Radix Sets the radix for numerical value display and analysis Display Source Line Switches source line display and nondisplay 293 CHAPTER 4 MENUS Emulation MB2141 Figure 4 7 14 Debug Environment Setup Dialog Emulation Setup debug environment Memory Verify Operation Specifies whether to verify memory when data is written to memory Sampling Timing Machine Clock rise Sets the rising of the machine clock as sampling timing External Clock Input rise Sets the rising of the external clock as sampling timing External Clock Input fall Sets the falling of the external clock as sampling timing Timer minimum measuring unit Specifies the minimum unit for execution time measurement 1us 100ms 294 CHAPTER 4 MENUS Chip MB2141 MB2146 09 Figure 4 7 15 Debug Environment Setup Dialog Chip Setup debug environment Watchdog Specifies whether the watchdog timer is valid or invalid 295 CHAPTER 4 MENUS Parallel Port MB2141 Figure 4 7 16 Debug Environment Setup Dialog Parallel Po
104. a file is being edited is performed 120 CHAPTER 4 MENUS 4 3 Edit Menu The edit menu provides such functions as file editing find string and error jump B File Editing Function The file editing function includes the following Undo Redo Cut Copy Paste Delete All Select E Character String Search Function The character string search function includes the following Find Replace Find in Files E Jump Function Enables to move to any place in a window quickly Jump E Bookmark Function Enables to setup a bookmark or to jump to the bookmark Bookmark B Error Jump Function The error jump function includes the following Previous Error Next Error Top of Error Bottom of Error E Property Function Display the information of activated window Property 121 CHAPTER 4 MENUS 4 3 1 Undo Redo Undo cancels the immediately preceding editing and undoes the status before the editing Further Redo can undo the deleted editing to the previous status E Target The function is available only for edits for the edit window It can also continuously cancel or undo a series of actions for successive addition or deletion of characters and lines Note This function is valid only for the edit window Note that the value changed in the Memory or Register Window when SOFTUNE Workbench is in the debug session cannot be undone Undo Redo function may not always work for a large a
105. a neta denn nn nna 145 4 3 9 3 Property Source Window ssssssssssssesseseeeneenneneen nennen trennen nins tnrr nnns sinere 146 4 3 9 4 Property Symbol WinidOW iier rrt i tegit e i Eee Eon I Eo ceo Ee ends 147 4 3 9 5 Property Local WINKOW s nite t cu EE ERE eR sicedivasiiede HR Eee AERA ER He te braun 148 4 3 9 6 Property Watch Window sssssssseseeeeneenee eene nennen enne inen ener nnne 149 4 4 ACA 150 vi 4 4 1 Project OUIpUt n aster neds tikes died Latet ete d tud eti ende ain tla 151 4 4 2 oVmbOol x cer Mc p erat Ld tnc ME kabet ia reer erect 152 4 4 3 heilen 153 4 4 4 Hoeglster 5 ote tup COD dius DN Itt ehu etd ee brdieus 155 4 4 5 MEMO ses T 157 4 4 6 L062l noni corr aie iie diede et eiie eani Reo dt 166 4 4 7 VUE cc EE 168 4 4 8 Tace a nents Ae eaten inh a m lente Ehe 171 4 4 9 Gomiiangds musco e eot Lt ere distet pute ere ee UT 177 74 10 Tool Bar Status Bar FAB swe ieiesssteceionacitevebawcved ir e d Enna Pere te e t ded aat Pep eed Lg Pin 178 4A ObJ8cU inue eo EN EGG ed Ie Nus eu te enge Paus 179 4 42 GoVerage nme Hel elie geese aee Ue EE IR CO ERE desee ee ines 184 AAT REM inpount Inc Aere c 186 44 14 EOD aii niodo tc nh coe eon e EI seti e ast ra tee E perl i Pe n EET eris 189 4 5 Project ipa tie tin oe tpe dent dtes eee c e fe d ati S C tdt 191 4 5 1 Active Project u esse dot en enim enDibena ebd mts 192 4
106. able Area list Set Attribute and Area To delete an area click the Delete button To set an area automatically after the load module file has been read click Default 184 CHAPTER 4 MENUS E Coverage Rate Select Total Coverage from the short cut menu of the Coverage Window The total coverage rate and the coverage rate for each address range are displayed Figure 4 4 35 Coverage Rate Dialog total coverage 18 1 COO0 FFFF 185 CHAPTER 4 MENUS 4 4 13 Performance Performance displays the Performance Window E Performance Window Open the Performance Window to display the performance measurement result The Performance Window is used to control and set performance This function can be used only in the MB2141 emulator E Performance Control Select Setup from the short cut menu of the Performance Window When the buffer is full set whether to break buffer full Figure 4 4 36 Performance Control Dialog Performance ctrl x Buffer full break C Not break E Performance Setup Select Display Scope from the short cut menu of the Performance Window Figure 4 4 37 Performance Setup Dialog Display mode Unit Ins Lower mm Interval Display Mode Select Automatic or Manual When Manual is selected set Lower Scope and Interval Lower Specify display start time for detailed measurement result display Interval Specify dis
107. ables definition of shortcut keys E Keyboard Setup Procedure 1 Select a type Functions are displayed in Function List 2 Select the function to be set from Function List The explanation of the selected function is displayed in the explanation field lower part of the keyboard setup dialog When an assigned function is selected the currently assigned keys are displayed in Assign key 3 Set a focus in New Assign then specify the key to be assigned to the selected function from the keyboard press the key 4 Click the Set button E Procedure for Deleting an Assigned Key 1 Select the function corresponding to the key to be deleted see 1 and 2 in the keyboard setup procedure above The currently assigned keys are displayed in Assign key 2 Select the key to be deleted from the key list displayed in Assign key 3 Click the Delete button The dialog for checking to be deleted the key opens 4 Click the OK button E Procedure for Changing an Assigned Key 1 Delete an assigned key see the procedure for deleting an assigned key above 2 Set a focus in New Assign then specify the key to be assigned to the function from the keyboard press the key 3 Click the Set button E Displaying the Current Setup State List Click the Definition List button to display the key definition list E Restoring all the Set Keys to the Initial State Click the Reset button Note Several keys can be assigned to o
108. allocate the size of space for use by the application program and additional 4 bytes for use by the monitor program If you specify a symbol correct the argument of the IMPORT instruction at the same time Figure E 6 2 is an example in which the stack area address is STACK TOP USER ABOOTADR Specify the address of the auto boot checker The auto boot checker is described in Il Creating an Auto boot Checker If you specify a symbol correct the argument of the IMPORT instruction at the same time Note that setting this address to 0x0000 or OxFFFF makes the auto boot checker invalid Figure E 6 3 is an example in which the auto boot checker is a C language function of AutoBootCheck USER PASSWORD Specify the password for connecting the debugger Set a 4 byte value Figure E 6 4 is an example in which the password is 0x12345678 Note 360 To use the password effectively use the flash security feature of flash memory as well Enabling the flash security feature protects flash memory from being read from or written to through external pins while allowing debugging with Monitor Debugger Use meticulous care in password management APPENDIX E Installing Monitor Debugger E Modifying the Application Program Modify the application program to include the monitor program The table below lists the items to be modified Table E 7 Items to Be Changed in the Application Program It
109. am stopped 254 CHAPTER 4 MENUS 4 6 3 Reset MCU This section explains the MCU reset function of the debugger E MCU Reset Function The MCU reset function resets the MCU Emulator debugger The MCU reset function issues the reset signal to the emulator Simulator debugger As with the actual chip set the initial values of the registers to be initialized by reset and clear other registers to 0 In reset MCU break points watch points map setting and program variables are not modified 255 CHAPTER 4 MENUS 4 6 4 Break Point This section explains how to set reset and modify a break point and how to display a break list E Break Point When the PC passes an address or the program accesses data at an address the position where program execution by the debugger is to be stopped is called a break point H Code Break Point When the PC passes the set address when the address is executed the break point where program execution is to be stopped is called a code break point E Setting of Code Break Point Emulator debugger Figure 4 6 1 Break Dialog Code Code Data Break address ic 60 E Extend Break list XEM C160 sort val enable C304 main enable C356 sample c 75 Enable Disable Delete All delete 256 CHAPTER 4 MENUS Simulator debugger Figure 4 6 2 Break Dialog Code Code Data Break address H C160 Pass count o Extend
110. argets in Target of setting Default and Project name See Target of setting for which one is currently set Default When the Customize Build is set when no project is opened the default setting can be changed The Customize Build setting is referred when creating a new project and is copied to that project Default is displayed in Target of setting Note When a project created in an older version is opened this setting is also referred and copied to that project Project Name Customize build is set for the project The tool operates at Compile Assemble Make or Build for the opened project B Export The Export button is clicked to open the Export dialog shown in Figure 4 5 41 By specifying the project in this dialog tool information can be copied to other projects in workspace Figure 4 5 41 Export Dialog Target OK subpri prj Cancel All select ip B Reset To clear the currently set state and return to the default setting click Reset button The Reset button can be used when the setting target is Project 242 B Title CHAPTER 4 MENUS Input the tool name duplicated tool names do not cause a problem E Execution File Name E Option Input the file name of the executed tool Specify the option for the executed tool A macro can be specified in this field For the macros refer Section 1 11 Macro Description Usable in Manager in the SOFTUNE Workbench User s Manual W
111. as been already deleted or moved to another directory it cannot be opened even if it is listed here 119 CHAPTER 4 MENUS 4 2 41 Exit Exit terminates SOFTUNE Workbench B WhenaFile is being Edited The dialog for asking the operator whether to save the file being edited opens Yes button Saves the file being edited and terminates SOFTUNE Workbench No button Terminates SOFTUNE Workbench without saving the file being edited Cancel button Does not terminate SOFTUNE Workbench Bi When the Workspace is Opened The dialog for asking the operator whether to save the current workspace information opens Yes button Saves the current workspace information in the file No button Does not save the current workspace information in the file Cancel button Does not terminate SOFTUNE Workbench If no file is being edited SOFTUNE Workbench terminates immediately If there is a file being edited processing explained in When a file is being edited is performed E When SOFTUNE Workbench is in the Debug Session As in processing explained in When the workspace is opened the dialog for asking the operator whether to save the current workspace information opens Clicking Yes or No from this dialog continues processing and automatically terminates the debug session If no file is being edited SOFTUNE Workbench terminates immediately If there is a file being edited processing explained in When
112. at debugging E Source Window Figure 3 7 1 shows an example of the source window B Function Break point setting releasing A break point can be set or released by left clicking gt O of O at the left edge of the source window Instruction execution to specified line address An instruction can be executed at the specified line address by left clicking of gt O of gt at the left edge of the source window Step execution step into is also enabled by clicking at the PC location Pop up display of variable value By placing cursor of mouse on the name of variable that variable value can be viewed as pop up Bookmark setup function By setting a bookmark it enables to view the specified line using search bar and menu or key operation Please refer to 4 3 7 Bookmark for details Drag and Drop It is possible to drag a character string selected at source window and drop it to memory diassemble and watch windows Please refer to description about drag and drop at each window for operation done after dropping character string Display coverage Coverage can be displayed on a source line basis from the short cut menu Display coverage In Mix Display coverage is displayed on a machine instruction basis Update of the source window is required to display the latest coverage It is only valid while MB2141 emulator debugger Figure 3 7 1 Example of Source Window B mie c Line number naini
113. ategory General Define Macro Include Path Target Depend or Output List can be selected as category Specified options can be checked using Option at the bottom of the dialog If the individual option is set the Common Option button can be clicked to return to the common option The macro description can be used to describe options For the macro description refer to Section 1 11 Macro Description Usable in Manager of SOFTUNE Workbench User s Manual E Setting General Options Figure 4 5 21 General Option Setup Dialog Setup Project LX General MCU C Compiler Assembler Linker Librari gt Category TT v1 Common m Outputs start message Target of setting MB89w 625 7 v Outputs debug information Warning Level Level 2 Y v Control of default option file Other Option The following options can be set from the general option setup dialog Outputs start message V Outputs debug information g 217 CHAPTER 4 MENUS Control of default option file Xdof Warning Level w Level 0 to 3 Select Warning Level from the drop down list In Other Option all assembler options can be written like startup options from command lines Write the options that do not belong to any assembler option setup categories directly in Other Option E Setting a Macro Name Figure 4 5 22 Macro Name Setup Dialog Setup Project LXI Targe
114. atus display and log end Close Closes Command Window Load Batch File 1 Click the right button of the mouse to display the short cut menu 2 Select Load Batch File from the short cut menu The Open File file dialog opens 3 Select a batch file from the dialog then click the Open button Load Alias File 1 Click the right button of the mouse to display the short cut menu 2 Select Load Alias File from the short cut menu The Open File file dialog opens 3 Select an alias file from the dialog then click the Open button Macro etc 1 Click the right button of the mouse to display the short cut menu 2 Select Macro etc from the short cut menu The Replace command dialog opens For details see Section 3 15 1 Replacement Logging For logging see Section 3 15 2 Logging Close 1 Click the right button of the mouse to display the short cut menu 2 Select Close from the short cut menu Setting Character String CHAPTER 3 Windows 3 15 1 Setting Character String Replacement This section explains how to set character string replacement in the Command Window E Setting Character String Replacement The aliases variables and macro names of the commands used in the Command Window can be defined B Alias The commands to be used often can be started simply by specifying their names Set and delete aliases in the following procedures Adding an alias 1 Click the right button o
115. ays posted as 0 382 APPENDIX F External I F for Simulator F 8 SSDI Execute Event Post Execute Instruction Format void SSDI Execute Event EXECUTE_EVENT info Argument typedef struct unsigned long addr Access address unsigned long total cycle Total cycle count EXECUTE EVENT Return value None Explanation Posts the occurrence of a fetch access event by instruction execution This event posts only the starting address of the instruction immediately before instruction execution Remarks 383 APPENDIX F 9 SSDI Interrupt Event Post Interrupt Format void SSDI Interrupt Event INTERRUPT EVENT info Argument typedef struct int int number Interrupt number unsigned long total cycle Total cycle count unsignedlong int cycle Cycle count of interrupt processing unsigned long cycle Count of cycles delayed INTERRUPT EVENT Return value None Explanation Posts the occurrence of an interrupt event by instruction execution Set the count of cycles generated during processing as the count of cycles delayed info cycle In the ISS this value is added to the cycle count If this event causes an error stop instruction execution by using SSDI Request Abort Remarks The cycle count of interrupt processing int cycle is always posted as 0 384 APPENDIX F External I F for Simulator F 10 SSDI Timer Event Post Timer Format void SSDI Timer
116. bar display to nondisplay and deletes the check mark from the menu When the status bar is not displayed SOFTUNE Workbench displays the status bar and adds a check mark to the left end of the menu Property 1 Click the right button of the mouse to display the short cut menu then select Property from the list SOFTUNE Workbench displays file information See Section 4 3 9 Property 63 CHAPTER 3 Windows 3 6 1 Setting Standard Editor This section explains how to customize the standard editor Setting the Standard Editor Some standard editor functions can be customized Items that can be customized Display function Line feed mark display Tag code mark display EOF code mark display Line number display Zenkaku spc display Ruler display Automatic indent function Colored display of C keyword Colored display of ASM keyword Colored display of user keyword Colored display of comment statement Font Tab count Display color Bookmark Error line Ckeyword Assembly keyword User keyword Comment statement Line Feed Tab Zenkaku Spc Keyword to be highlighted E Customization Procedure Display Function Selection 1 Click the right button of the mouse in the edit window to display the short cut menu then select Customize from the menu The standard editor dialog shown in Figure 3 6 2 opens 2 Select the function item you want to set or reset from the Item lis
117. c ROM flash memory OXFFCO OxFFC1 2 2 CALLV 0 vector OXFFF2 OxFFF3 3 3 UART SIO interrupt vector OXFFFC OxFFFF 4 4 Reset vector Ey byte 5 4 bytes added to the stack RAM 0x0473 0x047F x ytes a ed to the stack area fi licati Stack area 4 bytes 5 a a ae UART SIO Ich RESET pin Operable via the BGM adapter The pins are shared with the UART SIO I O ports 3 T O ports 6 6 P10 P11 P12 Wild register 3 points Note The start address of monitor code may vary depending on the version of the monitor program In addition to the above resources the following resource must be available temporarily during object loading Note Table E 3 Additional Resource for Object Loading Resource name Condition Remarks About 0 8 KByte 0x0080 0x03AF Location addresses fixed 0x045C 0x0472 Note The resources used during object loading are requirements for Monitor Debugger For the requirements for using the flash programmer refer to the relevant manuals 356 APPENDIX E Installing Monitor Debugger Figure E 3 Outlined Resources for Use by Monitor Program 0x0080 0x0473 0x047F RAM in detail Monitor stack 4 byte Monitor work area 13 byte F2MC 8FX gt UART SIO I O Wild register 1 4 bytes added for application Flash memory in detail Monitor program CALLV 0 vector IRQ4
118. ce file has been already opened but SOFTUNE Workbench is not in the debug session The file dialog for selecting a workspace file opens When a workspace file name is specified SOFTUNE Workbench closes the currently open workspace file and then opens the specified file If the open registered file is not saved although it is being edited the dialog for asking the operator whether to save the file opens Yes button Saves the file using the existing file name and continues processing No button Continues processing without saving the file Cancel button Cancels workspace open processing When the existing workspace file is not open The file dialog for selecting a workspace file opens When a workspace file name is specified SOFTUNE Workbench opens the specified file When a workspace file is opened the used window when the file was saved is redisplayed Cancel button Processing is continued with the file being edited opened The project file can be opened instead of the workspace file For details see Section 2 3 Creating Workspace CHAPTER 4 MENUS 4 2 5 Close Workspace Close Workspace closes the currently open workspace file E When the Currently Open Workspace File is not Edited at All When the workspace file is closed the dialog for asking the operator whether to save the current workspace information opens Yes button Saves the current workspace information and closes the workspace f
119. cedure 1 Select New from the File menu 2 Select Project Workspace File from the file open dialog Select the absolute format ABS from the new creation dialog Specify a project name Specify a project directory Select a target MCU name and chip type E Setting of Workspace Perform setting common to projects to be stored in workspace 1 Select Set Workspace from the Project menu 2 When the Set Workspace dialog is opened perform the following settings Debug when workspace opened Start debugging Save setup information Save E Settings Related to the Debugger 1 Select Project Setup from the Project menu 2 When the setup dialog opens open the Debug tag and select Setup category 3 Set a setup name A project name is set both in Setup Name List and Valid Setup Name as the default setup name Usually setup names are identified by the type of the debugger to be used However if only one debugger is used the default name may be used as it is When the default name is used select the default name already set in Setup Name List then click the Change Setup button When another name is used specify Setup Name then click the Add Setup button il Setup Wizard Clicking the Add Setup or Change Setup button starts the Setup Wizard for debuggers Once Setup Wizard has been started set items according to instructions from Setup Wizard For how to set items with Setup Wizard see Section 4 7
120. ch files in the customize bar input the relative path or the absolute path from the current directory project directory for the batch files When registering batch files in the customize bar always use a comma to separate parameters when specifying multiple parameters This is the same for the Parameter Setting dialog Figure 5 1 6 If you have registered either a batch file or a Workbench menu to be enabled with the Debugger started in the customize bar pressing the corresponding button does not execute the registered item unless the Debugger has been started APPENDIX The Appendixes describes the register name downloading monitor program setting LAN interface setting USB interface creating ROM on monitor debugger target external I F for simulator APPENDIX A List of Register Names APPENDIX B Downloading Monitor Program APPENDIX C Setting LAN Interface APPENDIX D Setting USB Interface APPENDIX E Installing Monitor Debugger APPENDIX F External I F for Simulator 349 APPENDIX APPENDIX A List of Register Names Register names are displayed B Registers The registers that can be operated by SOFTUNE Workbench differ for each MCU type as follows Accumulator A Temporary accumulator T Stack pointers SP Program counter PC General purpose registers RO to R7 Interrupt level ILO IL7 Others RP DP CCR PS IX EP Flags HLN ZV C 350 APPENDIX B Downloading Monitor Program AP
121. ches whether to enable or disable monitoring Individual setting Each variable which is registered user sets ON or OFF of monitoring User distinguishes between ON and OFF by a color of square ICON A blue means on a red means off Property Displays watch properties Close Closes watch window Property Click the right button of the mouse on a displayed variable name to display the short cut menu then 1 select Property from the menu Information for the variable is displayed For details see Section 4 3 9 Property Click the Close button 85 CHAPTER 3 Windows 3 14 Trace Window This section explains the Trace Window This window is displayed only when SOFTUNE Workbench is in the debug session BB Trace Window The Trace Window displays the trace result For the trace function see Section 4 4 8 Trace Figure 3 14 1 shows an example of the Trace Window Figure 3 14 1 Example of Trace Window Bi Trace LL BE x frame no address startup asm 94 C17 il Short Cut Menu Refresh Jump Back Trace Instruction Cycle Source Setup Find Save Clear Close Instruction cycle source mnemonic q Column title This line CALL main is not scrolled CALL main IX SP IX 0024 Refresh Trace Window See Section 4 3 6 Jump See Section 4 4 8 Trace Displays trace result in instruction mode Displays trace resul
122. control Upload FLASH memory menu Synchronizes Flash memory and the buffers within the Debugger Be sure to perform this synchronization when Flash memory is rewritten updated by the user program or the program would not operate properly E Erase FLASH Memory Environment FLASH area control Erase FLASH memory menu Erase all data in Flash memory Note that this operation will erase all code break software break settings 309 CHAPTER 4 MENUS 4 7 5 Tool Tool sets the tools to be directly started by SOFTUNE Workbench B Tools Tool is not a tool that takes charge of basic SOFTUNE Workbench functions such as a C compiler and assembler It is a function that builds auxiliary tools e g simple filters into the system so that they can be started directly from SOFTUNE Workbench Building dir into the system for example enables the output of the result obtained as a result of executing the dir command at the DOS prompt to the SOFTUNE Workbench Output Window Figure 4 7 28 Tool Setup Dialog Setup Tool x Title Execute Filename Browse Option Executing Directory Browse Designate additional option when executing Set Use output window Tool List Macro define Z Filename d File Path ZF Filename M ain e Filename E tension a Loadmodulefile ZD Loadmodulefile path amp Loadmodulefile M ain ZE Loadmodulefile E tension x Project
123. ct When a new project is created workspace to store the project is also created In this case the name and position of workspace are the same as those of the project Creating workspace in opening project When File Open Workspace is selected to open a project workspace to store the project is also created In this case the name and position of workspace are the same as those of the project If any workspace file already exists however it is opened instead of the project file Creating blank workspace Blank space that has no project is created Projects must be stored separately In this case projects can be stored different in name and position from workspace E Creating Workspace in Creating New Project 1 Select File New When the New dialog is opened select Workspace Project File in Type of File and click the OK button Select the Project tab When the New dialog is opened select the Project tab Select Create New Workspace Click the Create New Workspace check button to create project Create workspace in the same way that a new project is created E Creating Workspace in Opening Project 1 2 Select File Open Workspace Select Project File in Type of File When the Open Workspace dialog is opened select Project File in Type of File Select the project file to be opened Select the project file to be opened 4 Click the Open button E Creating Blank Wo
124. cted A reset occurs after object loading For object loading the RAM monitor is used to reprogram flash memory After reprogramming Monitor Debugger issues a reset for transition from the RAM monitor to the regular monitor Note also that RAM values recorded before object loading are destroyed 372 APPENDIX E Installing Monitor Debugger Restricted Consider the electrical characteristics observed immediately after the power is turned on Immediately after the power is turned on the I O ports may be unstable in status For referencing an I O port by the auto boot checker design it in due consideration of its electrical characteristics B If Monitor Debugger Looses Control If the application program runs out of control for example Monitor Debugger may lose control communication is disabled between the host system and the target In that case follow the procedure below to restart the debugger 1 Select Debug D Abort A Otherwise press the execution stop button 2 Press Abort A in the abort dialog The MCU cannot be reset at this time Ignore recurrent display 3 When the Cannot Abort warning is issued press OK 4 Terminate the debugger and reset the target system 5 Restart the debugger 373 APPENDIX APPENDIX F External I F for Simulator Simulator debugger for F27MC 8L 8FX supports the external I F to create peripheral simulation modules This section describes external I
125. d set a port and baud rate When LAN is selected set a host name Click the Next button Set whether or not to automatically load the monitor program at debugging start Click the Next button Set whether or not to load the target file automatically during debugging Specify the batch files used before and after load as required Clicking the Refer button to the right of each input field enables batch file selection Click the Next button Select the item to be set in the setup file When Specify is selected click the Setup button to open the item selection dialog select the item to be set from the dialog then click the OK button Click the Next button Click the Complete button Emulator MB2141 setup has been just completed 303 CHAPTER 4 MENUS E Procedure When the Emulator MB2146 09 is Selected Qo NON IU Ea Soo Boa arcs Select the emulator type Click the Next button Select USB as the device type Click the Next button Specify the oscillation frequency to be useful FcH and clock up mode Click the Next button Set whether or not to load the target file automatically during debugging Specify the batch files used before and after load as required Clicking the Refer button to the right of each input field enables batch file selection Click the Next button Select the item to be set in the setup file When Specify is selected click the Setup butt
126. d address of memory area to be filled with data Data filling is continued to this address Type Specifies type of filled data Byte Word Long ASCID Fill Data Specifies filling data to fill specified memory area Several filling data can be specified delimited by a comma 160 CHAPTER 4 MENUS Copy Figure 4 4 9 Memory Operation Dialog Copy Memory operation To copy data to memory open the Copy tag then set the copy source start address copy source end address and copy destination start address Start Address Specifies start address of copy source area Data copy is started at this address End Address Specifies end address of copy source area Data copy is continued to this address Target Address Specifies start address of copy destination area 161 CHAPTER 4 MENUS 162 Copy to emulation memory MB2141 Figure 4 4 10 Memory Operation Dialog Copy to Emulation Memory Memory operation To copy data from user memory to emulation memory open the Copy to Emulation Memory tag then set the transfer start address and transfer end address Start Address Specifies address at which data transfer is to be started Copy to emulation memory is started at this address End Address Specifies end address of transfer source area Copy to emulation memory is continued to this address CHAPTER 4 MENUS Match with emulation memory MB2141 Figure 4 4 11 Memory Operati
127. ddress Specifies the start address to be set End Address Specifies the end address to be set Attribute Specifies a memory space attribute Read Write or Code Type Specifies a setup area type 307 CHAPTER 4 MENUS Undefined Area MB2141 emulator Figure 4 7 27 Undefined Area Setup Dialog Setup map Undefined Area Access Approval Permits access to the undefined area Access Forbidden Inhibits access to the undefined area 308 CHAPTER 4 MENUS 4 7 4 FLASH Area Control The MB2146 09 emulator supports programming to the Flash memory area B FLASH Area Control The MB2146 09 emulator supports functions of programming to the Flash memory area and of code breaks software breaks The emulator saves the contents of the Flash memory area in the debugger s buffer and references the buffer s contents when reading from programming to the Flash memory Writing to Flash memory is usually performed automatically prior to executive operation or reset processing E Download FLASH Memory Environment FLA SH area control Download FLASH memory menu Updates Flash memory Flash memory is usually updated automatically prior to executive operation or reset processing Use this menu when updating Flash memory before automatic updating This menu is enabled when data in the Flash memory area is changed requiring the writing to of Flash memory E Upload FLASH Memory Environment FLASH area
128. directly by the following procedures Full change 1 Double click a register name or display value The register name or display value is reversely displayed 2 Specify the values to set in turn using a hexadecimal number starting from the highest order digit leftmost digit The register value is set automatically when the digit in the lowest order bit rightmost digit is changed Partial digital bit field change 1 Click the digit to be changed in the register value display The cursor appears at the left of the clicked digit 2 Set the new value as a 1 digit hexadecimal number The cursor automatically moves to the right digit If the changed digit is the lowest order digit the register value is updated automatically 3 When changing of the required number of digits is completed click another register name or register value display If the Register Window is closed without clicking another register name or register value display the changed value is not set in the register This operation is not necessary when the change to the lowest order bit is completed Selected register name change 1 Click the right button of the mouse in the Register Window to display the short cut menu then select Edit The register edit dialog shown in Figure 4 4 3 opens 2 Select a register name 3 Input the value to set 4 Click the OK button 155 CHAPTER 4 MENUS Figure 4 4 3 Resister Edit Dialog Register name se
129. dition of auto boot checker After a reset the monitor program waits for connection from the debugger without starting the application program This allows debugging from the beginning of the application program When debugging is completed however the application system cannot run independently with the debugger disconnected To solve this problem the auto boot checker is executed immediately after a reset to select whether the application program is started automatically Note however that the auto boot checker is not required when the application system does not have to run independently The auto book checking method is not specified precisely Since it is executed immediately after a reset pay attention to that resources have not be initialized and that the execution if it takes time can delay the start of the application For details see BE Creating an Auto boot Checker 364 APPENDIX E Installing Monitor Debugger E Creating an Auto boot Checker The auto boot checker is required for the application system to work with the monitor program included after debugging Table E 9 Auto boot Checker auto boot checker USER ABOOTADR Processing Checks whether the application can get started automatically Argument void None int Enable disable automatic start 0x0000 Do not start the application automatically Else Start he application automatically Return value EP register value SP register Thi
130. e Activate when stop 77 CHAPTER 3 Windows 3 10 Register Window This window is displayed only when SOFTUNE Workbench is in the debug session The Register Window is used to display and modify MCU register values during debugging E Register Window Figure 3 10 1 shows an example of the Register Window When debugging the Register Window displays the register values Register values can be rewritten directly To rewrite values using expressions and symbols etc select Edit from the short cut menu for the Register Window Arrange registers according to the size of the Register Window To select the registers to be displayed select Setup from the short cut menu for the Register Window Figure 3 10 1 Example of Resister Window m Register ojx PC F30D A O0OFF T 07FF IX D000 SP 00D6 EP F000 IL 3 FLAGS N RP 00 RO FF Rl1 FF R2 FF R3 FF Each condition flag status is displayed it can be also changed R4 FF R5 FF R6 FF R7 FF Register names and values are displayed A displayed register value can be rewritten by entering a new value E Short Cut Menu 78 Setup Setup See Section 3 10 1 Setting Register Display Edit Displays Register Edit Dialog Close Closes Register Window Edit Edits register values Beside this operation the numerical values displayed in the Register Window can be directly edited See Section 4 4 4 Register 1 Click the right bu
131. e 4 5 17 opens 2 Select the include path to reset in the Include Path List 3 Click the Delete button E Changing the Include Path Retrieval Order Include paths are retrieved in turn from top of the Include Path List The order in which include paths are registered in the list can be changed as follows 1 Select the Include Path category The include path setup dialog shown in Figure 4 5 17 opens 2 Select the include path whose order is to be changed from Include Path List 3 Click the Up or Down button to move the cursor to a relevant position E Setting Optimize Options Figure 4 5 18 Optimize Option Setup Dialog Setup Project MB83w625 sample pr The following options can be set from the optimize option setup dialog Select the optimize option to set from the drop down list General purpose optimization level O None Levell 4 speed priority size priority 213 CHAPTER 4 MENUS E Setting of Options Included in Detail Definition in Optimization Figure 4 5 19 Optimize Details Setup Dialog Optimization The following options can be specified Loop unrolling K UNROLL In line expansion of standard library functions or replacement to equivalent function K LIB Optimization of changing the evaluation method of arithmetic operations K EOPT Optimization of argument area on stack K ADDSP Control optimization of pointer aliasing K
132. e Dependencies E Make build Execution Compile Make Build Stop Note No selection can be made during debug session Quit the debugger 191 CHAPTER 4 MENUS 4 5 1 Active Project The active project is replaced E Active Project When the names of all projects in workspace are displayed in the submenu click the name of the project that is made active A checkmark is placed at the left side of the active project name in the menu 192 CHAPTER 4 MENUS 4 5 2 Add Project A project is added to workspace B Add Project There are the following two menus to add a project New A new project is created and stored in workspace Project An existing project is stored in workspace Note If any project having the same name as that of the project to be stored is in workspace it cannot be stored in workspace 193 CHAPTER 4 MENUS 4 5 2 1 Add Project Create A new project is created and stored in workspace E Add Project Create Figure 4 5 1 Create Project Dialog Loadmodule BS wc m MB89051 Rl ges C Softune Dependencies Pew 7 Oe cms Project Type Select the project type For details about the project type see Section 2 4 Storing of Project Create new workspace New workspace is created for storage of a project This item cannot be selected Add to the current workspace A project is sto
133. e directory selection dialog is displayed and the execution time directory can be selected from this dialog Set Enable Designate additional option when executing and Use Output window if necessary Select a category or two or more tools from the tree view to batch change Enable Designate additional option when executing and Use Output window Set the temporary file data as necessary Click the OK button to complete setting E Deletion Procedure 1 3 Select Project Customize Build The Customize Build setting dialog is displayed Figure 4 5 40 Use the tree view to select the title of the tool to delete When a category is selected all the tools in the category are deleted Two or more tools can be also selected Click the DELETE button E Start Sequence Change Procedure 1 244 Select Project Customize Build The Customize Build setting dialog is displayed Figure 4 5 40 Use the tree view to select the tools for which the start sequence is to be changed Tools in the Before After category are sequentially executed from the top Click the UP and DOWN buttons to arrange in the start sequence Tools can be moved only within the category which the tools belong CHAPTER 4 MENUS 4 5 7 Project Dependencies A subproject is defined in the project E Project Dependencies Figure 4 5 42 Dependency of Project Dialog Dependency of project Ed Proj
134. e interpreted by the assembler For a C language function of AutoBootCheck for example use AutoBootCheck instead Figure E 6 Coding Example in fgm cfg h F2MC 8FX Family Monitor Debugger configuration file ALL RIGHTS RESERVED COPYRIGHT C FUJITSU LIMITED 2007 LICENSED MATERIAL PROGRAM PROPERTY OF FUJITSU LIMITED Start address IMPORT _ start define USER_STARTADR _ start oo 1 Stack top IMPORT STACK TOP define USER STACKTOP STACK TOP 2 Auto boot address IMPORT AutoBootCheck define USER ABOOTADR AutoBootCheck 3 password 4byte define USER PASSWORD 0x12345678 4 359 APPENDIX Table E 6 Monitor Operation Setting Items Description Remarks USER_STARTADR Application program start address USER_STACKTOP Stack pointer initial value for the application program USER_ABOOTADR Auto boot checker start address USER_PASSWORD Password for connecting the debugger USER_STARTADR Specify the start address of the application program This address is set as the reset vector when the monitor program is not included If you specify a symbol correct the argument of the IMPORT instruction at the same time Figure E 6 1 is an example in which the start address is __ start USER_STACKTOP Specify the address of the stack area to be used for the application program For the stack area
135. e is already one registered to a number one below Add Adds batch files Workbench menu or External tool to the customize bar If an item has already been registered in the specified number that number will be rewritten and registered Delete Deletes the contents registered in the customize bar Specify the number to delete in the File List 337 CHAPTER 5 Add in Module Figure 5 1 5 Dialog for Open File Open HEI Look in a Softune er E sample a Initialize prc Files of type ifs sul e M Cancel Ago Figure 5 1 6 Parameter Setting Dialog Parameter Setting Dialog x Batch File c Softune Initialize pre Parameter Cancel Figure 5 1 7 Menu List Dialog Menu List x Kind Function List Set Edit FileNewPrj View FileNewSrc Project FileOpen Setup FileLdPrj Cancel DEBUG FileLdSrc FileSave FileSvPrj FileSaveAs FileSaveAll FilePrint gt Explain New 338 CHAPTER 5 Add in Module Figure 5 1 8 Select Tool Dialog Select Tool NPTEPAD Figure 5 1 9 Setup Tool Dialog Setup Tool x NPTEPAD CAWINDOWSNNDTEP E NPTEPAD 339 CHAPTER 5 Add in Module 5 1 3 1 Registering Batch File This section describes registering a batch file in the customize bar E How to Register Batch File 340 1 Display dialog Select View Customize Bar Setting to display the Customize Bar Setting dialog
136. e of whether the character string is found For this reason when search terminates click the Cancel button to close the find dialog When SOFTUNE Workbench is in the debug session the Source Window can also be searched Figure 4 3 1 Find Dialog Find what search Match whole word only Direction Position All Find Match case C Up Cursor Regular Expressions Down C Top Came Ambiguous C Bottom When the replace dialog shown in Figure 4 3 2 opens specify a search character string and a replacing character string In this case character string search conditions Table 4 3 2 can be also specified from this dialog The found character string is displayed in reverse video Clicking the Replace button replaces the specified search character string with the specified replacing character string Clicking the All Replace button replaces all the character strings found before search terminates The replace dialog is not automatically closed irrespective of whether the found character string was replaced For this reason when search terminates click the Cancel button to close the replace dialog CHAPTER 4 MENUS Figure 4 3 2 Replace Dialog Find what find Wert Replace with Replace Match whole word only U e Cursor ATIHEDIBGE Match case D C Top Regular Expressions Bottom Cancel Ambiguous Table 4 3 2 List of Conditions and Explanation for Character String Search
137. e output directory is set to the relative path from the project file To make a change and check open the Set Project dialog For details see Section 4 5 5 Setup Project Set the directories such as the include path and library path specified in the tool option to the relative path or macro description For the macro description see Section 1 11 Macro Descriptions Usable in Manager of SOFTUNE Workbench User s Manual For the tool option see Section 4 5 5 Setup Project After the completion of the setting in steps 1 to 3 save the project Move the project without changing the directory structure in steps 1 to 3 35 CHAPTER 2 OPERATION 2 15 Useful Functions This section explains some useful functions to use in the SOFTUNE Workbench E Tab Display of the Windows In the SOFTUNE Workbench the displayed windows are tabbed This makes it easier to find the desired window quickly when multiple windows are displayed E Drag amp Drop between Windows SOFTUNE Workbench supports the drag amp drop function between windows in the debugger The followings are the windows that currently support the drag amp drop function Please refer to the description of each window for the operation by the drag amp drop Project window Source window Memory window Disassemble window Watch window Coverage window E Confirmation of the Setting SOFTUNE Workbench has various dialogs to set up functions Eac
138. ease input batch file 2 The following error message Figure 5 1 15 is displayed when you click Add without entering a machine name in the Entry when registering the Workbench menus in the customize bar See Section 5 1 3 2 Registering Workbench Menu 346 CHAPTER 5 Add in Module Figure 5 1 15 Error Message 2 S oftune896 x A Please select function on the list 3 The following error message Figure 5 1 16 is displayed when you click Add without entering a tool name in the Entry when registering the External tools in the customize bar See Section 5 1 3 3 Registering External Tool Figure 5 1 16 Error Message 3 S oftune896 x A Please input Tool 347 CHAPTER 5 Add in Module 5 1 5 Note This section describes the precautions for using the customize bar B Note 348 The customize bar cannot be used when the Workspace is not opening When opening the Workspace the previous settings are restored and the customize bar buttons are enabled Customized bars for registration are stored for each tool This allows a common set of restored data to be provided even if projects workspaces or setup files are switched When quitting the Debugger and the setup file was not saved the registered contents of the customize bar will not be saved For that reason when restarting the Debugger the registered contents of the customize bar will not be restored When registering bat
139. ect Configuration The active project configuration is a project configuration that undergoes Make Build Compile Assemble Start Debug and Include Dependence at default 1 2 Select Project Project Configuration Add and Delete Select the project configuration that is made active When the Add and Delete Project dialog is opened select the name of the project configuration that is made active Click the Active button Click the Active button The specified configuration and its project become active Click the OK button 23 CHAPTER 2 OPERATION E Deleting Specific Project Configuration from Project 1 Select Project Project Configuration Add and Delete 2 Select the project configuration that is deleted from the project When the Add and Delete Project dialog is opened select the project configuration name to be deleted 3 Click the Delete button Click the Delete button The specified project configuration is deleted When all project configurations in a project are deleted the project itself is also deleted 4 Click the OK button 24 2 8 CHAPTER 2 OPERATION Setting Tools When make or build is executed by SOFTUNE Workbench appropriate options must be set in such tools as a compiler assembler and linker Set these options as follows E Select the Project Setup Project Menu The Set Project dialog is opened The option selected in the Set Projec
140. ect name sample prj Cancel Project to be depended upon subprj prj Project name The name of the project which a subproject is defined in or deleted from is displayed Project to be depended upon The name of the project on which the selected project can depend in Project name is displayed The project name indicated by checkmark is the name of the subproject in the project selected in Project name Bi Procedure for Defining Project Dependence For the procedure to define project dependence see Section 2 6 Definition of Subproject 245 CHAPTER 4 MENUS 4 5 8 Project Configuration The project configuration is set E Project Configuration There are the following menus to set the project configuration Add and Delete The project configuration is added and deleted and the active configuration is changed Configuration at build The configuration as a subproject is made or built is set 246 CHAPTER 4 MENUS 4 5 8 1 Project Configuration Add and Delete The project configuration is set Add and Delete E Project Configuration Add and Delete Figure 4 5 43 Add and Delete Project Configuration Dialog Add and delete project Configuration x Project and Configuration sample prj Add Release Delete Debug subprj prj Active Debug Cancel Project and Configuration All projects in workspace and their configurations are display
141. ection 3 2 Tool Bar E Status Bar Status Bar can only switch display to nondisplay or vice versa For status bar display items see Section 3 3 Status Bar B Tab This function enables to choose whether the tab is displayed or non displayed for switching By selecting tab function tab will be attached to the windows Thus this makes easy to switch windows 178 4 4 11 Object CHAPTER 4 MENUS Object displays the Object Window E Object Window The Object Window displays the detailed object information used by REALOS This window can be also used to issue system calls To display detailed object information select an ID then select Property from the short cut menu E Detailed Display of Task Figure 4 4 27 Detailed Task Display Dialog ID 0001 Address 2100 Priority current 02 Priority activation 02 Status WAIT cwai_flg wobjid 0007 Wakeup count oo Time out control data 0000 Stack pointer 2341 Stack area 2253 2352 ID Address Priority Current Priority activation Status TTS RDY TTS DMT TTS WAI TSS SUS Wait factor TTW SLP TTW DLY TTW SEM Task ID number Task control block address Current task priority Task priority at start up Task state Running or ready state Dormant state Wait state Suspend state The wait factor is displayed when SOFTUNE Workbench is in the object wait state slp tsk tslp tsk wait state dly tsk wait state wal
142. ed 4 Click the OK button Property Click the right button of the mouse to display the short cut menu then select Property from the menu File information is displayed see Section 4 3 9 Property Mix Display 1 Click the right button of the mouse in the source window to display the short cut menu 2 Check Mix Display When a check mark is displayed to the left of Mix Display mix display is already set When a check mark is not displayed to the left of Mix Display mix display is not set 3 Select Mix Display When it is already set mix display is reset and the check mark is deleted When it is not set mix display is set and a check mark is displayed Display coverage 1 Click the right button of the mouse in the source window to display the short cut menu 2 Check Display coverage A check mark attached to the left side of Display coverage indicates that display coverage has already been turned on If a check mark is not attached to the left side of Display coverage display coverage is turned off 3 Select Display coverage Display coverage is turned off and the check mark is disappeared when it has already been turned on Display coverage is turned on and a check mark is attached when it has been turned off 71 CHAPTER 3 Windows Note The coverage display in the source window is not automatically updated You need to update the display with the latest information using t
143. ed Add Click this button to open the Add Project Configuration dialog shown in Figure 4 5 44 This dialog enables the addition of the project configuration Delete Click this button to delete the selected project and its configuration Active Click this button to make the selected project and its configuration active 247 CHAPTER 4 MENUS Figure 4 5 44 Add Project Configuration Dialog Add project Configuration x Project name subpri prj Configration name Cancel di copy of setting Debua Project name The name of the project to which the configuration is added is displayed Configuration name Set the name of the project configuration to be added A copy of setting Select the configuration to which settings are copied E Setting Procedure For the setting procedure see Section 2 7 Creation of Project Configuration 248 CHAPTER 4 MENUS 4 5 8 2 Project Configuration Configuration at Build The configuration as a subproject is made or built is set E Project Configuration Configuration at Build Figure 4 5 45 Set Configuration When Building Dialog Set Configuration when building Ed Project sample prj gt Configuration MBS9W625 X Configuration of sub project when make build a subpripri 9 Debug Project Select the parent project of a subproject Configuration Select the configuration of the parent project selected in P
144. ed and the following value is input When an underflow occurs The values that can be represented as unnormalized numbers are changed to unnormalized numbers The values less than unnormalized numbers are changed to 0 When an overflow occurs Values are changed to infinity CHAPTER 2 OPERATION A floating point number can also be specified in a hexadecimal number as follows H hexadecimal number SID Note If S and D are omitted D is assumed 2 1 2 CHAPTER 2 OPERATION Data and Address Formulas Symbols Line Numbers Character Constants The SOFTUNE Workbench provides symbols line numbers and character constants as the terms of data and address formulas E Symbol The symbols used in the source program can be referenced as addresses they have the type information generated by the C compiler and other accessory information The accessory information generated by the assembler is label information Each symbol consists of a module name a function name and a symbol name Specify these names as follows module name function name symbol name When the source program is written in the assembly language module name is the name written in the operand of the PROGRAM statement When it is written in the C language module name is the name of the source file to be compiled Function name is a function name written in the C language it is valid only when the source program is written in
145. ed when the Output Window is set to non view the Output Window automatically enters the view status Even if the Output Window is set to non view when make build compile or assemble is being executed error messages are never lost These messages are all displayed when the Output Window is redisplayed 151 CHAPTER 4 MENUS 4 4 2 Symbol Symbol views the Symbol Window E Symbol When the Symbol Window is opened all the symbols used in the target file are displayed in the tree format This function command can only be used when SOFTUNE Workbench is in the debug session Selecting Symbol when the Symbol Window has been already opened activates the Window 152 CHAPTER 4 MENUS 4 4 3 Assembly Assembly displays the Disassemble Window ll Assembly When the Assembly window is opened the assembly is displayed starting at the specified address Line assembly from the short cut menu is also possible This function command can be used only when SOFTUNE Workbench is in the debug session When the Assembly Window has been already opened The Assembly Window is activated When the Assembly Window is not opened The dialog for specifying the display start address Figure 4 4 1 opens Specify the address where display is to be started then click the OK button Figure 4 4 1 Dialog for Specifying Display Start Address Type Address Position H 0000C120 Cancel Window Assembly S Type
146. edit dialog shown in Figure 4 4 15 opens 3 Set a variable value then click the OK button Figure 4 4 15 Variable Edit Dialog Edit variable x e H ooo0001d Cancel 166 CHAPTER 4 MENUS E Setting Display Range at Array Expansion When an array is expanded a range of the element displayed in the window can be specified When clicking the right button of the mouse on an array variable in the local variable window to select Element in the short cut menu the array expansion dialog Figure 4 4 16 is displayed Figure 4 4 16 Array Expansion Dialog value 15 Start element End element Cancel c di Start element number Specifies start element number displayed at array expansion End element number Specifies end element number displayed at array expansion Only the specified range is displayed at array expansion At default all elements are displayed 167 CHAPTER 4 MENUS 4 4 7 Watch Watch displays the Watch Window E Watch Window The Watch Window displays the values of the specified variables in tree format The variable values modified as a result of program execution are updated automatically For this reason the user can observe how variable values change as a result of program execution The short cut menu can be used to modify the displayed variable values 1 Click the right button of the mouse in the Watch Window The short cut menu is displayed 2 Click Se
147. elect the HEX file you want to open from the submenu If the HEX file you want to open is not created no submenu item can be selected E Short Cut Menu Click the Right Button of the Mouse on a Subproject Name Figure 3 4 8 shows a short cut menu Figure 3 4 8 Short Cut Menu on a Subproject Name Delete Subproject Delete Subproject The subproject in the specified project is deleted To define a subproject again see Section 4 5 7 Project Dependencies E Short Cut Menus Click the Right Button of the Mouse on a Folder 48 Figure 3 4 9 shows a short cut menu Figure 3 4 9 Short Cut Menu on a Folder Create new folder Add Member to folder gt Set Make Build Delete Property Create New Folder When selected the Create New Folder dialog Figure 3 4 5 is opened Enter the folder name and click the OK button When the folder name is entered a folder is inserted into the selected folder The folders are listed in the order in which they are created Add Member to Folder When selected the following two submenus are displayed File A member is added in files to the currently selected project See Section 4 5 3 Add Member At default a member is inserted into the selected folder Directory A member is added in directories to the currently selected project See Section 4 5 3 Add Member At default a member is inserted into the selected folder CHAPTER 3 Windows Set
148. em Description Remarks Change to reset vector Change this to the monitor program start address FGM_INIT Stack area Add a 4 byte area for the monitor program Watchdog timer start routine Replace this with the monitor program API FGM_WDTON A Allow UART SIO interrupt requests to be Bit1 and bitO in the ILR1 Interrupt level setting accepted register UART SIO interrupt vector Register the UART SIO interrupt service to the FGM_INT definition vector Addition of auto boot checker Add the process of checking for auto booting Change to reset vector Set the reset vector to the monitor program start address FGM_INITQ FGM INIT is defined in fgm h Specify FGM INIT in C or FGM INIT in the assembler Figure E 7 Coding Example in C include fgm h omission pragma section CONST RESETVECT locate Oxfffc void const reset_vector 2 O void 0 0x00 Oxfffc d 0x0000 FGM INIT Oxfffe f FGM INIT 5h Figure E 8 Coding Example in the Assembler include fgm h omission SECTION RESETVECT CONST LOCATE 0xFFFC DATA H 0x0000 Oxfffc d DATA H FGM INIT Oxfffe f Stack area Add 4 bytes as the area for the monitor program In the stack pointer register set the bottom address of the stack area obtained with 4 bytes added Use the same value to define USER_STACKTOP in fgm_cfg h 361 APPENDIX Figure E 9 Coding Example in the Assembler SECTION STACK
149. ension of the backup project file v01 to prj Note Tool options are not passed to projects of SOFTUNE Manager V01 V02 Reset these options after read has terminated Be sure to reset User Include File Directory set by Set Environment Variable of SOFTUNE Manager V01 V02 as the Include Path option of the C compiler or assembler Also be sure to reset Library Search Path set by Environment Variable Setup of SOFTUNE Manager V01 V02 as the Library Search Path option of the linker If the workspace file having the same name as that of the specified project file is in the same directory the workspace file is opened instead of the project file and no project file is converted 34 CHAPTER 2 OPERATION 2 14 Moving Project Files This section explains how to move a project file to another directory or a personal computer B Procedure 1 Set the path to the member stored in the project file to the relative path from the project file In SOFTUNE Workbench files in the same drive as that of the project file are usually stored in the relative path To check whether the files are stored in the relative path check File Property in the SRC tab of project window For the file property see Section 4 3 9 Property Set the path to the target file directory object file directory and list file directory to the relative path from the project file In SOFTUNE Workbench when a new project is created th
150. ered as the watch variable is only restored 170 CHAPTER 4 MENUS 4 4 8 Trace Trace displays the Trace Window B Trace This function retroactively displays addresses and instructions executed so far Enable can be switched to Disable or vice versa during debugging Display per machine instruction cycle display display per source or display per task used by REALOS only can be selected as trace result display B Refresh The Trace Window display is not refreshed in real time according as debugging progresses Consequently to display the latest trace click the right button of the mouse in the Trace Window to display the short cut menu then select Refresh from the menu B Buffer Size Trace data is buffered in the trace buffer The trace buffer becomes full some time during debugging because its size is finite When the trace buffer becomes full the program being executed can be stopped E Trace Setup Select Setup from the short cut menu 171 CHAPTER 4 MENUS Trace Simulator MB2141 Figure 4 4 20 Trace Setup Dialog Setup trace Status Specifies control status Buffer Full Break Specifies whether or not to break trace buffer full Note In single trace and multitrace items are individually set 172 CHAPTER 4 MENUS E Trace Search Select Search from the short cut menu Address Simulator Figure 4 4 21 Trace Search Dialog Address Search trace __ Coe
151. etup Development x Environment Variable Workspace Value of Environment Variable Environm New Value PATH D Softune BIN D WwINDOWS system32 D WINDO FETOOL D Softune INC896 D Softune LIB 8964INCLUDE LIB896 D SoftunesLIB S896 FELANG ASCII OPT896 D Softune LIB 896 OPT DIAS oftimeA IR Fa gt Environment Variable PATH Change Value AWINDOWS System32 Wbem Browse Explanation of the Environment Variable Specify PATH Execute the installed language tool file BlNdirectory Cancel Apply Set the development environment in the following procedure 1 Select the name of the environment variable whose setting is to be changed from the Value of Environment Variable list The current setting value is displayed in the Value field Simple explanation of the environment variable is displayed in Explanation of the Environment Variable 2 Change the description of the Value field 3 Click the Change button E Workspace Workspace sets the following SOFTUNE Workbench operations Open the last workspace at starting Setting a check mark to the left of this item enables the opening of the previously opened workspace file when SOFTUNE Workbench is started Output tool option at compile assemble Setting a check mark to the left of this item enables the display of the options specified when the C compiler or assembler is started in the Output Window
152. etup Target The items to be set in the combo box and tree view at the left side of the dialog are specified 202 Target of setting combo box All the configuration names of projects in workspace are displayed Configuration name The selected configuration is set All Configuration All configurations are set Multiple Configuration The Multiple Configuration dialog Figure 4 5 7 is opened The two or more configurations specified in the dialog are set Target of setting Tree View All projects having the configuration names specified in the combo box are displayed The items that can be set vary depending on the selected items When two or more items are selected they can be changed at a time If the items of different types are selected only overlapped items can be set Project The General items MCU items common options C Compiler Assembler Linker Librarian and Debug items can be set C source file The General items and individual options C Compiler can be set Assembler source file The General items and individual options Assembler can be set Library file The General items can be set Object file The General items can be set Relative file The General items can be set Folder All files in the folder are set Figure 4 5 7 Multiple Configuration Dialog Multiple Configuration x Project Configuration Debug TE Sla Release All select EM p C
153. ever next argument does not specify structure union Figure 4 6 17 Function Call Result Dialog Result of call function x Function sort_val Result void When processing of the called function is terminated and control is returned the function call result dialog shown in Figure 4 6 17 opens Example When function definition is int sub int param specify the function call as follows sub 10 When a constant value is directly specified sub ii When variable ii is directly specified 271 CHAPTER 4 MENUS E Description Execute the specified functions to display the return values The return value is set to the built in variable CALL Evaluate the argument of the specified function in dummy argument format and execute it If the count of specified actual arguments is more than the count of dummy arguments evaluate as many counts of actual arguments as that exceeds the dummy arguments in an int type When the program hits a break point while the CALL command is executing a function a break occurs at that position To execute the call command continuously use the GO command To terminate the execution of the CALL command use the CLEAR CALL command Note that it is not possible to nest this command The CALL command sets the break point for the current PC and sets the return address so as to return to that point calling a function Therefore if the function called by the CALL command passe
154. f the mouse in the Command Window to display the short cut menu 2 Select Macro etc from the short cut menu The character string replacement setting dialog shown in Figure 3 15 2 opens 3 Set an alias Specify the alias that does not conflict with command names and the aliases that has been already registered 4 Write the command to be assigned to the specified alias The command can be written including its parameters 5 Click the Append button Deleting an alias 1 Click the right button of the mouse in the Command Window to display the short cut menu 2 Select Macro etc from the short cut menu The character string replacement setting dialog shown in Figure 3 15 2 opens 3 Select the alias to be deleted from the alias list 4 Click the Delete button Figure 3 15 2 Replace command Dialog Replace command x Alias Variable Macro Alias Jaro Append Command dump r Alias list Alias name command Delete 89 CHAPTER 3 Windows B Variable 90 The name assigned to the address range to be referenced often can be used for command input Add and delete a variable in the following procedures Adding a variable l 2 5 6 Click the right button of the mouse in the Command Window to display the short cut menu Select Macro etc from the short cut menu The character string replacement setting dialog shown in Figure 3 15 2 opens Click the Variable tag The
155. ffer Closes the Coverage Window CHAPTER 3 Windows 3 18 Performance Window This window is only displayed for the emulator debugger MB2141 and the performance mode at the event mode The Performance Window displays the performance measurement result E Performance Window For the performance function see Section 4 4 13 Performance Examples of the performance window are given in Figure 3 18 1 and Figure 3 18 2 The performance window is used to display the result of performance measurement at debugging This window is only displayed for the emulator debugger MB2141 and the performance mode at the event mode Figure 3 18 1 Performance Window Measurement Count fg Performance iE x Display type Measuring results m o Event No 1 0 2 0 3 0 4 0 5 0 6 D 0 8 0 97 CHAPTER 3 Windows Figure 3 18 2 Performance Window Measurement Time Display type Display event Measuring results Minimum us Performance E X Measuring time z Jinterval 1 Sf Maximum Average 27 500 Time us 32 000 Display Type Display Event Measurement Result E Short Cut Menu Refresh Set Display Range Event Clear Copy Close 98 0 000 21 999 22 000 22 999 23 000 23 999 24 000 24 999 25 000 25 999 26 000 26 999 27 000 27 999 28 000 28 999 29 000 29 999 30 000 30 999 31 000 31 999 Select measurement time or measure
156. finition Setup Dialog Setup Project LX MCU C Compiler Assembler Linker Librarian Conv gt Category Define Symbol m Symbol Name csv wot Value 100 Symbol Name List Set SYMB L 200 Target of setting MBB9WE25 Option g AL 2 to_INROMO1 0xCO00 0xFFFF ta_INRAMO1 0 0080 0 027F Cancel Apply If there are two or more items to be set the symbol name found in some item is grayed 1 Select the Define Symbol category The symbol definition setup dialog shown in Figure 4 5 27 opens 2 Specify a Symbol Name 3 Specify a Value 4 Click the Set button 223 CHAPTER 4 MENUS E Resetting Symbol Definition 1 Select the Define Symbol category The symbol definition setup dialog shown in Figure 4 5 27 opens 2 Select the symbol name you want to reset from Symbol Name List 3 Click the Delete button E Selecting Output File 224 Figure 4 5 28 Output List Setup Dialog Setup Project MB83w625 sample prj Select the Output List category The list output setup dialog shown in Figure 4 5 28 opens Set check marks to the left of the list s to be created Creates a link map list file Creates a external symbol mutual reference information list Creates a local symbol list Creates a section details map list When none of the above lists is output no other item need to be set from the list output
157. g The macro description can be used to describe options For the macro description refer to Section 1 11 Macro Descriptions Usable in Manager of SOFTUNE Workbench User s Manual E Setting General Options Figure 4 5 26 General Option Setup Dialog MCU C Compiler Assembler Linker Librarian Cony gt Category General z Outputs start message Target of setting MB89w 625 v Outputs debug information Entry Point Warming Level Level 1 hd v Control of default option file Other Option g AL2 ro _INROMO1 0 C000 0xF FFF ta _INRAMO1 0 0080 0 027F The following options can be set from the general option setup dialog Outputs start message V Outputs debug information g 222 CHAPTER 4 MENUS Control of Default Option File Xdof Entry Point e Warning Level w Level 0 to 2 Other Option Entry Point is the address to be set in the PC when data is loaded by the debugger Be sure to specify this option with a global symbol Select Warning Level from the drop down list In Other Option all linker options can be written like startup options from command lines Write the options that do not belong to any linker option setup categories directly in Other Option E Setting Disposition Connection See Section 4 5 5 6 Section Disposition Connection Specifying E Setting Symbol Definition Figure 4 5 27 Symbol De
158. g terminates the SOFTUNE Workbench debug session 277 CHAPTER 4 MENUS 4 7 Setup Setup sets SOFTUNE Workbench execution environment debugger mode environment and other tools E Setting the SOFTUNE Workbench Execution Environment Development Setting the Debugger Mode Environment Debug Environment Memory Map Hlash area control llSetting Other Tools Tool Keyboard Editor Error Tool Startup 278 4 7 1 Development CHAPTER 4 MENUS Development sets SOFTUNE Workbench operation and the environment variables required by language tools e g compiler E Environment Variable Figure 4 7 1 shows the environment variable setup dialog The environment variables listed in Table 4 7 1 are set in this section Table 4 7 1 Environment Variable Names Environment variable name FETOOL Explanation Standard directory in which language tools were installed INC896 Directory in which include file exists LIB896 Directory in which library file exists OPT896 Directory in which the language tool default option file exists FELANG Character code system switching in the messages output by language tools SJIS Japanese language shift JIS ASCII English PATH Directory in which language tools exist TMP Directory in which work files exist 279 CHAPTER 4 MENUS Figure 4 7 1 Development Environment Setup Environment Variable Dialog S
159. ge setting dialog It is only valid while MB2141 emulator debugger Display coverage rate Switches on off the display coverage rate When Display coverage rate is turned on the coverage rate of each items is displayed It is only valid while MB2141 emulator debugger Refresh Update the contents of the window When Display coverage rate is turned on the display is updated with the latest coverage rate It is only valid while MB2141 emulator debugger Property Display the properties of the symbol information of the selected function 57 CHAPTER 3 Windows ii Short Cut Menu Click the Right Button of the Mouse on Space in the Project Window Figure 3 4 23 shows a short cut menu Figure 3 4 23 Short Cut Menu on Space in the Project Window Docking View Hide The project window is docked with the frame in the check status Hide Docking View The project window enters the nondisplay status 58 CHAPTER 3 Windows 3 5 Output Window The output window displays compiler version information and error messages etc when make or build is executed E Output Window Figure 3 5 1 shows an example of the output window As shown in this example when the left button of the mouse is double clicked on the line to which an error message was output control automatically jumps to the source line where the error occurred Figure 3 5 1 Example of Output Window Tool start message e g version and copyright Output W
160. gging is ended and then debugging is started based on the specified setup information During non debugging session debugging is started without displaying the confirmation dialog Debugging can be started only in the active project In debug session only the valid setup changes from Start Debug to End Debug When End Debug is selected debugging is ended CHAPTER 3 Windows Change The setup wizard for changing the setup setting is started see Section 4 7 2 4 Setup Wizard Delete Debugger setup information is deleted from the project Valid setup information cannot be deleted To delete change the valid setup temporarily Property Setup information is displayed see Section 4 3 9 Property E Short Cut Menus Click the Right Button of the Mouse on a Space in the Project Window Figure 3 4 18 shows a short cut menu Figure 3 4 18 Short Cut Menu on Space in the Project Window Docking View Hide The project window is docked with the frame in the check status Hide Docking View The project window enters the nondisplay status 53 CHAPTER 3 Windows 3 4 2 ABS Tab The load module name source file name and function name are used as the information acquired from the debug information and are displayed in the tree view format B ABS Tab Figure 3 4 19 shows examples of displayed contents of the ABS tab Figure 3 4 19 ABS Tab Load module name g Sample abs
161. h dialog requires you to click Set button to take effect after you set up If you attempt to close the dialog without clicking the Set button a dialog for confirmation will be displayed so that you will not fail to set up 36 CHAPTER 3 Windows This chapter explains SOFTUNE Workbench windows 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 3 10 3 11 3 12 3 13 3 14 3 15 3 16 3 17 3 18 3 19 Window Configuration Tool Bar Status Bar Project Window Output Window Edit Window Standard Editor Source Window Symbol Window Disassemble Window Register Window Memory Window Local Variable Window Watch Window Trace Window Command Window Object Window Coverage Window Performance Window Sequence Window 37 CHAPTER 3 Windows 3 1 Window Configuration Each SOFTUNE Workbench window consists of a menu bar tool bar window screen and status bar Menus are explained in Chapter 4 B Main Window Figure 3 1 1 shows the SOFTUNE Workbench Main Window As shown in this figure child windows e g project window and output window and the tool bar can be docked with the Main Window and displayed Figure 3 1 1 SOFTUNE Workbench Main Menu ga SOFTUNE Workbench sample Of XI File Edit View Project Debug Setup Window Help ae 8 EE W orkspace sample ll sample abs sample Source Files P sample c F2HC 8L Family SOFTUNE C Compiler
162. h the Set Tool Dialog Figure 5 1 9 displayed when you select Environment Setup tool menu Alternatively you can display Set Tool Dialog by the Set tools button in the Select Tool Dialog Add Check the input contents of 2 to 4 If they are correct click Add This completes the registration of the external tools The registered contents are displayed in File list and are restored when the Workspace is opened Figure 5 1 12 Setting Dialog External Tool CHAPTER 5 Add in Module Customize bar Setting Dialog C Softune Initialize pre RunBreak SetupDbgenv NPTEPAD 345 CHAPTER 5 Add in Module 5 1 4 Warning and Error Messages This section describes the warning and error messages displayed when using the customize bar E Warning Message 1 The following warning message Figure 5 1 13 is displayed when you click Add regardless of whether an input batch file does not exist in the Entry when registering a batch file in the customize bar See Section 5 1 3 1 Registering Batch File Figure 5 1 13 Warning Message S oftune896 This batch file does not exist Register in the list B Error Messages 1 The following error message Figure 5 1 14 is displayed when you click Add without entering a batch file in the Entry when registering a batch file in the customize bar See Section 5 1 3 1 Registering Batch File Figure 5 1 14 Error Message 1 Softune896 Ea A Pl
163. he debugger stops program execution Step In When Step In is clicked the debugger executes the step moves the PC to the address of the next instruction and stops When a function call instruction is executed the debugger stops at the beginning of the function Step Over When Step Over is clicked the debugger executes the step moves the PC to the beginning of the next instruction and stops When a function call instruction is executed the debugger executes all the functions moves the PC to the next instruction address of the function call instruction and stops Step Out When Step Out is clicked the debugger executes the current function to the end returns control to the function caller moves the PC to the next instruction address of the function call instruction and stops Run Until Cursor When Run Until Cursor is clicked the debugger executes the program to the instruction immediately before the address indicated by the cursor in the Source or Assembly Window moves the PC to the address and stops 253 CHAPTER 4 MENUS 4 6 2 Abort This section explains the debugger program execution stop function B Abort Abort is used to forcibly interrupt the program being executed by the debugger When the program stops the PC moves to the next instruction address of the last executed instruction Source line display and disassemble display are also updated according to the PC value set when the progr
164. he short cut menu 2 Select Nondisplay from the short cut menu The output window enters the nondisplay status Set Font 1 Click the right button of the mouse in the output window to display the short cut menu 2 Select Set Font from the short cut menu The font selection dialog Figure 3 5 2 opens 3 Select Font and Size then click the OK button Figure 3 5 2 Font Setting Dialog Tahoma Terminal O Times New Roman O Trebuchet MS Verdana a O Webdings x z Sample AaBbYyZz Highlight Keyword 1 Click the right button of the mouse in the output window to display the short cut menu 2 Select Keyword Coloring In the check state the keyword error number of the error message is displayed in red Logging 1 Click the right button of the mouse in the output window to display the short cut menu 2 Select Logging Start and then specify the file name of the record target file The result of output to the Output window is recorded in the specified file 3 To suspend logging select Logging Record and uncheck the checkbox One selected logging is restarted When the checkbox is checked the file is recorded 4 To stop logging select Logging Termination CHAPTER 3 Windows 3 6 Edit Window Standard Editor The edit window is used to display and edit a source file and document file etc E Edit Window An example of the edit window docked with the Main Window is give
165. he short cut menu Update or by selecting Update window or Update all windows from the main menu Activate when stop Specify whether the source window should set to active or not when the program is stopped However if a source window is displayed as new it should always be activated Perform this operation in the following procedure 1 Click the right button of the mouse in the source window to display short cut menu 2 Check Activate when stop If a check mark is placed on the left side of Activate when stop source file which corresponds to break address while halting program execution should be activated On the other hand if the source file is not displayed open a source file that corresponds to break address regardless of specification 72 CHAPTER 3 Windows 3 8 Symbol Window The Symbol Window displays the target file name of the current project and the symbol names e g variable name and function name being used by the file in the tree view format E Symbol Window Figure 3 8 1 shows an example of the Symbol Window Figure 3 8 1 Example of Symbol Window 71 Symbol of x Global Symbol The load module name is displayed B nain The global symbol and the function name is mi displayed M value a E Sort wal The local symbol name defined in the function T mi i is displayed D 3 mx Module name is displayed M nax mooo NA m The local symbol and f
166. heck mark is set to the left of Parameter only parentheses are displayed after each function name 269 CHAPTER 4 MENUS 4 6 8 Time Measurement This section explains SOFTUNE Workbench time measurement BB Time Measurement Figure 4 6 15 Time Measurement Dialog Measurement time x From Initialize OhOOm00s001 ms884us325ns T ime From Last Executed OhOOm00s000ms025us225ns T ime Close From Initialize 4631 Cycle From Last Executed 62 Cycle Items to be displayed Cycle count Step count SIM EML MB2141 EML MB2146 09 From Initialize Indicates the cumulative total value of execution after the Clear button has been clicked From Last Executed Indicates the immediately preceding execution time Note The measurement results have errors For details refer to Measuring Execution Time in each chapter of SOFTUNE Workbench User s Manual 270 CHAPTER 4 MENUS 4 6 9 Call This section explains the SOFTUNE Workbench function call function E Function Call The specified function can be started during debugging without reference to the flow of the program This function is known as function call Figure 4 6 16 Function Call Dialog Function t vain 000 16 IV Display return value Cancel When the function call dialog shown in Figure 4 6 16 opens specify the function you want to call with a correct argument Compiles with C arguments how
167. hem in reverse video See Section 4 3 3 AII Select Print 1 Click the right button of the mouse to display the short cut menu then select Print from the menu The print dialog opens See Section 4 2 9 Print Add to Project 1 Click the right button of the mouse to display the short cut menu then select Add to Project from the menu SOFTUNE Workbench adds the file being edited to the project Find Replace 1 Click the right button of the mouse to display the short cut menu then select Find or Replace from the menu SOFTUNE Workbench sets the clipboard character string in Find What and opens the find or replace dialog See Section 4 3 4 Find Replace Find in files 1 Click the right button of the mouse to display the short cut menu then select Find in files from the menu Opens the Find in Files dialog See Section 4 3 5 Find in Files Jump 1 Click the right button of the mouse to display the short cut menu then select Jump from the menu The dialog for specifying the jump destination line opens See Section 4 3 6 Jump 2 Set the jump destination line number 3 Click the OK button Status Bar Status Bar switches status bar display and non display for each Edit Window 1 Click the right button of the mouse to display the short cut menu then select Status Bar from the menu When the status bar has been already displayed SOFTUNE Workbench switches status
168. hen a section is placed outside the specified ROM RAM area ro and ra options or outside the internal ROM RAM area in the MCU a warning is output at linking E When Initializing Placement Link Option Based on MCU Information 1 Click the The Disposition Connection option is reset button The placement link option is reset When this reset is performed the placement link option is set as follows Auto Disposition AL 2 Mode 2 optimum automatic placement by linker is set ROM RAM area ro ra The ROM RAM area is all cleared and the currently selected MCU internal ROM RAM address is set Section information sc Section information is all cleared A warning is output when a ROM RAM area outside the range of the internal ROM RAM check rora is specified Setting is performed so as to output a warning However when an MCU without single chip mode is selected setting is performed so as not to output a warning A warning is output when a section is placed outside the specified ROM RAM area range check_locate Setting is performed so as to output a warning 232 CHAPTER 4 MENUS 4 5 5 7 Setting Librarian Options This section explains how to set librarian options E Setting Librarian Options 1 Click Librarian tab from the project setup dialog 2 Select category General or Output List can be selected as category Specified options can be checked using Option at the bottom of the dialog E Sett
169. hen the button at the right of this field is clicked the list of usable macros is displayed For example when Build File Directory is clicked FILE PATH is inserted for the option at the cursor position E Executing Directory B Enable To execute the tool for a particular directory specify the Executing Directory If the Executing Directory is not specified the tool is executed for the project directory This specifies whether or not to execute the tool at Compile Assemble Make or Build The tool is not executed when the checkbox is unchecked To suspend execution of the tool uncheck the checkbox E Designate additional Option When Executing This specifies whether or not to display a dialog in which additional options can be specified at executing the tool When adding options at executing the tool check the checkbox The option set in the specifying other parameter dialog is added as is to the end of the character string specified for Option E Use Output Window To display the tool execution result in the Output window check the checkbox There are some precautions to follow when using the Output window For details refer to Section 1 11 Macro Description Usable in Manager in SOFTUNE Workbench User s Manual E Contents of the Temporary File When the TEMPFILE macro is specified for Option SOFTUNE Workbench creates a new temporary file at executing the tool and deletes it at ending the tool execution In this
170. his example is coded to check the status of I O port P13 1 and causes an auto boot when the port is High or waits for connection from the debugger if not In fgm_cfg h a symbol is used as it is as the one that can be referenced by the assembler 367 APPENDIX E Programming into the Target Monitor Debugger cannot be connected to the microcontroller containing no monitor program Before attempting to connect the debugger therefore program some application program including a monitor program For on board programming Refer to the hardware manual for the target microcontroller to prepare a flash programmer For on board programming using the flash programmer the pins listed below are used on the MB95F128MB as the target of the sample program For connection of any other microcontroller refer to the manuals for the flash programmer and the microcontroller The pins to be used may vary depending on the flash programmer used Table E 10 Pin Functions for On board Programming MOD P13 Function Mode pin Setting example with the flash programmer in used MOD H P13 LU X0 X1 Oscillation pins Input a frequency of at least 1 MHz Connected to the flash programmer The pin must be able to turn Rot Reset pum on off the reset P10 UIO Serial data input pins Connected to the flash programmer P11 UOO0 Serial data output pins Connected to the flash programmer P12
171. hows an example of the project window Figure 3 4 1 Project Window Workspace Sample Sample abs Sample prj Debug Source Files 23 Include Files Dependencies E Debug To select the window display contents use the tab on the bottom of the project window The project window has the following tabs SRC tab Displays information on the project Refer to Section 3 4 1 SRC Tab for details ABS tab Displays information on the source file acquired from the debug information Refer to Section 3 4 2 ABS Tab for details 42 CHAPTER 3 Windows 3 4 1 SRC Tab The name of the current project and the file names registered in the project are displayed in the tree view format B SRC Tab Figure 3 4 2 shows examples of displayed contents of the SRC tab Figure 3 4 2 SRC Tab Workspace name Workspace sample 4 E sample abs sample prj Debug Target file name of project It is followed by the project H E Source Files name and active configuration name The active project io_mbxxxxx_AVic is given in bold type _io_mbxxxxx_timer c E _io_mbxxxxx_uart obj Folder that can be deleted When opened the files and folders stored are displayed Source Files and Include i mondeb lib aati samplel c Files are created at default sample2 c Library file name sample3 c fa startasm Source file name Ba ion ded Pi Incl
172. ight or copyright or any other right of Fujitsu or any third party or does Fujitsu warrant non infringement of any third party s intellectual property right or other right by using such information Fujitsu assumes no liability for any infringement of the intellectual property rights or other rights of third parties which would result from the use of information contained herein The products described in this document are designed developed and manufactured as contemplated for general use including without limitation ordinary industrial use general office use personal use and household use but are not designed developed and manufactured as contemplated 1 for use accompanying fatal risks or dangers that unless extremely high safety is secured could have a serious effect to the public and could lead directly to death personal injury severe physical damage or other loss i e nuclear reaction control in nuclear facility aircraft flight control air traffic control mass transport control medical life support system missile launch control in weapon system or 2 for use requiring extremely high reliability i e submersible repeater and artificial satellite Please note that Fujitsu will not be liable against you and or any third party for any claims or damages arising in connection with above mentioned uses of the products Any semiconductor devices have an inherent chance of failure You must protect against injury damage or loss f
173. ile No button Closes the workspace file without saving the current workspace information Cancel button Cancels workspace file close processing In the following cases however the above dialog does not open The workspace file and project are not modified When the workspace file is closed inquiry for save is not set E When the Currently Open Workspace File is being Edited The dialog for asking the operator whether to save the current workspace information opens When the Yes or No button is clicked to continue processing the dialog for asking the operator whether to save the file being edited subsequently opens Yes button Saves the file being edited and then closes the workspace file No button Closes the file being edited without saving the file being edited Cancel button Workspace is closed with the file being edited opened 113 CHAPTER 4 MENUS 4 2 6 Save Save saves the currently open file using the existing file name E Save Dialog The save dialog is used to save the file using the existing file name The text file workspace file binary file alias file setup file or coverage file can be selected from this dialog as the type of file If SOFTUNE Workbench is not in the debug session the binary file alias file setup file and coverage file are not displayed Figure 4 2 5 Save Dialog Overwrite save x uin Cancel 114 4 2 7 CHAPTER 4 MENUS Save A
174. ile Path 22 Projectfile M ain DK Cancel E Tool Setup Procedure 1 Select Tool from the Setup menu The tool setup dialog shown in Figure 4 7 28 opens 2 Set a title that differs from the registered names 3 Specify the execution file name of the tool to be registered Clicking the Browse button to the right of this field opens the file selection dialog The execution file 310 7 CHAPTER 4 MENUS name of the tool can be selected from this dialog Set an option Macro description can be used in this field For macro description refer to Section 1 11 Macro Descriptions Usable in Manager in SOFTUNE Workbench User s Manual Write an executing directory This description may be omitted if control need not be moved to any specific executing directory Clicking the Browse button to the right of this field opens the file selection dialog A run time directory can be selected from this dialog Set a check mark to the left of Designate Additional Option when Executing and Use Output Window as required When a check mark is set to the left of Designate Additional Option when Executing SOFTUNE Workbench asks you to enter additional options when a tool is started When a check mark is set to the left of Use Output Window SOFTUNE Workbench displays tool output output to the standard output device or standard error output device in the Output Window Click the Setup button E Tool Deletion Pr
175. indow Configuration sample prj MB89W625 E Softune sample 896 Project startup asm E Softune sample 896 Projecttsample c Dependencies update success Tool error message example of C compiler E Short Cut Menu There are seven menus below Copy Copies the selected character string to the clipboard Clear Clears all the items displayed in the output window Docking View Sets or resets the docking view Nondisplay Places the output window in the nondisplay status Set Font Selects a display font in the output window Keyword Coloring Whether or not to highlight the error number of the error message is set Logging The result of output to the output window is stored in a file E Operation Copy 1 Select the character string you want to copy 2 Click the right button of the mouse in the output window to display the short cut menu 3 Select Copy from the short cut menu See Section 4 3 2 Cut Copy Paste Delete Clear 1 Click the right button of the mouse in the output window to display the short cut menu 59 CHAPTER 3 Windows 60 2 Select Clear from the short cut menu Docking View 1 Click the right button of the mouse in the output window to display the short cut menu 2 Select Docking View from the short cut menu The output window is docked with the frame in the check status Display 1 Click the right button of the mouse in the output window to display t
176. ing Options in General Figure 4 5 35 Librarian Option Setup Dialog General Setup Project MB83w625 sample prj The following options can be set Output start message v Output debug information g Control of default option file Xdof 233 CHAPTER 4 MENUS Setting the Output listing Figure 4 5 36 Librarian Option Setup Dialog Output List Setup Project MB89wW625 v sample prj 1 Select any of the following output types Outputs section name and size for module Outputs external define symbol for module Outputs external browse symbol for module Outputs all external define symbol and unsolved external define symbol 2 To suppress page change set a check mark to the left of Control of changing page When page change is suppressed the line count cannot be set 3 Set Line Count and Column Count to the right of Line and Column as required B Starting Librarian If the project type is a library file the librarian is started To change the project type see Section 4 5 5 1 General 234 CHAPTER 4 MENUS 4 5 5 8 Setting Converter Options This section explains how to set converter options E Setting Converter Options 1 Click the Converter tab from the project setup dialog 2 To start the load module converter marks the Start load module converter checkbox 3 Select a conversion format Motorola S format f2ms Converts
177. is displayed only when SOFTUNE Workbench is in the debug session The disassemble window displays the result obtained by executing disassembling at the specified address Disassemble Window B Function Figure 3 9 1 shows an example of the disassemble window Break point setting releasing A break point can be set or released by left clicking gt O of O at the left edge of the disassemble window Instruction execution at specified line address An instruction can be executed at the specified line address by left clicking of gt O of gt at the left edge of the disassemble window Step execution step into is also enabled by clicking the left mouse button at the PC location Drag and Drop By dropping function name label or address from source window to disassemble window display will be jumped to a location where an address of dropped character string is shown Display coverage Coverage can be displayed on a machine instruction basis from the short cut menu Display coverage It is only valid while MB2141 emulator debugger Figure 3 9 1 Disassemble Window fa Assembly i OF x The position of the BIX 02 current instruction pointer is displayed BIX 02 The position at which the break point is set is displayed An address is displayed A machine code is A mnemonic is An operand is displayed displayed displayed 75 CHA
178. is valid only when SOFTUNE Workbench is in the debug session E Items to be Set Select and set the following items from the submenu O Port Interrupt Debug Environment Setup Wizard 283 CHAPTER 4 MENUS 4 7 2 1 VO Port This section explains the I O port setup procedure E Setting an Input Port Figure 4 7 4 Input Port Setup Dialog Setup I O port Port Address Specifies a port address Mask Data Specifies address mask Only the addresses whose bits are 1 are to be compared Data Size Specifies a data input type When Binary is selected specify its size Byte Word Long Input Type Specifies a port data input source Input Port List Displays the currently specified ports 284 CHAPTER 4 MENUS Input terminal When an input request is issued during program execution with Input Type set to Terminal in input port setting the input terminal dialog opens Specifying ASCII as Data Type in input port setting enables ASCII input Specifying Binary as Data Type enables binary input Figure 4 7 5 Input Terminal Dialog Input request occurred Ascit Cancel Binary E Resetting an Input Port 1 Select the input ports to be reset from Input Port List 2 Click the Delete button 3 When resetting all the selected ports is completed click the Close button 285 CHAPTER 4 MENUS E Setting an Output Port Figure 4 7 6 Output Port Setup Dialog
179. itor program e Sample programs Prohibitions and restrictions B Introduction Monitor Debugger allows you to debug your application program on an intended mass produced microcontroller with built in flash memory using a monitor program in combination with the application program To use Monitor Debugger add the monitor program main routine FGM rel to the application program to create your target system il System Configuration for Using Monitor Debugger The following configuration is required to use Monitor Debugger e SOFTUNE Workbench V30L30 or later e BGM adapter MB2146 09A Target board Carrying an 8FX series of microcontroller with built in flash memory in the F MC 8FX family Note also that the following device is useful for programming into flash memory with the microcontroller left on the board Flash programmer Figure E 1 Configuration for Using Monitor Debugger Target system F2MC 8FX Three wire synchronous serial interface UIO P10 Comminteeitoninan Control reset line UO0 P1 1 Communication output USB UCKO P12 Communication clock PC BGM adapter Era cam e rompen SOFTUNE flash programmer 5 med P13 Op The operation mode must be changed eration mode before the flash programmer can be used To configure the circuit for connecting the BGM adapter to the target system refer t
180. ject file can be opened from the File Open Workspace menu When using the SOFTUNE VOI or V02 project file see Section 2 13 Reading SOFTUNE Project Files of Old Versions E Creating a Program Source and Executing Make Build Open the new creation dialog from the File New menu and select Text File When the editor is started write the source program and save it to the file with the File Save As menu When necessary source file is created register it in the project with the Project Add Member menu When registering the source file in the project is completed execute make with the Project Make menu or execute build with the Project Build menu If a syntax error occurs during compilation or assembling double click the error display location in the output window with the left button of the mouse The program jumps to the line where the error occurred Correct the source file and then reexecute the Project Make menu E Executing the Debugger When a load module file is created debugging can begin CHAPTER 2 OPERATION This chapter describes the basic operation method and development procedure of SOFTUNE Workbench 2 1 Parameters to be Entered from Dialog 2 2 Starting and Terminating SOFTUNE Workbench 2 3 Creating Workspace 2 4 Storing of Project 2 5 Creating and Registering Source File in Project 2 6 Definition of Subproject 2 7 Creation of Project Configuration 2 8 Setting T
181. ject in the project within workspace the project dependence is also deleted Note If SOFTUNE REALOS is not installed REALOS is not displayed as the project type 20 2 5 CHAPTER 2 OPERATION Creating and Registering Source File in Project This section explains the procedure for creating a new source file with SOFTUNE Workbench and registering the file in the project E Creating the New Source File 1 Select the File New menu When the New dialog opens select Text File from Types of Files then click the OK button 2 Select the File Save As menu When the Save As dialog opens select Text File from Types of Files then click the OK button When the file dialog for specifying the directory to which the created file is to be saved and the file name opens select the directory specify the file name then click the Save button E Registering the Created File in the Project Select the Project Add Member File menu The File dialog is opened to select the file to be added to the member Select the created source file followed by the folder inserted into the SRC tab of project window and click the Open button The file is stored in the project and its name is displayed in the source file category in the SRC tab of project window Bi Storing Created File with Directory in Project Select the Project Add Member Directory menu The Add Member Directory dialog is opened to
182. ject regardless if they have been modified since the last Make or Build It also links all object and library files to create a target file Use Stop when you want to stop compile make or build execution for some reason il Checking Source File Saving When an unsaved file is being edited by the standard editor execute compile assemble make or build then save the file If a check mark is set to the left of Inquiry for Save at Compile Assemble in Setup Development Project however the dialog for asking whether to save the file opens When the No button is clicked the source file is compiled without being saved Source file before editing 251 CHAPTER 4 MENUS 4 6 Debug Debug starts and terminates debugging and controls the debugger when SOFTUNE Workbench is in the debug session E Debug Start and Termination Loading Target File Start Debug End Debug E Debugger Control When SOFTUNE Workbench is in the Debug Session Run Abort Reset MCU Break Point Break Point Set Reset Event Sequence Stack Time Measurement Call Clear Call Vector 252 4 6 1 CHAPTER 4 MENUS Run This section explains the debugger program execution function B Run Run provides the following five functions Go When Go is clicked the debugger continuously executes the program from the current PC position When a break point is reached or when Abort is selected from the Debug menu t
183. kspace See Section 4 5 2 Add Project Property Information on the workspace file is displayed See Section 4 3 9 Property E Short Cut Menus Click the Right Button of the Mouse on a Target Name Figure 3 4 4 shows a short cut menu Figure 3 4 4 Short Cut Menu on a Target Name Set active project Create new folder Add Member to project d Set Project Set Linkage order Make Build Executing linker or librarian Delete Project Property Open List File gt Open HEX File gt Set Active Project The currently selected project is set in the active project in workspace Create New Folder When selected the Create New Folder dialog Figure 3 4 5 is opened Enter the folder name and click the OK button When the folder name is entered the folder is inserted into the hierarchy immediately below the project The folders are listed in the order in which they are created 45 CHAPTER 3 Windows 46 Figure 3 4 5 Create New Folder Dialog Create New Folder Name of a new folder Add Member to Project When selected the following two submenus are displayed File A member is added in files to the currently selected project See Section 4 5 3 Add Member At default a member is inserted into the hierarchy immediately below the project Directory A member is added in directories to the currently selected project See Section 4 5 3 Add Member At default a member is
184. lative path the directory is described in a relative path in the project file File type The type of file managed in the project is displayed Size Displays the file size Modified Displays the date and time of the last file update 141 CHAPTER 4 MENUS Figure 4 3 10 Property Project Window General 2 File Property Folder name The name of the selected folder is displayed If editing is enabled folder name can be changed Position The place of the selected folder is displayed Figure 4 3 11 Property Project Window General 3 File Property II RI Emdetcr Debugger 07 Exe 1 EE E Setup name The selected setup name is displayed Debugger type The Debugger type set in Debugger setup is displayed Information The device type host port baud rate batch file before performing load batch file after performing load etc are displayed The displayed information depends on the device type etc 142 E Property E Property CHAPTER 4 MENUS Conditions Figure 4 3 12 Property Project Window Dependence File Property C compiler D SoftuneSLIB 896 INCLUDE stdio h D SoftuneSLIB 896 INCLUDE stddef h D SoftuneSLIB 896 INCLUDE stdarg h Tool Displays the language tool to be executed File Displays a dependency file list Selecting a file name from the list displays the update date and time of the file Modified Displays the date and time
185. lbar Find Click Add or Delete button at the Bookmark dialog 137 CHAPTER 4 MENUS E Move the Caret to the Next Bookmark in the Current Window 1 Please make sure that there is a cursor in a edit window 2 Please execute any of following operations Select Edit Bookmark Next bookmark in the current window Click on Next bookmark in the current window at toolbar Find E Move the Caret to the Previous Bookmark in the Current Window 1 Please make sure that there is a cursor in a edit window 2 Please execute any of following operations Select Edit Bookmark Previous bookmark in the current window Click on Previous bookmark in the current window at toolbar Find E Clear all Bookmarks in the Current Window 1 Please make sure that there is a cursor in a edit window 2 Please execute any of following operations Select Edit Bookmark Clear all bookmarks in the current window Click on Clear all bookmarks in the current window at toolbar Find 138 CHAPTER 4 MENUS 4 3 8 Previous error Next error Top of Error Bottom of Error Previous error Next error Top of Error and Bottom of Error moves the cursor in the edit window to the source line where a make build compilation or assembler error occurred E Previous Error The cursor jumps to the error line immediately before the cursor position in the output window If there is no error line before the cursor positio
186. ld to open the directory search dialog Specify Match whole word only and Match case as required Click the Find button The search result appears in the output window in real time To abort a search click Abort button The file search is aborted When search terminates click the Cancel button Figure 4 3 3 Find in Files Dialog Find in Files Ea Find what search Find In files Abort is Cancel In folder Match whole word only Match case CHAPTER 4 MENUS 4 3 6 Jump Jump moves the cursor to any line in the text file being edited When SOFTUNE Workbench is in the debug session this function command specifies the display start position of a source line disassemble memory or trace E Edit Window When the jump dialog shown in Figure 4 3 4 opens specify a jump destination line number When the edit window is active the cursor in the edit window jumps to the specified line irrespective of whether SOFTUNE Workbench is in the debug session Figure 4 3 4 Jump Dialog Edit Jump line 20 Cancel E Debug Session If a window other than the edit window becomes active when SOFTUNE Workbench is in the debug session the dialog shown in Figure 4 3 5 opens Select TYPE then specify POSITION in the selected format If Address is specified in Type window at source memory or disassemble window can be used to specify the window where jump is implemented
187. m this dialog is added after the option specified in tool setup and the tool is started Figure 4 7 32 Additional Option Setup Dialog Execute String ESWINNTNNOTEPAD EXE Add Parameter l 319 CHAPTER 4 MENUS 4 8 Window Window controls window display E Control Related to Window Display Cascade Vertical Horizon Split Arrange Icons Refresh Refresh All Windows Close All Windows E Window Name Display Up to 9 currently open window names are displayed including icon windows If ten windows or more are opened the tenth and subsequent windows are displayed in Other Windows 320 CHAPTER 4 MENUS 4 8 1 Cascade Vertical Horizon Cascade Vertical and Horizon specify the display formats of subwindows e g Source Window Register Window and Assembly Window E Cascade Cascade displays currently open subwindows in cascade B Vertical Vertical arranges currently open subwindows vertically and fully displays them in the main window E Horizon Horizon arranges currently open subwindows horizontally and fully displays then in the main window 321 CHAPTER 4 MENUS 48 2 Split Split specifies where a window is vertically split E Split Split specifies where a window is vertically split The following windows can be vertically split Source Window Assembly Window Trace Window Memory Window Coverage Window 322 CHAPTER 4 MENUS 4 8 3 Arrange Ico
188. mber of bytes can be chosen from Automatic Abyte 8byte 16byte 32byte or 64byte Figure 4 4 14 Setup Dialog Columns automatic T Cancel Iv ASCII 165 CHAPTER 4 MENUS 4 4 6 Local Local displays the Local Variable Window E Local Variable Window The Local Variable Window displays in tree format the local variables of the function where the current instruction pointer exists using the function name as the root The displayed variables cannot be added nor the displayed variables can be canceled The variable values modified as a result of program execution are updated automatically For this reason the user can observe how variable values change as a result of program execution Variable values can be also modified to continue debugging E Setting Radix The Radix when a variable value is displayed can be set for each variable using the following procedure 1 Click the right button of the mouse in the line containing the variable of the radix to be modified The short cut menu is displayed 2 Move the mouse cursor to Radix The list showing selectable radixes is displayed in the submenu 3 Select the radix to modify from the list ii Modifying a Variable Value The variable value can be modified by the following procedure 1 Click the right button of the mouse in the line containing the variable to be modified The short cut menu is displayed 2 Select Edit from the short cut menu The variable
189. ment count as the display type A display event is displayed only when measurement time is selected Select a measurement interval The measurement result is totaled and displayed The minimum measurement result maximum measurement result and average measurement result are displayed only when measurement time is selected as the display type Refresh Performance Window display See Section 4 4 13 Performance See Section 4 4 13 Performance See Section 4 6 5 Event Clears the Performance buffer See Section 4 4 13 Performance Closes the Performance Window CHAPTER 3 Windows 3 19 Sequence Window This window is displayed only when SOFTUNE Workbench is in the debug session The Sequence Window displays the sequence setting state E Sequence Window For details on the sequence function see Section 4 6 6 Sequence An example of the sequence window is shown in Figure 3 19 1 The sequence window is used to display the sequence setting state at debugging This window is only displayed for the emulator MB2141 Figure 3 19 1 Sequence Window Bi Sequence Jof x El Levell Eventl gt Level2 E Event2 gt Level3 Event3 gt END Level2 Event2 gt Level3 Event3 gt END Level3 Event3 gt END Level4 Level5 Level6 Level Level E Short Cut Menu Setup See Section 4 6 6 Sequence Delete Deletes sequence setting Delay Count See Section 4 6 6 Seq
190. mount of edits 122 4 3 2 CHAPTER 4 MENUS Cut Copy Paste Delete Cut cuts the selected character string and Copy copies it to the clipboard Delete deletes the selected character string Paste inserts the cut or copied character string into the cursor position or replaces it with the selected character string B Cut B Copy B Paste E Delete CUT cuts the character string selected from the edit window and moves it to the clipboard This command can be executed only in the edit window The character string cut here can be pasted later COPY copies the character string selected from the edit window or the Symbol Window Assembly Window Register Window Memory Window Local Symbol Window Watch Window Trace Window Command Window or Coverage Window valid in debug session to the clipboard The character string copied here can be pasted later PASTE inserts the cut character string or the character string copied to the clipboard into the current cursor position in the edit window If the selected character string is in the edit window this command also replaces it with the character string in the clipboard DELETE deletes the character string selected from the edit window This command can be executed only in the edit window The deleted character string cannot be pasted later 123 CHAPTER 4 MENUS Table 4 3 1 Relationship between Edit Functions and Windows Window Delete Edit Windo
191. n Next bookmark in the current window at toolbar Find E Move the Caret to the Previous Bookmark in the Current Window 1 Please make sure that there is a cursor in a source window 2 Please execute any of following operations Select Edit Bookmark Previous bookmark in the current window Click on Previous bookmark in the current window at toolbar Find 132 CHAPTER 4 MENUS E Clear All Bookmarks in the Current Window 1 Please make sure that there is a cursor in a source window 2 Please execute any of following operations Select Edit Bookmark Clear all bookmarks in the current window Click on Clear all bookmarks in the current window at toolbar Find Click on AlI delete at tab Source in a dialog Bookmark Note Symbol which can not be allocated to the name of bookmark will be member of automatic variables structure union and class If some symbols with the same name are defined other symbol than assumed one may be used To specify a symbol with the same name please determine the name of module and function name first then specify a symbol 133 CHAPTER 4 MENUS 4 3 7 2 Bookmark Memory Window This section explains the operation when memory window is activated To Display a Dialog Bookmark By selecting Edit Bookmark Bookmark dialog as shown in Figure 4 3 7 will be opened This dialog is to indicate the list of bookmark set in memory window Figu
192. n the cursor loops back and jumps to the bottom error line E Next Error The cursor jumps to the error line immediately after the cursor position in the output window If there is no error line after the cursor position the cursor loops back and jumps to the top error line E Top of Error The cursor jumps to the top error line displayed in the output window E Bottom of Error The cursor jumps to the bottom error line displayed in the output window 139 CHAPTER 4 MENUS 4 3 9 Property Property displays information for the specified file E Property PROPERTY displays file information module information and symbol information The information to be displayed depends on the currently active window There are six windows below Project Window Edit Window Source Window Symbol Window Local Window Watch Window 140 CHAPTER 4 MENUS 4 3 9 1 Property Project Window This section explains the property in the Project Window E Property General Figure 4 3 9 Property Project Window General 1 General Conditions Output Filename D Softune sample B96 Project sample c Directory l Browse Filetype C Source File Size 1571 bytes Modified 18 45 44 Thursday September 12 2002 File name The full path to the selected file is displayed Directory The directory of the selected file is displayed If editing is enabled the file to be referred can be changed If given in a re
193. n be used as character constants Characters that can constitute character strings can be used as escape characters CHAPTER 2 OPERATION 2 1 3 Data and Address Formulas Register Name Flag Name The SOFTUNE Workbench provides register and flag names as the terms of data and address formulas E Register Name Flag Name Register and flag names can be specified in data formulas they represent the register values at that point of time Specify the register name and flag name following 96 Usable register names differ for each MCU see Appendix A Register Names CHAPTER 2 OPERATION 2 1 4 Operators Usable in Data and Address Formulas Table 2 1 2 lists the operators that can be used in data and address formulas and their priorities E Operators Usable in Data and Address Formulas Table 2 1 2 List of Operators Usable in Data and Address Formulas Priority Operator Explanation Type of operator Priority change Linear expression Subscript representation Structure Structure pointer Minus sign Unary operator Address Logical NOT Bit NOT Memory indirect reference sizeof Size byte type Type cast Multiplication Binary operator Division Remainder Addition Subtraction Left shift Right shift Less than Binary operator Relational operator Less than or equal to Greater than Greater than or equal to Equal to Not equal to Bit AND Binary operator Bit EOR Bit OR
194. n i neg etg Ud Meo 279 4 7 2 Debug Enviroriment a aoo ep teeiteibep ipei iau tei pin 283 4 2 1 VQ Port i ten deep pee gn Cea Do a Eo i E IE D te 284 4 7 2 2 InterJ pt 5 a eet eme cteaiaundcceecuatcadenes sane E E EA AE N E 288 4 7 2 3 Debug Environmert rtt tO RE ERR ME desu EXPL RE Fe PREND M Febr toa Es pef e dB un 289 4 7 2 4 Setup WIZArd 5 tea tod eei eh efi Dti S C predi tin os 303 4 7 8 Memory Map etatis eese ue ee eoe tt n vatem teta Le eate Mae ree 305 4 7 4 FLASH Area Control uic dedere pet dte erred du c eec ev al Rap aede gud de dec ee og 309 4 7 5 NpL RremEE 310 4 7 6 Keyb ard M dle 313 4 7 7 zog c 315 4 7 8 zio ITI EIDEM 317 4 7 9 TOol StartUp coco e eec pn dte uta dan se te 319 4 8 PAIN E MH M E 320 4 8 1 Cascade Vertical HOZOM oii 2 eese ence lsd oras en dear daa a epe a aw c ge de aui ede da 321 4 8 2 Split deese tite Ur Sot Ln MM ELA AD LANE bee te ae 322 4 8 3 Arrange ICONS esee ee pd ete be Me E ii t nM 323 4 8 4 auc E 324 4 8 5 Refresh All Windows hit t E D eR ORE PR E E REP UR HR EREU RUE 325 4 8 6 Close All WindOWs 2 belies i pde he et tit ane Dou ave aed 326 4 9 izle T E TNE P AET ceca EE A EEIT EATE ET O A E E A A T O 327 4 9 1 Help TOIS Dp a a a aaa eee a ee 32
195. n in Figure 3 6 1 As shown in this example the edit window docked with the Main Window can be displayed only when the standard editor built into SOFTUNE Workbench is in use SOFTUNE Workbench can register and use any external editor In this case however the edit window is not treated as a SOFTUNE Workbench screen Figure 3 6 1 Example of Edit Window I startup asm i OF x l 18 i PROGRAH start Ruler 1117 3i TITLE start 12 4 13 2z2 z2 zz z Line number display 14 external declaration of symbols Dg ey a aN 16 EXPORT _ start Text editing area 177 IHPORT main 18 Weg ce ee aa 28 definition to stack areal SU ge ee NE 22 i i SECTION STACK ALR HEE Line selection field 23 RES B 254 2h SSTACK TfP f 4 gt paa O0 Z When a read only file is opened Protect is displayed When the Caps key is locked CAP is displayed When SOFTUNE Workbench is in the character overwrite editing mode Overwrite is displayed The cursor position is displayed in line column E Short Cut Menu Source Window Opens the Source Window Undo Cancels the last editing Redo Redoes the canceled editing Cut Moves the selected character string to the clipboard 61 CHAPTER 3 Windows 62 Copy Paste Delete All select Print Add to Project Find
196. naeeeseaaaesseeeeseaaesseneeees 353 APPENDIX E Installing Monitor Debugger sseeeeeennneennn nennen ennemis 354 APPENDIX F External I F for Simulator nnne nennen enne nnn nennen 374 FA SSDL Entty Start ete net etm e hebt aide Dao ee reete rettet 376 F 2 SSDlI Init InitialiZe 5 a ded andit hse sut tL MESE 377 ES SSDI Ready Ready uie eco qe taedet D ede Dee ea e ae ie 378 EA SSDI End End iiim aep DAR IERI Ue SEU EH ERAT ede 379 F 5 SSDI Reset Event Post Reset ssssssssssssssseseseneneen enne nennen nennen nn nns n nre 380 F 6 SSDI Read Event Post Read attinet e e ER ECCE RELEIESTG REDE RE EE HERE EORR E 381 F 7 SSDI Write Event Post Write sssssssssssssssseeeeeeeneeen nennen nennen sitter nennen nenne 382 F 8 SSDI Execute Event Post Execute Instruction ssssssssssssseeeeeneeeene enne 383 F 9 SSDI Interrupt Event Post Interrupt sssssssssssseeeneeeeeennne enne nne 384 F 10 SSDI Timer Event Post Timer eesssssssssesesssesse estne nennen nnne nnn tn iaai snnt 385 F 11 SSDI Read Memory Read from Memory sssssssssssessseeeeen nennen nnne nnne 386 F 12 SSDI Write Memory Write to Memory sssssssessesseneeeeneennnenen nennen nnns nnne 387 F 13 SSDI Read Register Read from Register sssssssssssssssseeeeeeen nennen 388 F 14 SSDI Write Register Write to Register
197. nce setting state opens A sequence latch and delay count can be set from this window This function can be used in the emulator MB2141 E Setting the Sequence Select Setup from the short cut menu of the Sequence Window Figure 4 6 10 Sequence Setting Dialog Event fi Cancel m Trace control Jump level 2 m e SN Pass count D C Disable Level Select a level 1 8 Event Select an event 1 8 Timer Jump Level Select a jump destination level 1 8 END Pass Count Set a pass count Trace Control Select Enable or Disable E Setting the Delay Count Select Delay Count from the short cut menu of the Sequence Window Figure 4 6 11 Delay Count Setup Dialog Setup delay count Ea Delay count D O i End delay count Cancel E Break C No break Delay Count Set the delay count Delay Count Break Select Break or Not Break 267 CHAPTER 4 MENUS E Setting Latch Select Setup Latch from the short cut menu of the Sequence Window Figure 4 6 12 Latch Setup Dialog Lach Divergefrom 1 x Deee Diveget 2 rz Gee Latch No Select a latch number 1 2 Diverge from Select a branching source level 1 8 Diverge to Select a branching destination level 1 8 END Delete Deletes the set items E Displaying Latch Select Latch Display from the short cut menu of the Sequence Window The latch measurement result is displayed Figure 4 6 13 Latch Dis
198. nch sse 4 CHAPTER 2 OPERATION insi nonni cde EE reae Rn vaa aa i vas Sa ci Ra ede e DOR trina 5 2 1 Parameters to be Entered from Dialog sse enne nnne nnns 6 2 1 1 Data and Address Formulas Numerical Constant 0 ccccseseeeseceeeeeeeeeceeeeeeeeaeeseeeeeesaeeeseneeeeaas 7 2 1 2 Data and Address Formulas Symbols Line Numbers Character Constants 9 2 1 3 Data and Address Formulas Register Name Flag Name ssseeeee 11 2 1 4 Operators Usable in Data and Address Formulas sse 12 2 1 5 Address Formula Specification et ec rate oe a vitac rive E EH en a D D ua 14 2 1 6 File Name Specification 1 ceeds Ses tenero RR ipi Fes Dua se epa aber nii D Fe RR EHE er denned 15 2 2 Starting and Terminating SOFTUNE Workbench sess 16 2 3 Grea ng WorkSpace 1 cod t dte dut C dtr dee est terne c eed RR pure CERE bis ah Rape 17 24 Storing of Project Tee aenn EE 19 2 5 Creating and Registering Source File in Project sse 21 2 6 Definition of Subproject ssssssssssseseseeeseeeenne nennen enn tent nnns sin tett en rns sss nrt sinn nn nns en nens 22 2 7 Creation of Project Configuration conet ret itte reper be ertet ee rte Ed Ee E dod 23 2 8 Setting T 60lS eiie LH UU A icum Lt te ORTU Pract 25 2 9 Setting Linker Options ssnin ainiin tete RU Ho Hcet e toe das dete ae ea tee eee 26 RE Make
199. ndo Redo Cut 1 Select the character string you want to cut 2 Click the right button of the mouse to display the short cut menu then select Move from the menu SOFTUNE Workbench deletes the selected character string from the edit window and moves it to the clipboard See Section 4 3 2 Cut Copy Paste Delete Copy 1 Select the character string you want to copy 2 Click the right button of the mouse to display the short cut menu then select Copy from the menu SOFTUNE Workbench copies the selected character string to the clipboard See Section 4 3 2 Cut Copy Paste Delete Paste 1 Move the cursor to the position into which the character string is to be inserted 2 Click the right button of the mouse to display the short cut menu then select Paste from the menu CHAPTER 3 Windows SOFTUNE Workbench inserts the character string in the clipboard into the cursor position See Section 4 3 2 Cut Copy Paste Delete Delete 1 Select the character string you want to delete 2 Click the right button of the mouse to display the short cut menu then select Delete from the menu SOFTUNE Workbench deletes the selected character string See Section 4 3 2 Cut Copy Paste Delete All select 1 Click the right button of the mouse to display the short cut menu then select All select from the menu SOFTUNE Workbench selects all the texts in the edit window and displays t
200. ne function In this case the assigned keys have the same function Once the Set or Reset button is clicked the set or reset key cannot be canceled If the Set or Reset button is clicked by mistake set the key again As for the keys that can be set see Table 4 7 2 313 CHAPTER 4 MENUS Figure 4 7 29 Key Setup Dialog Kind Function List P Delete Edit FileNewPrj View FileNewSrc Project FileOpen Close Setup FileLdPrj DEBUG FileLdSrc FileSave FileSvPrj Reset FileSaveAs FileSaveAll Definition lis FilePrint gt Assign Key New Assign por Explain New Table 4 7 2 Keys That can be Set Explanation CTRL A to Z Press any of the A to Z keys while holding down the CTRL key SHIFT CTRL A_ Press any of the A to Z keys while holding down the SIFT and CTRL keys SHIFT F1 Press the F1 key while holding down the SHIFT key 314 CHAPTER 4 MENUS 4 7 7 Editor Editor enables any editor to be registered and used as the standard editor E Registering an Editor Register the editor to be used instead of the standard editor built into SOFTUNE Workbench in advance Set the registered editor as the SOFTUNE Workbench editor before editing the file actually Of the registered editors the editor set in Available Editor is used to edit the file Figure 4 7 30 Editor Setup Dialog Available E ditor st andard Editor Tite fo Execute Filename 1 Browse
201. ns Arrange icons arranges the locations of the minimized window icons E Arrange Icons Arrange icons arranges all the minimized windows in the SOFTUNE Workbench main window Figure 4 8 1 However unminimized windows are not affected Figure 4 8 1 Main Window State after Icon Arrangement ga SOFTUNE Workbench sample Debug File Edi View Project Debug Setup Window Help 815 elle Fe hee 5 Hele 1e iras ee a ee EH Workspace sample S sample abs sample H E Source Files B 8 startup asm Include Files i Dependencies B 4 Debug EM MB2141 sup u Ee Simulator sup Symbol sjalx BEP startup asm FJ f E3 Pe easter AEE gy Local Sjo x m Memory ani x Ns fol xi ed slab 2 sample c imc x Fs Command alol xi Local Watch Trace Command sample c E startup asm Symbol Assembly i rj LEE NE EE EE DS e DEBUG MB89wW625 SIM Break IP CI20 7 323 CHAPTER 4 MENUS 4 8 4 Refresh This command updates information on an active window B Refresh Information on the current active window is updated 324 CHAPTER 4 MENUS 4 8 5 Refresh All Windows This command updates information on all the open windows B Refresh all Windows Information on all the open windows except the SRC tab of project and Output windows is updated 325 CHAPTER 4 MENUS 4 8 6 Close All Windows Close all windows closes all open windows E Close all Windows
202. ns the property in the Source window E Property General Figure 4 3 16 Property Source Window General Source file x General File name sample c Directory D Softune sample B96 Project Browse Tab ps Size 157 1Byte Modified 19 45 44 Thursday September 12 2002 Cancel File name The full path to the selected file is displayed Directory Displays the directory in which the source file exists When changed the directory is searched and the found source file is redisplayed Tab Displays the tab size It is possible to change Size Displays the file size Modified Displays the date and time of the last file update 146 CHAPTER 4 MENUS 4 3 9 4 Property Symbol Window This section explains the property in the Symbol window E Property General Figure 4 3 17 Property Symbol Window General General Symbol void maini Scope Storage class global Address H F304 Symbol name The name of the selected symbol is displayed Scope The scope position of the selected symbol is displayed Storage class The storage class of the selected symbol is displayed Address The address of the selected symbol is displayed 147 CHAPTER 4 MENUS 4 3 9 5 Property Local Window This section explains the property in the Local window E Property General Figure 4 3 18 Property Local Window General General Expression val Value H 2000
203. nt is displayed Pass count The set pass count is displayed In the count of times the PC has passed that point by the present time is displayed Symbol The symbol given to that address is displayed Set button These buttons are used to set a break point at the specified address When an address that has been already set in the break point list is specified the set data of the break point at this address is changed 259 CHAPTER 4 MENUS Details button This button is used to set the details of a break point at the specified address For details see Section 4 6 4 1 Break Point Details Setting Enable button This button is used to enable the break points in the break point list currently being selected Disable button This button is used to disable the break points in the break point list currently being selected The break points are simply disabled that is the setting itself of the break points is not canceled Delete button This button is used to delete the setting of the break points in the break point list currently being selected All Delete button This button is used to delete the setting of all the break points in the break point list Jump button Displays data at the break point selected from the break list in the memory window il Sequence Break Points When two set addresses are passed the order of LEVEL LEVEL2 the break points to be stopped the program is called a seq
204. o sample connections 354 APPENDIX E Installing Monitor Debugger for serial programming in the hardware manual for each microcontroller Monitor Debugger is designed to work with the same connection as that for on board flash programming except for the operation mode setting pin Figure E 2 Sample Circuit for Adapter Connection Circuit Connector manufactured by YAMAICHI ELECTRONICS Connector manufactured by YAMAICHI ELECTRONICS FAP 10 08 4 0BS User system FAP 10 08 4 0BS 5V MB95F128MB Vcc Index mark P10 UIO Microcontroller Connector Microcontroller pin pin P11 UOO P12 UCKO RST VSS This can be VCC This can be H when flash CI unconnected unconnected memory is o reprogrammed x zz 4 7kQ aa go BGM adapter L when Monitor MB2146 09A Debugger is used s Bi Conditions Required for the Target System To use Monitor Debugger the target system must satisfy the following conditions Input clock frequencies Table E 1 Input Clock Frequencies Main oscillator clock frequency 1 MHz or more Sub oscillator clock frequency 32 768 kHz Only for dual clock products 355 APPENDIX The following resources must be able to be allocated for the monitor program Table E 2 Resources for Monitor Program Resource name Condition Remarks F MC 8FX About 1 5 Kbytes Location addresses fixed Note OxFAOO OxFFBF 1 1 Monitor code et
205. o change the active project and active configuration see Section 2 4 Storing of Project and Section 2 7 Creation of Project Configuration E Making or Building Specified Project Select the project to be made or built in the SRC tab of project window Select Make or Build in the short cut menu The active configuration of the specified project is made or built If a subproject is defined priority is given to making or building of the subproject E Changing Subproject Configuration at Making or Building 1 Select Project Project Configuration Configuration at Build 2 Select the parent project and configuration When the Set Configuration at Build dialog is opened select the project to be set from the Project box and its configuration The configuration of a subproject to be made or built is displayed 3 Select the configuration of a subproject Select the configuration to be made or built from Configuration of Subproject at Make Build 4 Click the OK button 29 CHAPTER 2 OPERATION 2 11 Debugging The absolute file created as a result of normal termination of make build can be debugged immediately after SOFTUNE Workbench has migrated to the debug session E Migrating SOFTUNE Workbench to Debug Session To enable SOFTUNE Workbench to debug the absolute file migrate it to the debug session To migrate SOFTUNE Workbench to the debug session select Start Debug from the Debug menu First debugging after p
206. oad Q Inquiry Load Debug when workspace is open Specifies the debug action just after the workspace opens Save debug setup file debug environment when debug ends Specifies whether to save setup information upon completion of debug session Auto load the targeted file after make build debug session Specifies whether to reload target file after make build executed in debug session 200 CHAPTER 4 MENUS 4 5 5 Setup Project Setting regarding the project is performed B Setup Project The Setup Project dialog has the part where the target item is set and the part where setting is performed The set values are enabled when the Apply or OK button is clicked The directory can be described in a relative path from the project If two or more target items are set the values are displayed as follows Edit If the values are equal in all target items they are displayed as they are If the values are not equal in at least one target item they are blanked Check button If the values are equal in all target items they are displayed as they are If the values are not equal in at least one target item they are dimmed Figure 4 5 6 Setup Project Dialog Setup Project Ea MCU C Compiler Assembler Linker Librari 4 L E Remove this tie from target of Burd sample prj Loadmodule ABS MB8SwW B25ABS MB8SwW625X0BJ MB8SwWB25ALST 201 CHAPTER 4 MENUS E S
207. object is displayed Task ID task state Semaphore Semaphore ID count of semaphores Flag 1 bit flag Flag ID SET or CLEAR Mail box Mail box ID count of message queues count of tasks Cyclic handler Handler ID active state residual time till activation Ready queue Priority count of tasks Timer queue Task ID or cyclic handler ID 93 CHAPTER 3 Windows E Short Cut Menu Task Executes task system calls Semaphore Executes semaphore system calls Event Flag Executes event flag system calls Mail Box Executes mail box system calls Ready Queue Executes ready queue system calls Cyclic Handler Executes cyclic handler system calls Monitoring Switches whether to enable or disable monitoring Property Displays object properties Close Closes Object Window For details on the above items see Section 4 4 11 Object 94 3 17 Coverage Window CHAPTER 3 Windows This window is displayed only when SOFTUNE Workbench is in the debug session The Coverage Window displays the coverage measurement result E Coverage Window Figure 3 17 1 shows an example of the Coverage Window The Coverage Window displays the coverage measurement result at debugging This window is displayed only in MB2141 emulator For details on the coverage function see Section 4 4 12 Coverage Figure 3 17 1 Coverage Window 16 Address Unit E Coverage Iof x HEX
208. ocedure 1 Select Tool from the Setup menu The tool setup dialog shown in Figure 4 7 28 opens 2 Select the tool title you want to delete from the tool list 3 Click the Delete button E Tool Change Procedure 1 5 Select Tool from the Setup menu The tool setup dialog shown in Figure 4 7 28 opens Select the tool title you want to change from the tool list The values set in Title Execute Filename Option Executing Directory Designate Additional Option when Executing and Use Output Window are displayed Change Execute Filename Option Executing Directory Designate Additional Option when Executing and Use Output Window When Title is changed the set tool is registered as another tool Click the Setup button The dialog asking you whether to change the tool opens Click the Yes button E Example of Tool Setup When notepad is used Title note pad Execute Filename note pad exe Option GE Executing Directory Do x Designate Additional Option when Executing A check mark is not set Use Output Window A check mark is not set 311 CHAPTER 4 MENUS 312 When the dir command is registered Title Execute Filename Option Executing Directory Designate Additional Option when Executing Use Output Window Dir command com c dir A check mark is not set A check mark is set CHAPTER 4 MENUS 4 7 6 Keyboard Keyboard en
209. ode2 The linker determines whether to allocate sections unspecified for allocation in a ROM area or in a RAM area based on the types of the sections and automatically allocates them in empty area in each area The subsequent setting depends how the section is concretely allocated 228 CHAPTER 4 MENUS Figure 4 5 32 Disposition Connection Setup Dialog Setup Project x Target of setting General MCU C Compiler Assembler Linker Librari 4 MBB3wE25 Category Dis position Connection Auto Disposition Mode 2 ROM RAM Area List Set Jelet iy Dawn ROM RAM Ar Start End Add _INROMOL cooo FFFF ROM _INRAMOL 0080 02 r RAM The Disposition Connection option is reset Set Section Vv When a ROM RAM area is specified beyond the internal ROM RAM range the warning is issued Iv When sections are arranged beyond the range that the ROM RAM area is specified the warning is issued Option g AL 2 to_INROMO1 0xC000 0xF FFF aa INRAMOT 0 0080 0 027F Figure 4 5 33 Setup Section Dialog R M RAM Area Name INRAM 01 m Section Name co DE Set Address Contents Type Code T Section Name List Delete Up Em Days Cancel 229 CHAPTER 4 MENUS E When a Section is Allocated to the Specified ROM RAM area 1 7 Define the ROM RAM area See Defining the ROM RAM area Select the ROM RAM area you want to set from R
210. oded to check the status of I O port P13 1 and causes an auto boot when the port is High or waits for connection from the debugger if not wow In fgm_cfg h a symbol following On the MB95F128MB I O port P13 must be set along with the MOD pin to program flash memory on the board It does not have to be set for object loading from the debugger is used as the one that can be referenced by the assembler Note Immediately after the power is turned on the I O ports may be unstable in status For referencing an I O port by the auto boot checker design it in due consideration of its electrical characteristics 366 APPENDIX E Installing Monitor Debugger Coding in the assembler Return the return value to the EP register Set the EP register to 0x0000 if the auto boot conditions have not been satisfied When they have been satisfied set the EP register to a value other than 0x0000 such as 0x0001 Shown below is an example in an assembler source Figure E 18 Coding Example in the Assembler Assembler Code Having the Same Effect as Sample Program autoboot c _AsmAbootCheck clrb IO DDRI 3 P13 Input bbc _IO_PDR1 3 debug movw EP 0x0001 AutoBoot jmp exit debug movw EP 0x0000 DEBUG exit ret Figure E 19 Setting Example in fgm cfg h Auto boot address IMPORT _AsmABootCheck define USER ABOOTADR AsmABootCheck Like the sample program in the C language t
211. of the last file update Input Figure 4 3 13 Property Project Window Input File Property E Softune sample 8964Project MB89W 625 0B start E Softune sample 896 Project MB89W625 0BJ samp Tool Displays the language tool to be executed File The file used in creating a target file is displayed in order 143 CHAPTER 4 MENUS Modified Displays the date and time of the last file update E Property Output Figure 4 3 14 Property Project Window Output File Property C compiler Output name Main file name of all files outputted by the language tool of the selected file is displayed Tool Displays the language tool to be executed File The file outputted by the language tool of the selected file is displayed Updating time Displays the date and time of the last file update 144 CHAPTER 4 MENUS 4 3 9 2 Property Edit Window This section explains the property in the Edit window E Property General Figure 4 3 15 Property Edit Window General General Filename D Softune sample B96 Project sample c Size 1571 bytes Modified 19 45 44 Thursday September 12 2002 TabSize 4 File name The full path to the selected file is displayed Size Displays the file size Modified Displays the date and time of the last file update Tab size The size of tab code is displayed 145 CHAPTER 4 MENUS 4 3 9 3 Property Source Window This section explai
212. on Dialog Match with Emulation Memory Memory operation x Fill Copy Copy to emulation memory Match with emulation memory Start Address H F305 End ddress H F365 ox Cee To collate user memory with emulation memory open the Match with Emulation Memory tag then set the collocation start address and collation end address Start Address Specify the address at which collation is to be started Collating user memory with emulation memory is started at this address End Address Specify the end address of the collation source area Collating user memory with emulation memory is continued to this address E Comparing Memory Blocks To compare memory blocks click the right button of the mouse in the Memory Window to display the menu then select Compare from the menu The comparison dialog shown in Figure 4 4 12 opens Start Address Specifies start address of comparison source area Memory block comparison is started from this address End Address Specifies end address of comparison source area Memory block comparison is continued up to this address Target Address Specifies start address of comparison destination area 163 CHAPTER 4 MENUS B Edit 164 Figure 4 4 12 Comparison Dialog Start address pr Compare nes End address UE NN Target address oo v Split window horizontally For example when 4 is specified as the skip byte count addresses are skipped for each 4
213. on to open the item selection dialog select the item to be set from the dialog then click the OK button Click the Next button Click the Complete button Emulator MB2146 09 setup has been just completed E Procedure when the Simulator Debugger is Selected 1 2 Set whether to load the target file automatically during debugging Specify the batch files used before and after load as required Clicking the Refer button to the right of each input field enables batch file selection 3 Click the Next button Select the item to be set in the setup file When Specify is selected click the Setup button to open the item selection dialog and select the item to be set from the dialog then click the OK button Click the Next button Click the Complete button Simulator debugger setup has been just completed E Procedure when the monitor debugger is selected Enter a password required at starting debugger 304 Nn FW WY l 9 10 Click the Next button Select USB as the device type Input the oscillation frequency Set whether or not to load the target file automatically during debugging Specify the batch files used before and after load as required Clicking the Refer button to the right of each input field enables batch file selection Click the Next button Select the item to be set in the setup file When Specify is selected click the Setu
214. ools 2 9 Setting Linker Options 2 10 Make Build 2 11 Debugging 2 12 Executing Debugging Only 2 13 Reading SOFTUNE Project Files of Old Versions 2 14 Moving Project Files 2 15 Useful Functions CHAPTER 2 OPERATION 2 1 Parameters to be Entered from Dialog When key entry is requested from a dialog the following four elements can be written as parameters Data formula Address formula Identifier File name specification E Data Formula A data formula consists of a term and an operator Data formulas comply with C language formulas Almost C language formulas are recognized Some points e g line number and register specification are extended Operations involving floating point numbers and character strings are not supported The overflows that occur during the operation are ignored Zero division results in an error E Address Formula An address formula is an extension of the data formula it represents a memory location Like the data formula the address formula consists of a term and an operator The terms and operators usable in address formulas are the same as those in data formulas B Identifier Alphabetic characters numbers and can be used as identifiers Each identifier must begin with a character other than numbers Uppercase characters are distinguished from lowercase characters or vice versa E File Name Specification File name specification complies with Windows rules 2 1 1 CHAPTER 2
215. oose a target MCU for the chip type that is chosen from the Chip area CPU information file list Lists the registered CPU information files Add Adds a CPU information file Delete Deletes a CPU information file that is chosen from the CPU information file list Note that the files that are retrieved by default cannot be deleted Note There are no functions with some CPU 209 CHAPTER 4 MENUS 4 5 5 3 Setting C Compiler Options This section explains how to set C compiler options E Setting C Compiler Options 1 Click the C Compiler tab from the project setup dialog 2 Select category General Define Macro Include Path Optimize or Language specifications can be selected as category Even though any category is selected all the C compiler option currently being set is displayed at the bottom of the dialog If the individual option is set the Common Option button can be clicked to return to the common option The macro description can be used to describe options For the macro description refer to Section 1 11 Macro Descriptions Usable in Manager of SOFTUNE Workbench User s Manual E Setting General Options 210 Figure 4 5 15 General Option Setup Dialog Setup Project x General MCU C Compiler Assembler Linker Librari gt Category Vener x Common pion Outputs start message v Outputs debug information Warning Level Level 1 v Outputs used
216. orkbench menus or external tools in the customize bar the button of the registered number is enabled when the Workspace is opened Also currently registered items are displayed by moving the mouse cursor over any button in the tool bar B Installing Customize Bar Apply a check mark to the Customize Bar in the dialog Figure 5 1 2 that is displayed when installing SOFTUNE Workbench to install the customize bar Note that you can also install only the customize bar if it was not installed when you installed SOFTUNE Workbench 333 CHAPTER 5 Add in Module Figure 5 1 2 Dialog Displayed When Installing F2MC 8L 8FX Family SOFTUNE Workbench Setup Select Components Choose the components Setup will install Eh SOFTUNE Workbench les Workbench 0 Communication module for E asy CODE 7 Communication module for ZIPC istelleriela When the customize bar is installed the Customize Bar is added to the SOFTUNE Workbench View menu Figure 5 1 3 and a tool bar Figure 5 1 1 for the customize bar is displayed 334 CHAPTER 5 Add in Module 5 1 2 Customize Bar Menu This section describes the customize bar menu BB Customize Bar Menu There are two submenus in the Customize Bar Setting View Registers batch files and Workbench menus in the customize bar This menu is enabled when opening a workspace Switches to view hide the tool bar for the customize bar This menu is always enabled
217. ow Display the change The location where was changed from the previous contents will be shown in red while program execution is stopped or monitoring This function is only valid in a range where currently displayed by memory window Display with 16 bytes fixed in size The number of bytes at one line can be chosen Auto which is corresponding to the size of window or 4byte 8byte 16byte 32byte and 64byte which the size of bytes are fixed In order to set up the number of bytes use Setup at short cut menu Bookmark setup function Bookmark can be set by coloring the specified address range By setting a bookmark it enables to view the specified line using search bar and menu or key operation Please refer to 4 3 7 Bookmark for details Drag and Drop By dropping variable name function name label or address from source window to memory window the address of dropped character string is shown and address range of the symbol will be chosen 81 CHAPTER 3 Windows Figure 3 11 1 Example of Memory Window Bookmark which can be marked in a specific color ED Memory Data display section Displayed data can be directly modified Characters e g control codes other than ASCII characters are all represented in Column title This line is not scrolled E Short Cut Menu Compare Find Special Inline Assemble Jump Bookma
218. ow to display the short cut menu then select Customize from the menu The standard editor dialog shown in Figure 3 6 2 opens 2 Click View2 tab to choose the keyword type to be changed from the combo box Click Detail button The keyword dialog shown in Figure 3 6 4 opens 3 Enter the keyword to be highlighted in New Item field Click Add button 4 Click the OK button The keyword files is changed 5 When not setting other items click the OK button When selecting a display function set all the related items then click the OK button E Customization Procedure Tab Count 1 Click the right button of the mouse in the edit window to display the short cut menu then select Customize from the menu The standard editor dialog shown in Figure 3 6 2 opens 2 Modify the value displayed in the Tab Count field 3 When not setting other items click the OK button When selecting a display function set all the related items then click the OK button 65 CHAPTER 3 Windows E Customization Procedure Deletion of Keyword I Click the right button of the mouse in the edit window to display the short cut menu then select Customize from the menu The standard editor dialog shown in Figure 3 6 2 opens Click View2 tab to choose the keyword type to be changed from the combo box Click Detail button The keyword dialog shown in Figure 3 6 4 opens 3 Choose the keyword to be deleted from the
219. p button to open the item selection dialog and select the item to be set from the dialog then click the OK button Click the Next button Click the Complete button Monitor debugger setup has been just completed 4 7 3 Memory Map CHAPTER 4 MENUS Memory Map sets the debugger s memory map E Memory Map Setup Simulator Debugger Map List Figure 4 7 23 Memory Map Setup Dialog Map list Map list address attribute 0000 OZ27F read write 0280 BFFF undefined C000 FFFF code read Delete Map list Displays the currently set map area Clicking the Setup button opens the setup dialog Figure 4 7 23 corresponding to the debug session 305 CHAPTER 4 MENUS Map Setup Figure 4 7 24 Map Setup Dialog Setup memory map H 0000 Start Address Specifies the start address to be set End Address Specifies the end address to be set Attribute Specifies a memory space attribute Read Write or Code E Memory Map Setup MB2141 Emulator Map List Figure 4 7 25 Memory Map Setup Dialog Setup map 0000 O02 7F code read write user C000 FFFF code read emulation Map list Displays the currently set map area Clicking the Setup button opens the setup dialog Figure 4 7 25 corresponding to the debug session 306 CHAPTER 4 MENUS Map Setup Figure 4 7 26 Map Setup Dialog Setup memory map E H 0000 Start A
220. p Make Build Go Step In Step Over Step Out Run Until Cursor Reset MCU Abort Break Point Set Reset Register window Watch window Memory window Disassembly Download Flash Memory Upload Flash Memory Erase Flash Memory Display and setting of MCU condition flag status 40 B 8 8 8 BB CHAPTER 3 Windows 3 3 Status Bar The current status of SOFTUNE Workbench is displayed The status bar is displayed in the last part of the main window E Status Bar The status bar has the areas in which information is displayed The information and the areas in which is displayed are simply shown in Figure 3 3 1 Figure 3 3 1 Status Bar A The current status of SOFTUNE Workbench is displayed Break at F305 by breakpoint DEBUG MB89051 EML Break IP F305 7 DEBUG is displayed when SOFTUNE Workbench enters the debug session An MCU number e g MB89051 is displayed when SOFTUNE Workbench is in the debug mode The type of the debugger is displayed when SOFTUNE Workbench is in the debug mode The debugger status e g execute break is displayed when SOFTUNE Workbench is in the debug mode The current IP instruction address when is displayed when SOFTUNE Workbench is in the debug mode 41 CHAPTER 3 Windows 3 4 Project Window The Project Window displays information about the project and load module E Project Window Figure 3 4 1 s
221. pens the open dialog The open dialog displays a workspace file project file load module file source file binary file alias file coverage file batch file and text file If SOFTUNE Workbench is not in the debug session the binary file alias file coverage file and batch file are not displayed Figure 4 2 4 Open Dialog ain Workspace Project file Load module file Text file Cancel E Opening the Load Module File When the project file has been already opened and SOFTUNE Workbench is in the debug session The file dialog for selecting the name of the load module to be debugged opens To load debug information only set a check box for Only Debug Information To set a memory map automatically during simulator debugger set a check box for Auto mapping If this check box is not set set the memory map before opening the load module file When the project file has been already opened but SOFTUNE Workbench has not been in the debug session The dialog asking the operator to make SOFTUNE Workbench enter the debug session opens When the OK button is clicked SOFTUNE Workbench automatically enters the debug session Clicking the Cancel button cancels file open operation When the workspace file is not opened The dialog for checking whether to create a new projects or whether to open the existing workspace project opens To create a new projects click the Yes button To read the existing workspace project
222. play Dialog Latch1 1 2 Oh00m00s000ms000 0u Latch 2 3 gt 0 Oh0Om00s000ms000 0u Latch 1 Latch 2 OhOOm00s000ms000 0 268 CHAPTER 4 MENUS Stack This section explains a SOFTUNE Workbench call stack E Call Stack Usually a program is a set of several subroutines For this reason as debugging advances function calls of several stages occur For example one routine calls another and the called routine calls further another The call stack retains the relationship among function calls Clicking a function name from the function name list or processing the jump button by clicking it immediately displays information for the function in the Source Window In that case triangle symbol marks are displayed next to the function name Figure 4 6 14 Call Stack Dialog Function name sort val Q0D 6 0010 main Close v Parameter The function written in the lowermost line of the function name list is the main function This main function calls the function above it The called function calls further a function above it In this way the function written in the uppermost line is the function in which the current PC exists When return is executed functions are deleted in turn from the function name list starting from the uppermost line Parameter When a check mark is set to the left of Parameter an argument value is displayed after each function name as shown in Figure 4 6 14 When no c
223. play interval time for detailed measurement result display 186 CHAPTER 4 MENUS Unit The values set in Timer minimum measuring unit of the Emulation tab in the debug environment setup dialog are displayed This dialog opens when Debug environment is selected from the Setup menu E Copy of the Performance Measurement Result The measurement result displayed in the performance window can be copied to a clipboard To do this select Copy from the short cut menu while the measurement result is displayed in the performance window Examples When the display type of MB2141 is measurement time event 1 gt 2 min time 1158 0 max time 1830 0 avr time 1503 0 time us count 0 0 999 0 0 1000 0 1099 0 0 1100 0 1199 0 1 1200 0 1299 0 3 1300 0 1399 0 0 1400 0 1499 0 0 1500 0 1599 0 0 1600 0 1699 0 0 1700 0 1799 0 2 1800 0 1899 0 2 1900 0 1999 0 0 2000 0 0 total 8 187 CHAPTER 4 MENUS When the display type of MB2141 is measurement count Note The contents output to a clipboard by Copy form the short cut menu are same as those output by SHOW PERFORMANCE command For more information please refer to Section 4 8 SHOW PERFORMANCE in SOFTUNE Workbench Command Reference Manual 188 CHAPTER 4 MENUS 4 4 14 Fonts The Fonts for each window are changed E Setting Fonts The font information font name and size currently set fo
224. plication program Restricted A forced break is not available while UART SIO interrupts are disabled A forced break during the execution of the application is implemented by the UART SIO interrupt routine A forced break cannot be used to halt the application when the interrupt enable flag T is 0 or while an interrupt whose priority is higher than UART SIO interrupts is being serviced Be careful not to mistake Monitor Debugger operation errors for such breaks Restricted Dual clock products with a sub clock input require longer response time The speed of communication with a microcontroller which can operate with the sub clock may decrease to around 128 bps Immediately after a code break forced break or single stepping in particular the settings of the PLLC and SYCC registers may have been updated and thus the communication starts at around 128 bps If the microcontroller is operating actually with the sub clock the communication remains at a speed from 128 bps to 4000 bps The monitor program slows down its operation and response time as well Be careful not to mistake Monitor Debugger operation errors for such delays 371 APPENDIX Restricted Code breaks are invalid during step in execution When Monitor Debugger steps in for each machine instruction it uses a wild register temporarily In that period no code break can be set leaving code break points invalid Be careful in particular if a break point ha
225. point Code address In this field the break point address of the data monitoring break point is specified 262 CHAPTER 4 MENUS E Details of Code Break Point Simulator Debugger Figure 4 6 7 Code Break Point Details Dialog Simulator Debugger Code break point details SHOW STATUS SHOW TRACE 100 0 Break address This field specifies the address to which set a break point Pass count This field specifies how many times PC needs to pass there to break Control Specifies whether to re execute or stop execution after the command processing when the break point is hit Command Specifies the command line to execute when the break point is hit 263 CHAPTER 4 MENUS E Details of Data Break Point Simulator Debugger Figure 4 6 8 Data Break Point Details Dialog Simulator Debugger Data break point details Ed Attribute Break address H OOFS 7 Read Pass count D Iv write Control C No break Break Command SHOW STATUS Break address This field specifies the address to which set a break point Pass count This field specifies how many times PC needs to pass there to break Attribute Specifies the attributes when data accessing Control Specifies whether to re execute or stop execution after the command processing when the break point is hit Command Specifies the command line to execute when the break point is hit Note For more information abou
226. project name Folder Category C source file C source file not subject to making or building C source file in which individual options specified C source file in which individual options specified not subject to making or building Assembler source file Assembler source file not subject to making or building Assembler source file in which individual options specified Assembler source file in which individual options specified not subject to making or building Include file Include file with dependence BA BPAP D PR Library file Library file not subject to making or building Object file Object file not subject to making or building Relative format file Relative format file not subject to making or building REALOS configuration file Other user s registration files Simulator Debugger setup name Valid setup name for Simulator Debugger EM Emulator Debugger setup name eu Valid setup name for Emulator Debugger Monitor Debugger setup name n Valid setup name for Monitor Debugger 44 CHAPTER 3 Windows E Short Cut Menus Click the Right Button of the Mouse on a Workspace Name Figure 3 4 3 shows a short cut menu Figure 3 4 3 Short Cut Menu on a Workspace Name Add Project gt Property Add Project When selected the following two menus are displayed New A new project is added to workspace See Section 4 5 2 Add Project Existing Project An existing project is added to wor
227. put no other item need to be set Execute Step 3 and after only when outputting the list file 3 Select the list file s you want to output Items with check marks are selected Outputs information list Outputs source list Outputs section list Outputs cross reference list Outputs include list 220 CHAPTER 4 MENUS 4 Specify whether to suppress page change When a check mark is set to the left of Control of changing page page change is suppressed When page change is suppressed the line count cannot be set 5 Select a Macro Development Department List from the drop down list No output SRC OBJ OBJ 6 Set line count column count and tab count to the right of Line Column and Tab as required B Target Depend Options Figure 4 5 25 Target Dependency Setup Dialog Setup Project x Linker aje MB83w625 Ei Target Depend i Common Gption sample prj The following options can be specified Outputs accumulator protection code sa 221 CHAPTER 4 MENUS 4 5 5 5 Setting Linker Options This section explains how to set linker options E Setting Linker Options 1 Click the Linker tab from the project setup dialog 2 Select category General Allocation Link Define Symbol List Output Absolute Assemble List Control Library or Register Bank can be selected as category Specified options can be checked using Option at the bottom of the dialo
228. r each window can be displayed and the setting can be changed Also all font settings can be set to the defaults During debugging the fonts for debug related windows such as Source window can be changed E Changing Fonts Change fonts as follows 1 Select the View Font menu The font setting dialog is displayed Figure 4 4 38 2 Select the window with the font to be changed and click the Font button The font setting dialog is displayed Figure 4 4 38 3 Specify the font name and size and click the OK button The font type that can be selected depends on the window 4 When the OK button in the font setting dialog Figure 4 4 38 is clicked the window fonts are changed E Resetting Fonts Reset fonts as follows 1 Select the View Font menu The font setting dialog is displayed Figure 4 4 38 2 Click the AI Reset button 3 The fonts for the window displayed in Window are all reset to the defaults 4 When the OK button is clicked the window fonts are returned to the defaults 189 CHAPTER 4 MENUS Figure 4 4 38 Set Font Dialog Times New Roman O Trebuchet MS Verdana O Webdings 190 CHAPTER 4 MENUS 4 5 Project Project sets project related items and executes make build E Project related Item Setup Active Project Add Project Add Member Setup Workspace Setup Project Setting Customize Build Project Dependencies Configuration Includ
229. r window file data Print output window data in any of the following two procedures Copy output window data to the edit window and print it Copy output window data to the edit window in the following procedure then select Print from the File menu 1 Select all output window data 2 Click the right button of the mouse to display the menu then select Copy 3 Open the edit window then select Paste from the Edit menu Save output window data once then print it For how to save output window data see Section 4 2 7 Save As Open the saved file with the edit window then select Print from the File menu CHAPTER 4 MENUS 4 2 10 Recent Text File Recent Workspace File Of the text files opened in the Source Window in the debugger Recent Text File stores up to five most recently opened text files Of the used workspace files Recent Workspace File stores up to five most recently opened workspace files E Recent Text File Of the text files opened in the Source Window Recent Text File stores up to five most recently opened text files It enables to open the desired text file immediately by selecting it The files in the Edit Window are not stored here E Recent Workspace File Of the used workspace files Recent Workspace File stores up to five most recently opened workspace files It enables you to open the desired workspace file immediately by selecting it Note If a text or project file h
230. re 4 3 7 Bookmark Dialog Memory Window Source Memory Bookmark list Add 00000125 00000125 Change 0000C212 0000C215 PES 0000D57F 0000D67F All delete Jump Bookmark list The list of a bookmark which is currently set in memory window will be displayed Name Name of a bookmark and color of marking will be displayed Address or symbol name will be name of bookmark Address range Range of an address where bookmark is set is displayed Symbol Symbol allocated to a bookmark will be displayed If a symbol is allocated location of bookmark will be updated based on debug information although the line number of symbol changes along with the change in file Please refer to Note for allocatable symbol Add button Display dialog Add a bookmark to add a bookmark For details refer to Section 4 4 5 Memory 134 CHAPTER 4 MENUS Change button Display Add a bookmark dialog and change the setup of selected bookmark in a bookmark list Delete button Delete a bookmark selected from the list of a bookmark All Delete button Delete all bookmarks from the list of a bookmark Jump button Move a start position for displaying a memory window to position of bookmark selected in bookmark list E Setup or Cancel of a Bookmark 1 Please select a range of an address where you want to set or to cancel a bookmark 2 Please execute any of following operations
231. red in the currently opened workspace Chip Classification Selects the chip classification Target MCU Selects the target MCU 194 CHAPTER 4 MENUS Project Name Specifies the project name Target File name Specifies the target file name Project Directory Specifies the directory of the project Dependencies When the project name is specified in the combo box the project to be stored is defined as a subproject in the specified project MCU change Opens MCU change dialog E Procedure for Addition For the procedure for addition of a project see Section 2 4 Storing of Project 195 CHAPTER 4 MENUS 4 5 2 2 Add Project Existing Project An existing project is stored in workspace E Add Project Existing Project Figure 4 5 2 Add Project Dialog Lookin Poet l e A e e MB89W625 a sample prj File name o Files of type Maaema atl beet Cancel Dependencies sample pri z Dependencies 7 When the project name is specified in the combo box the project to be stored is defined as a subproject in the specified project BB Procedure for Addition For the procedure for addition of a project see Section 2 4 Storing of Project 196 CHAPTER 4 MENUS 4 5 3 Add Member Add Member adds a file to the project E Add Member There are the following menus to add a member File A file is specified and stored in the project Directory A director
232. rformance Command Object E Tool Bar Status Bar The View Menu can set the tool bar and status bar to view or non view The set of tool buttons displayed in the tool bar can be also selected using the View Menu Tool Bar Status Bar E Font related Items The fonts for each window can be changed Fonts E Display non display the Window Switching Using the Tab This function enables to choose whether the tab is displayed or non displayed for switching By using the switching tabs it enables to switch edit source memory or watch windows easily Tab 150 CHAPTER 4 MENUS 4 4 1 Project Output Project switches the Project Window to view or non view or vice versa Output switches the Output Window to view or non view or vice versa E Project Window When the Project Window is displayed a check mark is set to the left of Project in the View Menu Even if the Project window is switched to non view the project is not closed When it is switched to display again the Project Window is displayed at the previously displayed position E Output Window When the Output Window is viewed a check mark is set to the left of Output Window in the View Menu Even if the Output Window is switched to non view data in the Output Window is not cleared When it is switched to displayed again the Output Window is displayed at the previously displayed position If make build compile assemble update of dependencies or stop is execut
233. rget File An ABS format target file is to be debugged This file is registered as a project target file Debugging can be started after the ABS format target file has been created Use SOFTUNE Workbench to create a source program and execute compile assemble and link Creation of the ABS format target file is enabled when the program is free from compile assemble and link errors E Loading the Target File 276 Before loading the target file select Start debug from the Debug menu to place SOFTUNE Workbench in the debug session When SOFTUNE Workbench enters the debug session select Load target file from the Debug menu to load the target file The target file load state display dialog shown in Figure 4 6 19 opens when the target file is being loaded Figure 4 6 19 Target File Load State Display Dialog Processing When loading the target file terminates an entry point is set in the PC the source line of the module including the entry point is displayed and the program stops Execute Step and Go etc subsequently to continue debugging CHAPTER 4 MENUS 4 6 13 Start Debug End Debug This section explains how to start and end debug session B Start Debug Start debug places SOFTUNE Workbench in the debug session to enable the subsequent use of debugger commands When SOFTUNE Workbench enters the debug session at first load the target file see Section 4 6 12 Load Target File E End Debug End debu
234. riable which qualified by io Treat most significant bit of amp char type as sign bit Indine of IT amp RON system call development If int type specified in amp bit field treat most significant bit as sii Treat items following as co amp mments in C source 4 4 2 Language specification level aNSI FUJITSU extension OK Cancel Apply The following options can be specified Treat floating point numbers for which suffixes are not specified as float type K FCONST DCONST In line expansion of the function which is qualified by _interrupt K NOINTLIB Treat the variable which is qualified by _io as volatile K NOVOLATILE Treat most significant bit of char type as sign bit K SCHAR 215 CHAPTER 4 MENUS In line of ITRON system call development K REALOS If int type specified in bit field treat most significant bit as sign bit K SBIT Change order in which amp static variables are stored in memory to order in which sources are described verorder Treat items following as comments in C source B Language specification level Jalcle ANSI ANSI FUJITSU extensions 216 CHAPTER 4 MENUS 4 5 5 4 Setting Assembler Options This section explains how to set assembler options E Setting Assembler Options 1 Click the Assembler tab from the project setup dialog 2 Select c
235. rk Edit Setup Break Event Watch Monitoring Close 82 See Section 4 4 5 See Section 4 4 5 See Section 4 4 5 See Section 4 4 3 See Section 4 3 6 See Section 4 4 5 See Section 4 4 5 See Section 4 4 5 See Section 4 6 4 See Section 4 6 5 See Section 4 4 7 Memory Memory Memory Assembly Jump Memory Memory Memory Break Point Event Watch Switches whether to enable or disable monitoring Closes the memory window CHAPTER 3 Windows 3 12 Local Variable Window This window is displayed only when SOFTUNE Workbench is in the debug session The local variable window is used to display and modify local variable values Local variables are displayed in the tree format function name root E Local Variable Window Figure 3 12 1 shows an example of the local variable window Figure 3 12 1 Example of Local Variable Window 1 Local Fr pa x E 3main t i H 0054 j H 0003 Ets 7 D 0 D 1 D 2 H D 3 D 4 H 2F D 5 H oo D 6 H oo A function name is displayed The local symbol names defined in the function and the current values are displayed An array variable name is displayed Array data is displayed Variables of floating point type are displayed 1 25 0 E Short Cut Menu Radix See Section 4 4 6 Local Element See Section 4 4 6 Local Edit
236. rkspace 1 Select File New When the New dialog is opened select Workspace Project File in Type of File and click the OK button 2 Select the Workspace tab When the New dialog is opened select the Workspace tab CHAPTER 2 OPERATION 3 Select the type of workspace Select Blank Workspace as the type of workspace 4 Enter the workspace name Enter the workspace name This name is used as a workspace file name At default it is also used as a workspace directory the workspace directory can be changed 5 Click the OK button CHAPTER 2 OPERATION 2 4 Storing of Project A project is necessary to develop and debug software in SOFTUNE Workbench To store a project in workspace follow the steps below Bi Storing of Project SOFTUNE Workbench uses the following methods to store a project in workspace To store a new project is as active project in workspace Storing new project in currently opened workspace A new project is stored in currently opened workspace Storing existing projects in currently opened workspace Existing projects are stored in currently opened workspace E Storing New Project in Currently Opened Workspace 1 Open workspace to store a project Please open workspace to be stored a project Select Project Add Project New Select Add to Current Workspace Click the Add to Current Workspace check button Select Project Type Selec
237. rnal I F module can be called Example typedef int WINAPI LPFNREADMEMORY LPFNREADMEMORY Read_Memory extern C int WINAPI SSDI Entry int id HINSTANCE if int my dll id id FARPROC pF Read Memory GetProcAddress if SSDI Read Memory Read Memory LPFNREADMEMORY pF Read Memory int func if ReadMemory addr size len data len error APPENDIX F External I F for Simulator F 2 SSDI Init Initialize Format int SSDI Init void Argument None Return value Return NORMAL O Returning any value other than NORMAL 0 causes a failure to start debugger Explanation A call is made when the debugger is started Perform necessary initialization Remarks Now an external I F module can be called 377 APPENDIX F 3 SSDI Ready Ready Format int SSDI_Ready void Argument None Return value Return NORMAL O Returning any value other than NORMAL 0 causes a failure to start debugger Explanation A call is made when the debugger is started Remarks It is called after having done batch file execution and an automatic load in debugger start 378 F 4 SSDI_End End Format void SSDI End void Argument None Return value None Explanation A call is made when the debugger is ended Perform necessary end processing Remarks APPENDIX F External I F for Simulator 379 APPENDIX F 5 SSDI Reset Event Pos
238. ro name Specify a macro name that does not conflict with the macro names that have been already registered Write the commands to be assigned to the specified macro name Aliases variables and other macros can be also written Click the Append button Deleting a macro 1 2 Click the right button of the mouse in the Command Window to display the short cut menu Select Macro etc from the short cut menu The character string replacement setting dialog shown in Figure 3 15 2 opens Click the Macro tag The macro setting dialog shown in Figure 3 15 4 opens Select the macro name to be deleted from the macro list 5 Click the Delete button Figure 3 15 4 Macro Setting Dialog Replace command x Alias Variable Macro Macro resetry Appen dump 1000 1001 set memory 1000 00 00 dump 1000 1001 Command Macro list Macro name command Delete 1000 1001 resetry dump 1000 1001 91 CHAPTER 3 Windows 3 15 2 Logging This section explains SOFTUNE Workbench logging E Logging 92 To record a command execution log in the Command Window in a file is called logging To control logging click the right button of the mouse in the Command Window to display the short cut menu then select Logging Selecting Logging from the short cut menu displays the following submenus Start State Exit Start 1 Click the right button of the mo
239. roject Configuration of sub project when make build Select the configuration of the subproject as the configuration of the parent project selected in Configuration is made or built E Setting Procedure For the setting procedure see Section 2 10 1 Making or Building of Project 249 CHAPTER 4 MENUS 4 5 9 Include Dependencies Include Dependencies updates include file dependency E Include Dependencies This command function checks all the source files in the project file and registers all the include files being used by the source files in the project The registered include files are displayed in the Dependencies category field of the SRC tab of project Window 250 4 5 10 CHAPTER 4 MENUS Compile Make Build and Stop This section explains the functions of Compile Make Build and Stop B Compile B Make B Build B Stop Compile compiles only the specified source file irrespective of whether other source files and include files are corrected However compile does not link the specified source file This command also assembles the specified file when the file is an assembler source file Make checks all the source and include files in the project and compiles or assembles only files which have been modified since the last Make or Build If some library and object files are modified make links them to create a target file Build compiles or assembles all the source files in the pro
240. roject creation Setup Wizard for debuggers is started Set the type of the debugger and others See Section 4 7 2 4 Setup Wizard Second or subsequent debugging after project creation Start SOFTUNE Workbench in the debugger mode that has been already set To change the type of the debugger select the Debug End debug menu to terminate debugging once and then change Project Project Setup menu E Loading the Target Program When SOFTUNE Workbench enters the debug session select Load target program from the Debug menu to load the target program The created program is loaded to the debugger and all debugging preparations are completed now E Operating the Debugger For how to operate the debugger see Chapter 3 Windows and Chapter 4 Menus in this manual For debugger commands and debugger output error messages refer to the SOFTUNE Workbench Command Reference Manual For the debugger functions MCU common function MCU chip dependency function refer to the SOFTUNE Workbench Users Manual 30 CHAPTER 2 OPERATION 2 12 Executing Debugging Only SOFTUNE Workbench can be used as the conventional debuggers E Creating a Project In SOFTUNE Workbench projects are a basis of all work This is not an exception also at debugging For this reason executing debugging only requires the creation of a project for debugging First create the project for debugging and the workspace which stores the project in the following pro
241. rom such failures by incorporating safety design measures into your facility and equipment such as redundancy fire protection and prevention of over current levels and other abnormal operating conditions If any products described in this document represent goods or technologies subject to certain restrictions on export under the Foreign Exchange and Foreign Trade Law of Japan the prior authorization by Japanese government will be required for export of those products from Japan Copyright 2004 2007 FUJITSU LIMITED All rights reserved READING THIS MANUAL E Configuration of Page In each section of this manual the summary about the section is described certainly so you can grasp an outline of this manual if only you read these summaries And the title of upper section is described in lower section so you can grasp the position where you are reading now BB Product name abbreviation In this manual and this product product names are abbreviated as follows Microsoft Windows 2000 Professional operating system is abbreviated to Windows 2000 Microsoft Windows XP Professional operating system is abbreviated to Windows XP CONTENTS CHAPTER 1 OUTLINE OF SOFTUNE Workbench ccccscessseeeeeeeseeeseeeeeeeeeeeseeeneneees 1 1 1 ence CE 2 1 2 What is SOFTUNE Workbench ssssssssssssssesseeennee ener nennen sen unnn enin sin renr innen nnne nnns 3 1 3 Procedure for Developing Programs with SOFTUNE Workbe
242. rt Setup debug environment Disable Specifies non connection or a parallel port name None LPT 1 LPT2 Status Specifies whether the parallel port is valid or invalid 296 CHAPTER 4 MENUS Monitoring MB2141 Simulator Figure 4 7 17 Debug Environment Setup Dialog Monitoring Setup debug environment Monitoring Control Sets monitoring control Memory Window Specifies whether to monitor the Memory Window Watch Window Specifies whether to monitor the Watch Window Object Window Specifies whether to monitor the Object Window Sampling Time Specifies sampling time MB2141 minimum 1000ms 297 CHAPTER 4 MENUS 298 Directory Figure 4 7 18 Debug Environment Setup Dialog Directory Setup debug environment 5 een Display Path Information Specifies the path information to be displayed Append Path Sets the path to be added Directory Displays the currently set directory Directory setup procedure 1 Select the Display Path Information to be displayed 2 Set the Append Path Clicking the Browse button to the right of the Append Path setup field enables path selection 3 Click the Append button 4 When there is no other item to be set click the OK button Directory reset procedure 1 Select the directory you want to delete from Directory 2 Click the Delete button 3 When there is no other item to be set click the OK button
243. ry File Specify a save start address in Start Address When the binary file has been already loaded the start address at that time is set Specify a save end address in End Address When the binary file has been already loaded the end address at that time is set 115 CHAPTER 4 MENUS Note If the project file in a different directory from the original one is saved the members described in a relative path may not be referred In this case move the members with the original directory configuration kept being unchanged 116 CHAPTER 4 MENUS 4 2 8 Save All Save All saves all the files currently being edited B Files to be Saved The files to be saved include text files such as the source file opened in the edit window Data in the workspace project file and output window is not saved Even the text file opened in the edit window is not saved if it is not edited When SOFTUNE Workbench is in the debug session the binary alias setup or coverage file that was edited even once is to be saved E Processing a Newly Created Text If there is a newly created text that has not been saved yet the file dialog for asking the operator to enter the name of the file to be saved opens Specify a file name from this dialog 117 CHAPTER 4 MENUS 4 2 9 Print Print prints file data E Data to be Printed 118 Print prints data in the file currently opened in the edit window it cannot print othe
244. ry x Directory Gk M Sub directory also targeted Browse Cancel Filetype ezam OO mw Mem Type automatic O g Insertion Folder sampe SouceFies dl Directory Specifies the directory having the file to be stored Sub directory also targeted When turned on the file in the sub directory in the specified directory is stored A sub directory is hierarchically created as a folder in the project File type Only the file having a specified extension is stored in the project Mem Type The file is stored as the type of the specified member in the project If Automatic is selected the type of member is determined by the extension Insertion Folder Specify the project in which a file is stored and the folder into which the file is inserted The character string enclosed between and is the project name BB Procedure for Addition For the procedure for addition of a member see Section 2 5 Creating and Registering Source File in Project 199 CHAPTER 4 MENUS 4 5 4 Setup Workspace The basic setting regarding workspace is performed E Setup Workspace Figure 4 5 5 Setup Workspace Dialog Setup Workspace x Setting EE Debug when workspace is open 9 Not Start Debugger Q Start Debugger Q Start Wizard Has Save debug setup file debug environment when debug ends Q NoSave 9 Save Q Inquiry Save Hs Auto load the targeted file after make build debug session 9 NoLoad Q L
245. s Save As stores the previously saved file under a new file name E Save As Save As stores the previously saved file under a new file name The text file output window project file binary file alias file setup file or coverage file can be selected as the type of file If SOFTUNE Workbench is not in the debug session the binary file alias file setup file and coverage file are not displayed Figure 4 2 6 Save as Dialog ibd Cancel Output Window Project file sample prj E Saving the Project File Save the active project file Select the format for saving the project file from the File Type combo box For the project formats refer to Section 1 2 Management Function for Project of SOFTUNE Workbench User s Manual If a Workspace project format prj is selected it saves all project information in workspace project format compatible to workspace When the project file opened in old project format is overwritten in workspace project format conversion is performed and restrictions on old project files are cleared Subsequent saving is performed in workspace project format If an Old project format prj is selected it saves information on active project configurations in old project format incompatible to workspace The project file opened in workspace project format cannot be overwritten in old project format In this case save the file as a different name Bii Saving the Bina
246. s Address of cyclic handler control block Operation Mode Cyclic handler state Enable Disable Entry Address Cyclic handler address Left Time Residual time till activation Activation Interval Cyclic time interval Detailed Display of Ready Queue Figure 4 4 32 Detailed Ready Queue Display Dialog Ready queue x EN Priority Priority Address Address of ready queue header table Queueing task ID number of queued task 182 CHAPTER 4 MENUS E Detailed Display of Timer Queue Figure 4 4 33 Detailed Timer Queue Display Dialog Address 2201 Close Queueing task or cycle handler T0002 coo01 Address Timer queue address Queueing task or cycle handler Cyclic handler ID placed in the timer queue or timeout waiting task ID 183 CHAPTER 4 MENUS 4 4 12 Coverage Coverage displays the Coverage Window E Coverage Window The window displaying the coverage measurement result is opened for setting the coverage and displaying the total coverage rate This window can be used only for the MB2141 emulator E Coverage Setup Select Setup from the short cut menu of the Coverage Window Figure 4 4 34 Coverage Setup Dialog Setup coverage x Status Enable C Disable Area list Set Md Delete Start Address 000 End Address mere d a efault Address range 1000 1FFF Setup possibility 31 Status Select Enable or Dis
247. s been set within an interrupt routine with the interrupt mask disabled during single stepping As the break point within the interrupt routine is invalid no break takes place even when the break point service is executed Restricted Add 4 bytes as the stack area for the monitor program When the application program passes control to the monitor program 4 bytes in the stack area are used to save the application program break address and PS register value If the stack area is insufficient the break address and PS register value cannot be obtained correctly preventing subsequent debugging from being performed normally Restricted Use the flash security feature as well through external pins while allowing debugging with Monitor Debugger Erasing is possible Use meticulous care in password management If you have forgotten the password use the flash To use the password effectively use the flash security feature of flash memory as well Enabling the flash security feature protects flash memory from being read from or written to programmer for erasing and then program a password known monitor program into flash memory Restricted To change the password use the flash programmer If the debugger loads an application whose password has been changed the debugger terminates with an error due to password discrepancy If you have changed the password use the flash programmer to ensure the programming of the application Restri
248. s routine is called with this register containing the value defined in USER STACKTOPD in fgm cfg h PS program status register Set such that the direct bank pointer specifies 0x400 to Ox47F This does not affect resource register access to 0x0000 to 0x007F If access to RAM from 0x0080 to OxOOFF is required be careful to specify an extended address The auto boot checker is executed immediately after the microcontroller is released from a reset It must therefore be coded to be executable with resources not initialized or with C defined initial valued variables not initialized Also consider that some system registers are set to fixed values as mentioned above Note also that the check process taking longer time delays the application to be started Coding in the C language Return int as a return value Return 0x0000 if the auto boot conditions have not been satisfied When they have been satisfied return a value other than 0x0000 such as 0x0001 Shown below is an example from a sample program Figure E 16 Coding Example in C Excerpt from Sample Program autoboot c int AutoBootCheck void IO_DDR1 bit P13 0 P13 Input if IO PDRI bit P13 1 return 0x0001 AutoBoot else return 0x0000 DEBUG Figure E 17 Setting Example in fgm cfg h Auto boot address IMPORT AutoBootCheck define USER ABOOTADR AutoBootCheck 365 APPENDIX The above example is c
249. s through the current PC a break occurs in the middle of executing the function In such cases the following message is displayed Break at address by Invalid call termination Re starts execution using the GO command to continue the execution of the CALL command Note The CALL function may change the resources such as the registers memory or I O from the state prior to the function call To restore registers hold contents prior to the function call and execute the functions or use CLEAR CALL function Other resources are not restored 272 CHAPTER 4 MENUS 4 6 10 Clear Call This section explains the SOFTUNE Workbench call clear function E Clear Call Clear Call is used to restore the original state without executing the function call see Section 4 6 9 Call to the end This function is used after program execution has been stopped by Break Points etc When Clear Call is executed control returns from the immediately called function In this case the function call result is not displayed because the called function is not executed to the end 273 CHAPTER 4 MENUS 4 6 11 Vector This section explains how to display and modify SOFTUNE Workbench vectors BB Vector When the MCU is reset or when an interrupt processing request is issued for a variety of factors the MCU sets the data set in the address determined in advance according to the type of the interrupt in the PC as the address
250. sabled Execute 1 Enabled 0 Disabled x To delete the area settings set the number of the area to be deleted in the area setting number and the attribute to 0 Up to 32 areas can be set If the maximum value is exceeded an error occurs Remarks 393 APPENDIX F 19 SSDI Clear Cycle Clear cycle count Format int SSDI Clear Cycle void Argument None Return value None Explanation Initialize total cycle number managing with ISS Instruction Set Simulator Remarks 394 APPENDIX F External I F for Simulator F 20 SSDI Execute MCU Execute target program Format void SSDI Execute MCU void Argument None Return value None Explanation Starts execution of program for ISS When execution of program starts it already it is ignored Remarks 395 APPENDIX F 21 SSDI_GetCurrentExecuteAddr Get the Address in Execution Format unsigned long SSDI_GetCurrentExecuteAddr void Argument None Return value The address of currently executed instruction Explanation Get the address of the instruction currently in execution Remarks 396 CM25 00322 2E FUJITSU SEMICONDUCTOR CONTROLLER MANUAL F MC 8L 8FX FAMILY SOFTUNE Workbench OPERATION MANUAL June 2007 the second edition Published FUJITSU LIMITED Electronic Devices Edited Business Promotion Dept
251. select the folder to be added to the member Select the directory having the created source file followed by the folder to be inserted into the SRC tab of project window and click the OK button The file and directory are stored in the project and the file and folder below the specified directory are displayed in the specified folder in the SRC tab of project window The type of file to be stored can be restricted by setting Type of File in the dialog E Deleting Files Stored in the Project Select a file s to be deleted in the SRC tab of project window Multiple file can be selected Select Delete from the short cut menu The selected file is deleted from the project member but the file itself is not deleted Users cannot delete files in the Dependencies category and Debug category files 21 CHAPTER 2 OPERATION 2 6 Definition of Subproject This section explains how to define a subproject E Definition of Subproject The subproject is a project on which other projects depend SOFTUNE Workbench uses the following methods to define a subproject Defining project as subproject in storing it When created a new project is defined as a subproject in another project For the setting method see Section 2 4 Storing of Project Defining subproject between existing projects A subproject is defined between projects in workspace Another project is defined as a subproject in the subproject in the parent project Such a
252. set options cannot be restored 25 CHAPTER 2 OPERATION 2 9 Setting Linker Options When creating a program with SOFTUNE Workbench be sure to set a memory map with a linker option E Automatic Setting of Linker Options In SOFTUNE Workbench the following linker options are automatically set on the basis of information on the MCU selected when a new project is created Specify the internal ROM RAM address of the MCU in the memory area option Internal ROM is output under an area name of _INROMxx and internal RAM under an area name of INRAMXxx where x is numbered consecutively starting with 01 Set the auto disposition mode to mode 2 optimum auto disposition by linker When creating a program in a mode other than the single chip mode or when customizing the disposition of sections set the Disposition Connection option as the linker option E Setting of Linker Options In SOFTUNE Workbench specifying memory mapping is basic to the disposition of each section in the memory area Therefore set a memory area and set each section in the memory area E Setting of Memory Area Enter a ROM RAM area name start address and end address select an area attribute ROM or RAM then click the Setup button This setting is displayed in the ROM RAM area list In the ROM RAM area assign a unique ROM RAM name so that it does not match other area names An easy program consists of a ROM area and a RAM area but in
253. setup dialog Execute Step 3 and after only when outputting any of the lists Check Output memory usage information list as needed Set a check mark to the left of A long name is not omitted as required Even names exceeding one list file line are fully output CHAPTER 4 MENUS 5 Specify whether to suppress page change When a check mark is set to the left of Control of changing page page change is suppressed When page change is suppressed the line count cannot be set 6 Set line count and column count to the right of Line and Column as required E Setting Absolute Format Assemble List Options Figure 4 5 29 Absolute Format Assemble List Setup Dialog Setup Project x General MCU C Compiler Assembler Linker Librari al gt Category Absolute Assembly List v Creates an absolute assembly list Dutput module control Output File Name List ROM RAM ARRAY List sample sample Target of setting MBB9WE25 startup All Check All Clear All Check All Clear aS Display Position of Symbol and Address fin Order Symbol Address Option g AL 2 to_INROMO1 0xCO00 0xFFFF ta_INRAMO1 0 0080 0 027F Cancel Apply 1 Select the Absolute Assemble List category The absolute format assemble list setup dialog shown in Figure 4 5 29 opens 2 Set a check mark to the left of Creates an absolute assemble list
254. stack information file Target of setting MB89w 625 IV Creates an assembly list file v Control of default option file Other Option OK Cancel Apply The following options can be set from the normal option setup dialog CHAPTER 4 MENUS Outputs start message V Outputs debug information g Outputs warning message or warning level w Outputs stack usage information file INF STACK Creates assembly list file INF LIST Control of default option file Xdof Depending on CPU classification Output warning level levels 0 to 3 may be selected instead of Output warning message At Specification in Other Option all C compiler options can be written like start up options from command lines Write the options that do not belong to any C compiler option setup categories directly at Specification in Other Option Setting a Macro Name Figure 4 5 16 Macro Name Setup Dialog Setup Project x General MCU C Compiler Assembler Linker Librari 4 Category Define Macro omma ici Macro Name TEN Value fi 0 Macro Name List Set TEN 10 Target of setting MBB9WE25 If there are two or more items to be set the macro name found in some item is grayed 1 Select the Define Macro category The macro name setup dialog shown in Figure 4 5 16 opens 2 Specify the Macro Name 3 Specify the Value as required
255. stop instruction execution Remarks The count of cycles from the beginning of the instruction inst cycle is always posted as 0 381 APPENDIX F 7 SSDI Write Event Post Write Format int SSDI Write Event WRITE EVENT info Argument typedef struct unsigned long addr int size unsignedlong data unsigned long total cycle unsignedlong inst cycle unsigned long cycle ORDER_TYPE type WRITE_EVENT typedef enum ORDER_NORMAL ORDER_RMW ORDER_TYPE Return value Access address Access size 1 Byte 2 Word 4 LONG Write data Total cycle count Count of cycles from beginning of instruction Count of cycles taken for access Instruction type notification Other than read modify instructions Read modify instruction 0 Write data enables 0 Write data disabled Explanation Posts the occurrence of a write access event by instruction execution When write data is enabled the ISS does not write data to memory Therefore when write data is reflected in ISS memory data must be written by using SSDI Write Memory When write data is disabled data is written to ISS memory Set the count of cycles taken for write access as the count of cycles taken for access info cycle If this access cause an error use SSDI Request Abort to stop instruction execution Remarks The count of cycles from the beginning of the instruction inst cycle is alw
256. t CHAPTER 3 Windows Return to Common Setting All individual options in the specified folder are returned to common options Delete The specified file is released from the project member The file itself is not deleted Property File information is displayed See Section 4 3 9 Property Open List File Select the list file you want to open from the submenu If the list file you want to open is not created no submenu item can be selected Open Assemble file This menu is opened when a C source file is selected Of the specified C source file the assembler source file output by a compiler is opened No file can be selected when not compiled il Short Cut Menus Click the Right Button of the Mouse on an Include File and Other User s Registration File Figure 3 4 14 shows a short cut menu Figure 3 4 14 Short Cut Menu on a Include File Name Open Delete Property Open When SOFTUNE Workbench is in the debug session the specified include file is displayed in the Source Window When SOFTUNE Workbench is not in the debug session the specified include file is displayed in the edit window Delete The specified file is released from the project member The file itself is not deleted Property File information is displayed See Section 4 3 9 Property E Short Cut Menus Click the Right Button of the Mouse on Library File Object File and Relative Format File Figure 3 4 15 shows a short cut
257. t 5 When setting all the items is completed click the Close button E Resetting an Interrupt 1 When the interrupt setup dialog shown in Figure 4 7 8 opens set an Interrupt number 2 Select the interrupt to be reset from Interrupt List 3 Click the Delete button 4 When resetting all the selected interrupts is completed click the Close button Figure 4 7 8 Interrupt Setup Dialog Interrupt number D11 Request timing One time D 1000 bU Cycle count Interrupt list Number Request timing cycle 11 One time 1000 288 CHAPTER 4 MENUS 4 7 2 3 Debug Environment This section explains the debug environment setup procedure E Debug Environment Setup Procedure Execution MB2141 Figure 4 7 9 Debug Environment Setup Dialog Execution Setup debug environment Interrupt Mask Specifies whether to enable disable interrupt mask during step execution Trace Control Specifies whether to enable disable trace control 289 CHAPTER 4 MENUS Step Execution MB2141 MB2146 09 Figure 4 7 10 Debug Environment Setup Dialog Step Execution Setup debug environment Step Scale Automatic Automatically sets the step unit according to the window display state Source Line Executes the step in units of source lines Instruction Executes the step in units of machine languages Interrupt Mask Specifies whether to enable disable interrupts
258. t dialog box is applicable to two or more projects The applicable project configuration can be limited For example the settings of project configurations A and B can be changed The same setting can be also specified for all project configurations Settings must be made for each project To make settings for a project select a project configuration in the Setting Target dialog box and specify the project in the tree view that appears After selecting the project select the tab for the tool you want to set up When the compiler assembler and linker librarian are selected the category can be selected in the top tab of the setting dialog for each tool After the drop down list is opened select a category When a category was selected the contents in the display are changed and the options included in each category can be set In most cases compiler and assembler options need not be set except when output of list file and make or build is executed under specific conditions Set only linker options For how to set linker options see Section 2 9 Setting Linker Options B Click the OK Button to Complete Tool Setting Note When setting all necessary tool options is completed click the OK button All the set options are registered in the project they become valid when make or build is executed Clicking the Cancel button cancels all the set options When the Update button is clicked during tool option setting the previously
259. t then click to the left of the item 3 When not setting other items click the OK button When selecting a color set all the related items then click the OK button 64 CHAPTER 3 Windows E Customization Procedure Display Color Selection 1 Click the right button of the mouse in the edit window to display the short cut menu then select Customize from the menu The standard editor dialog shown in Figure 3 6 2 opens 2 Click the color button of Bookmark Error C or Assembly From View2 tab you can set a Comment Ret Tab User Keyword and Zenkaku Spc The color dialog opens 3 Select a color from the dialog then click the OK button The color of the button changes to the selected color 4 When not setting other items click the OK button When selecting a font set all the related items then click the OK button E Customization Procedure Font Selection 1 Click the right button of the mouse in the edit window to display the short cut menu then select Customize from the menu The standard editor dialog shown in Figure 3 6 2 opens 2 Click the Font button The font selection dialog opens 3 Select a font and size then click the OK button 4 When not setting other items click the OK button When specifying a tab count set all the related items then click the OK button E Customization Procedure Keyword Addition 1 Click the right button of the mouse in the edit wind
260. t Reset Format void SSDI_Reset_Event void Argument None Return value None Explanation Posts a reset of the debugger by a command or the issue of a reset Initializes resources Remarks Sets all the interrupt states OFF 380 APPENDIX F External I F for Simulator F 6 SSDI Read Event Post Read Format int SSDI_Read_Event READ EVENT Finfo Argument typedef struct unsigned long addr Access address int size Access size 1 Byte 2 Word 4 LONG unsigned long total cycle Total cycle count unsignedlong inst cycle Count of cycles from beginning of instruction unsigned long data Read data unsigned long cycle Count of cycles taken for access ORDER_TYPE type Instruction type notification READ_EVENT typedef enum ORDER_NORMAL Other than read modify instructions ORDER_RMW Read modify instruction ORDER_TYPE Return value 0 Read data enabled 0 Read data disabled Explanation Posts the occurrence of a read access event by instruction execution When read data is enabled the ISS operates assuming read data info data as read data When read data reflected in ISS memory data must be written by using SSDI Write Memory When read data is disabled data is read from ISS memory Set the count of cycles taken for read access as the count of cycles taken for access info cycle If this access cause an error use SSDI Request Abort to
261. t STUB function refer to Section 2 1 7 STUB Function in SOFTUNE Workbench User s Manual 264 CHAPTER 4 MENUS 4 6 5 Event This section explains how to set SOFTUNE Workbench events E Setting Events Events can be set from the event dialog shown in Figure 4 6 9 This function can be used only in the emulator MB2141 MB2141 event mode Normal Figure 4 6 9 Event Dialog Event BN GEE Event Number Specifies an event number 1 to 8 Address Specifies the address at which the event occurrence condition is to be set Address Mask Specifies address mask Only the addresses whose bits are are to be compared 265 CHAPTER 4 MENUS Data Specifies the data to be set as the event occurrence condition Data Mask Specifies data mask Only the data items whose bits are are to be compared Access Attribute Specifies a data access attribute Code Read Write Read Code Read Write Modify External Probe Data Specifies the external probe data value to be set as the event occurrence condition External Probe Data Mask Specifies external probe data mask Only the data items whose bits are 1 are to be compared Not specified for data Specifies the condition when the data values do not match Event List Displays the current event setting state 266 CHAPTER 4 MENUS 4 6 6 Sequence Sequence displays the Sequence Window il Sequence The window that displays the seque
262. t built into SOFTUNE Workbench because it is an option Installing this option however enables cooperative operation on SOFTUNE Workbench SOFTUNE Workbench manages all processing from programming to debugging in units of projects Projects contain all program files options of tools e g C compiler and debugger environment setup etc CHAPTER 1 OUTLINE OF SOFTUNE Workbench 1 3 Procedure for Developing Programs with SOFTUNE Workbench The procedure for developing programs with SOFTUNE Workbench consists of the followings 1 2 3 4 Setting SOFTUNE Workbench operating conditions Creating a project Creating a program source and executing make build Executing the debugger E Setting SOFTUNE Workbench Operating Conditions When developing a program with SOFTUNE Workbench first open the development environment setup dialog from the Setup Development menu and set environment variables and projects For details about how to set environment variables and projects see Section 4 7 1 Development The environment variables set from this dialog are referenced by language tools such as the C compiler E Creating a Project Set information for the program to be developed in a project When developing a new project open the new creation dialog from the File New menu and select Workspace Project File from the dialog The new project creation dialog opens When the project has already existed the existing pro
263. t button of the mouse in the disassemble window to display the short cut menu 2 Check Display coverage A check mark attached to the left side of Display coverage indicates that display coverage has already been turned on If a check mark is not attached to the left side of Display coverage display coverage is turned off 3 Select Display coverage Display coverage is turned off and the check mark is disappeared when it has already been turned on Display coverage is turned on and a check mark is attached when it has been turned off CHAPTER 3 Windows Break Point Set Reset After moving cursor to the instruction where you want to set or to cancel a break point click the right button to display short cut menu Then please select Break Point Set Reset Break Point Enable Disable After moving cursor to the instruction where break point is set to be enable or disable click right button to display the short cut menu Then please select Break Point Enable Disable This enables to switch the break point which is pointed by cursor enable or disable Activate when stop Specify whether the disassemble window should set to active or not when the program is stopped However if a disassemble window is displayed as new it should always be activated Perform this operation in the following procedure 1 Click the right button of the mouse in the disassemble window to display short cut menu 2 Please make sur
264. t currently being selected All Delete button This button is used to delete the setting of all the break points in the break list Jump button Moves a starting position for displaying the source window to the code position at the break point selected from the break list E Data Break Point Such a break point as stop the program when data at the set address is accessed is called the data break point E Setting of Data Break Point Emulator debugger Figure 4 6 3 Break Dialog Data enable 258 CHAPTER 4 MENUS Simulator debugger Figure 4 6 4 Break Dialog Data Code Data Extend Break address H 0OFS Pass count Break point list Status Address Attribute Pass count EXE DOFS read write 1 0 2 4 b Enable Disable Delete All delete Jump Close Break point address In this field the address that sets a break point is specified Pass count In this field the count of times access with the specified attribute is to be made to that point a particular point before causing a break is set This field is only enabled for the simulator debugger Attribute In this field read access write access or both is specified Break point list A list of data break points currently being set is displayed Status Enable or disable is displayed Address The set address is displayed Attribute The attribute of the break poi
265. t detect the change and thus cannot readjust the communication speed This may disable further communication and operation from the debugger There is no problem with changing the settings of the PLLC and SYCC registers within the application program Prohibited Do not set a break point within the monitor program Even if a break point is set the monitor program does not break normally due to its principles of operation In addition it cannot guarantee its subsequent behavior Prohibited Do not single step through AP FGM WDTON Doing so causes the watchdog timer to get started before the monitor program is set up involving the risk of generating a reset by the watchdog timer 370 APPENDIX E Installing Monitor Debugger Restrictions Restricted The initial value of the SP register is changed Originally the SP register is initialized to 0x0000 immediately after a reset Since the monitor program uses the stack area however the application program is started with the register containing a value other than 0x0000 Be sure to re set the value within the application program irrespective of the set value Restricted The time of starting after a reset is cleared is changed Even when auto booting has been selected the application program is started after the monitor program initialization routine and auto boot checker are executed Pay attention to the timing after a reset is cleared which is important to the ap
266. t file format S3 record 32 bit address S3 Outputs data in an S3 record in an allowable output range of 0x00000000 to OxFFFFFFFF Adjust adjust Automatically calls the Format Adjuster to adjust a data output format 235 CHAPTER 4 MENUS 236 Output range ran Specifies the range to be adjusted by an address when selecting the option adjust for adjusting an output file Selecting Auto will obtain the starting ending address for adjustment from the absolute format load module to set automatically Padding data p When selecting the option adjust for adjusting an output file the area of the file where no data exists is packed with data having a specified value Options for 32 bit Intel HEX format f2hs Output file format None Outputs data in mixed HEX8 HEX16 and HEX32 according to the data address Output file format HEX8 16 bit address I16 Outputs data in HEX8 format in an allowable output range of 0x0000 to OxFFFF Output file format HEX16 20 bit address I20 Outputs data in HEX16 format in an allowable output range of 0x00000 to OXFFFFF Output file format HEX32 32 bit address I32 Outputs data in HEX32 format in an allowable output range of 0x00000000 to OXFFFFFFFF Adjust adjust Automatically calls the Format Adjuster to adjust a data output format Start address record output entry Outputs the starting address record The starting address record will be used
267. t in cycle mode Emulator MB2141 Displays trace result in source mode See Section 4 4 8 Trace See Section 4 4 8 Trace See Section 4 4 8 Trace Clears display mode trace buffer Closes Trace Window 1 Click the right button of the mouse to display the short cut menu 2 Select Instruction Cycle or Source from the short cut menu The trace result is displayed in the selected mode and a check mark is displayed to the left of the selected submenu 86 CHAPTER 3 Windows 3 15 Command Window This window is displayed only when SOFTUNE Workbench is in the debug session The Command Window displays the execution result of the directly entered debugger command E Command Window Figure 3 15 1 shows an example of the Command Window Figure 3 15 1 Example of Command Window ES Command Bl x address 0 1 2 3 4 5 6 7 8 9 A B 0000 00 FF 00 FF 00 FF FF FF 1F FF EC FF Dolo FF FF 40 FF 18 10 00 FF EO 00 00 FF The execution result of the entered command 1s displayed The entered command is dump D 1f executed Enter a debugger command from here E Short Cut Menu Command Input Field Undo Cancels the immediately preceding editing Cut Moves the selected character string to the clipboard Copy Copies the selected character string to the clipboard Paste Pastes the character string in the clipboard Delete Deletes
268. t of setting General MCU C Compiler Assembler Linker Librari_4 gt vgeswees z Category DeineMaco Isommon ap Macro Name TEN Value fio Macro Name List Set Delete MTEN 10 Cancel Apply If there are two or more items to be set the macro name found in some item is grayed 1 Select the Define Macro category The macro name setup dialog shown in Figure 4 5 22 opens 2 Specify a Macro Name 3 Specify a Value as required 4 Click the Set button The specified macro name is set as a define D option 5 To set the specified macro name as an undefine U option reset the check mark of the macro name in Macro Name List Note When undefine is set both the define and undefine options are output for the same macro name This causes no problem because the undefine option precedes the define option 218 CHAPTER 4 MENUS E Resetting a Macro Name 1 Select the Define Macro category The macro name setup dialog shown in Figure 4 5 22 opens 2 Select the macro name you want to reset from Macro Name List 3 Click the Delete button E Setting an Include Path Figure 4 5 23 Include Path Setup Dialog Setup Project LX General MCU C Compiler Assembler Linker Librari Category Include Path Somma ap Include Path 4pRuPATH 4 Include Path List ad Delete Up Wi 1 Nnclude Target of setting MBB9WE25
269. t the type of file last created in the project Project Type Table 2 4 1 indicates the selectable project types and their explanation Select the chip type and target MCU Selectable values are indicated in the drop down list Select the chip and target MCU from the list Enter the project name Enter the project name This name can be used as a project file name At default it is also used as a target file name and project directory the target file name and project directory can be changed Set project dependence When defining a project as a subproject in another project place a checkmark in the Dependence checkbox and select the project name from the list in the Dependence checkbox Click the OK button Debug Debug ABS Debug OBJ Debug LST or Debug OPT directory is created as a sub directory in the project directory Debug A directory to store information for each project configuration The default configuration name as a new project is created is Debug ABS Directory in which the target file is stored OBJ Directory in which the object file is stored LST Directory in which the list file is stored OPT Directory in which the option file is stored When REALOS is selected as the project type the Setup Wizard of the configurator opens For details CHAPTER 2 OPERATION refer to the manual accompanying SOFTUNE REALOS Table 2 4 1 List of Project Types Project type Explanation Absol
270. terface 351 APPENDIX APPENDIX C Setting LAN Interface To enable LAN communication the LAN interface must be set at the PC and emulator sides Consult the LAN administrator when setting the IP address and a port address etc E Setting LAN Interface at PC Side 1 Install the TCP IP protocol in network setting dialog on WindowsXP Windows2000 Install the TCP IP protocol Click Control Panel Network and Dial up Connections Local Area Connection Property to set in WindowsXP and Windows2000 Add the IP address assigned to the emulator to the HOSTS file Add the following items IP address Host name For WindowsXP Windows2000 the IP address and host name are in SYSTEM32 DRIVERS ETC Users with administration authority must set the address and name Register the emulator port address and service name in the SERVICES file At the default 5001 is the support address and fjicesv is the service name Register the following items fjicesv 5001 tcp For WindowsXP Windows2000 the port address and service name exist in SYSTEM32 DRIVERS ETC Users who possess an administrator authority must set these address and name E Setting LAN Interface at Emulator Side In case of MB2141 emulator this procedure is following 1 2 oN QN tA RA 9 Connect the emulator to the PC with the RS 232C interface Turn on the emulator Execute the LAN Address menu from SOFTUNE V3 F MC 8L Family S
271. the C language To distinguish a global symbol from others write it as symbol name Table 2 1 1 shows symbol description Table 2 1 1 Symbol Description Description Contents Symbol Local symbol in function static symbol in module global symbol Symbol Local symbol in the specified function in the current module function symbol Static symbol in the specified module or global symbol defined in the specified module Module symbol Local symbol in the specified function in the specified module Module function symbol Symbol in class Valid for static Symbol in class function B Line Number The line numbers to be generated by the C compiler or assembler can be used to reference addresses For the C language a line number indicates the starting address when one line is compiled source file name line number When referencing an address with a line number prefix to the line number A line number can be specified only in a decimal number Specify the line number in the following format If the extension of the source file name is c line number specification can be omitted If the source file name is not alphanumeric characters enclose the line number in double quotes CHAPTER 2 OPERATION E Character Constant A character constant is the character value enclosed in a single quote it cannot include a single quote and V Instead of these characters single quote and back slash escape characters ca
272. the absolute format load module of linker output to an S format Data at addresses 0 to OXFFFFFFFF is converted 32 bit Intel HEX format f2hs Converts the absolute format load module of linker output to an HEX format Data at addresses 0 to OxFFFFFFFF is converted Intel HEX format f2is Converts the absolute format load module of linker output to an HEX8 format Data at addresses 0 to OxFFFF is converted This format is left to maintain compatibility with the previous version The 32 bit Intel HEX format f2hs should be used for conversion to an HEX8 format Intel Extend HEX format f2es Converts the absolute format load module of linker output to an HEX16 format Data at addresses 0 to OxFFFFF is converted This format is left to maintain compatibility with the previous version The 32 bit Intel HEX format f2hs should be used for conversion to an HEX16 format 4 Set the following items as required Common Options Outputs start message V Control of default option file Xdof Options for Motorola S format f2ms Output file format None Outputs data in mixed S1 S2 and S3 records according to the data address Output file format S1 record 16 bit address S1 Outputs data in an S1 record in an allowable output range of 0x0000 to OxFFFF Output file format S2 record 24 bit address S2 Outputs data in an S2 record in an allowable output range of 0x000000 to OxFFFFFF Outpu
273. tor setup dialog shown in Figure 4 7 30 opens Select the title of the editor to be changed from the editor list The values set in Title Execute Filename Option and Executing Directory are displayed Change Execute Filename Option and Executing Directory When Title is changed the set editor is registered as another editor Click the Set button The dialog asking you whether to change the editor opens Click the Yes button E Setting the Editor to be Used B Example 316 1 2 Register the external editor to be used according to the editor registration procedure Click the V button to the right of the Available Editor field The drop down list showing registered editor titles is displayed Select the editor title to be used from the drop down list Example of Fujitsu Power EDITOR setup Title Power EDITOR Execution Filename cMPoweredNpowered exe Option f g l Executing Directory Px Entering the above and clicking the Set button register Fujitsu Power EDITOR in the editor list After registering Fujitsu Power EDITOR select Power EDITOR from Available Editor and click the OK button CHAPTER 4 MENUS 4 7 8 Error Error registers error message patterns of various tools to enable error jump E Error Jump Setup Procedure 1 Select Error from the Setup menu The error jump setup dialog shown in Figure 4 7 31 opens 2 Enter a syntax
274. tton of the mouse in the Register Window to display the short cut menu then select Edit from the menu The register edit dialog opens 2 Select a register name 3 Enter the value you want to set 4 Click the OK button CHAPTER 3 Windows 3 10 1 Setting Register Display This section explains how to set register display E Setting Register Display Set the registers to be displayed in the Register Window in the following procedure Figure 3 10 2 Display Register Setting Dialog Setup display register x m Register list Append Reset open fne E Adding Registers Add the register you want to display in the following procedure 1 Click the right button of the mouse in the Register Window to display the short cut menu then select Setup from the menu The display setting dialog shown in Figure 3 10 2 opens 2 Select the register you want to display from Register List upper part of display register setting dialog then click the Append button The selected register is set in Current Display Register lower part 3 Set all the registers you want to display by repeating the above operation 4 Click the OK button E Deleting Registers Select the register you want to delete in the following procedure 1 Click the right button of the mouse in the Register Window to display the short cut menu then select Setup from the menu The display setting dialog shown in Figure 3
275. tup The watch setup dialog shown in Figure 4 4 17 opens 3 Input a variable name from the dialog Also select a mode as required 4 Select a watch window number 5 Click the OK button Figure 4 4 17 Watch Setup Dialog Setup watch Ea Variable name may Mode Automatic m Cancel Watch 1 ba di Variable name Specify the name of a variable to be displayed Mode Specify the mode C or assembler language in which a variable is displayed For automatic operation the variable is displayed in the predetermined language mode Automatic C language Assembler Watch Specify the Watch Window Number name E Setting Radix The Radix when a variable value is displayed can be set for each variable using the following procedure 1 Click the right button of the mouse in the line containing the variable of the radix to modify The short cut menu is displayed 2 Move the mouse cursor to Radix The list showing selectable radixes is displayed in the submenu 3 Select the radix to modify from the list 168 CHAPTER 4 MENUS ii Modifying a Variable Value The variable value can be modified using the following procedure 1 Click the right button of the mouse in the line containing the variable to modify The short cut menu is displayed 2 Select Edit from the short cut menu The variable edit dialog shown in Figure 4 4 18 opens 3 Set a variable value then click the OK button Figure 4 4
276. uage Tools In the past language tools e g C compiler assembler and linkage kit were started and used from command lines However SOFTUNE Workbench can use these tools as they area An option setting dialog for each tool opens thereby enabling the easy use of the tools B Debuggers SOFTUNE Workbench has integrated the simulator debugger emulator debugger and monitor debugger into one The optimum debugger can be selected and used as required BB Others Installing an REALOS configurator option enables cooperative operation without complicated setting CHAPTER 1 OUTLINE OF SOFTUNE Workbench 1 2 What is SOFTUNE Workbench This section explains the basic configuration of SOFTUNE Workbench i SOFTUNE Workbench Configuration Figure 1 2 1 shows the basic configuration of SOFTUNE Workbench Figure 1 2 1 Basic Configuration of SOFTUNE Workbench SOFTUNE Workbench Debugger part Manager part Configurator Language tool As shown in Figure 1 2 1 SOFTUNE Workbench consists of three parts body debugger and manager The debugger part contains the simulator debugger emulator debugger and monitor debugger These debuggers can be switched and used as required The manager part enables users to code and make programs without full knowledge of language tool e g C compiler and assembler start and option specification The configurator is no
277. ude file name samplel H sample2h Dependencies category the names of the files in which Samples ependencies are detected are displayed e categor 5 le3h dependenci d d displayed Th gory CN Dependencies cannot be deleted H io mbxxxxxh H io mbxxxxx_AVh File in the Dependencies category Em Debug lt Debug category When opened the setup name stored EM emlsup sup is displayed The category cannot be deleted amp n Setup name subprjprj subprjrel subprjpri Debug Subproject name The files stored in the project for making or building are listed B Function Display the workspace name Display all projects stored in workspace Display the subproject The subproject in the project is displayed below the parent project Display of the target file name Display of all the source file names registered in the project When source file name is double clicked the editor opens to enable the editing of the source file Display of the include files that are in dependency When an include file name is double clicked the editor opens to enable the editing of the include file 43 CHAPTER 3 Windows Displaying Debugger setup name When the Debugger setup name is double clicked debugging is started based on the setup information Drug and drop The member in the SRC tab can be moved and stored from the explorer B SRC Tab Bitmap Image List Workspace file name Target file name Sub
278. uence Set Latch See Section 4 6 6 Sequence Display Latch See Section 4 6 6 Sequence Event See Section 4 6 5 Event Close Closes the Sequence Window 99 CHAPTER 3 Windows 100 CHAPTER 4 MENUS This chapter explains the SOFTUNE Workbench menu configuration and the dialogs to be started from each menu 4 1 Menu Configuration Tree 4 2 File Menu 4 3 Edit Menu 4 4 View Menu 4 5 Project 4 6 Debug 4 7 Setup 4 8 Window 4 9 Help 101 CHAPTER 4 MENUS 4 1 Menu Configuration Tree This section explains the SOFTUNE Workbench menu configuration Bi Menu Configuration The following menus are displayed in the SOFTUNE Workbench Main Window File Edit View Project Debug Setup The following functions are assigned to each menu item File New Open Close Open Workspace Close Workspace Save Save As Save All Print Recent Text File Recent Workspace File Exit Edit Undo Redo Cut Copy Paste Delete All Select Find Replace Find in files Jump Bookmark Previous Error Next Error Top of Error 102 Window Help CHAPTER 4 MENUS Bottom of Error Property View Project Output Symbol Assembly Register Memory Local Watch Trace Coverage Performance Command Object Tool Bar Status Bar Bookmark Fonts Project Active Project Add Project Add Member Setup Workspace Setup Project Setting
279. uence break points Setting of Sequence Break Points Emulator MB2146 09 Figure 4 6 5 Break Dialog Sequence Code Data Sequence LEVEL1 LEVEL2 Set roo roro rm Break list Status Address Level enable 0110 Levell fune enable 0130 Level2 sample c 18 2j Enable Disable Delete All delete Eme Disable osse _ adele LEVEL In this field the address that sets a break point is specified 260 CHAPTER 4 MENUS Break list A list of sequence break points currently being set is displayed State Enable or disable is displayed Address The set address is displayed LEVEL The order of address to be the break point condition is displayed Symbol The symbol given to that address is displayed Set button These buttons are used to set a break point at the specified address When an address that has been already set in the break list is specified the set data of the break point at this address is changed Enable button This button is used to enable the break points in the break list currently being selected Disable button This button is used to disable the break points in the break list currently being selected The break points are simply disabled that is the setting itself of the break points is not canceled Delete button This button is used to delete the setting of the break points in the break list currently being selected All Delete button
280. unction name static in D thip the module is displayed Start m STD LIB divl E Short Cut Menu Jump Opens the Source Window of the specified function Watch Sets specified symbol as watch point Break See Section 4 6 4 Break Point Property Displays symbol properties Mangle name Specify whether to display a symbol name as a mangled name Refresh The latest symbol information is displayed Close Closes Symbol Window Jump 1 Click the right button of the mouse on the function name to display the short cut menu then select Jump from the menu The source window in which the function is defined opens 73 CHAPTER 3 Windows 74 Watch 1 Click the right button of the mouse on the variable or function name to display the short cut menu then select Watch from the menu The variable or function is added to the watch and the Watch Window is displayed Property 1 Click the right button of the mouse to display the short cut menu then select Property from the menu File information is displayed see Section 4 3 9 Property Mangle name 1 Click the right button of the mouse to display the short cut menu and select Mangled name Switch between display and non display of a symbol name as a mangled name Refresh 1 Click the right button of the mouse to display the short cut menu and select Refresh The latest symbol information is displayed CHAPTER 3 Windows 3 9 Disassemble Window This window
281. up name and click the OK button When the setup name is entered the setup wizard is started For details about the setup wizard See Section 4 7 2 4 Setup Wizard 49 CHAPTER 3 Windows Reference When selected the Create New Setup dialog Figure 3 4 12 is opened Enter the setup name and click the OK button When the setup name is entered the Select File dialog is opened Select the file and click Open button Information is read from the specified file Figure 3 4 12 Create New Setup Dialog Create New setup Setup Name OK Cancel Property Information on folders is displayed see Section 4 3 9 Property E Short Cut Menus Click the Right Button of the Mouse on a Source File Name 50 Figure 3 4 13 shows a short cut menu Figure 3 4 13 Short Cut Menu on a Source File Name Open Compile samplel c Set gt Delete Property Open List File gt Open Assemble File Open When SOFTUNE Workbench is in the debug session the specified source file is displayed in the Source Window When SOFTUNE Workbench is not in the debug session the specified source file is displayed in the edit window Compile Assemble The specified source file is automatically judged whether it is the C or assembler source and then compiled or assembled Set When selected the following two submenus are displayed Individual Setting A project is set See Section 4 5 5 Setup Projec
282. use to display the short cut menu 2 Select Start from the short cut menu The file dialog for selecting a logging file opens 3 Specify a logging file name then click the Save button State 1 Click the right button of the mouse to display the short cut menu 2 Select State from the short cut menu The logging state display dialog shown in Figure 3 15 5 opens 3 If necessary change the state and output message control 4 Click the OK button Exit 1 Click the right button of the mouse to display the short cut menu 2 Select Exit from the short cut menu Figure 3 15 5 Logging State Display Dialog Setup output x Logging name E Softune sample 896 Project log log Status ex C Disable Control output message Display C Undisplay 3 16 Object Window CHAPTER 3 Windows This window is displayed only when SOFTUNE Workbench is in the debug session The Object Window displays the object information used by REALOS E Object Window The Object Window displays the object information used by REALOS Figure 3 16 1 shows an example of the Object Window Display status Figure 3 16 1 Example of Object Window SR PSI x An object is selected Task ID WAIT cwai fla wobiid 0007 WAIT wai tsk READY DORMANT DORMANT DORMANT DORMANT DORMANT E Object State Display Object Status display Task Information for the selected
283. ute format ABS An ordinary program file is created Relative format REL A relative format file is created Library file A library file is created REALOS ABS A program that uses a real time operating system is created Bi Storing Existing Projects in Workspace 1 Open workspace to store a project Open workspace to store a project 2 Select Project Add Project Project 3 Select the project to be stored Select the project to be stored in the Add Project dialog 4 Set project dependence When defining a project as a subproject in another project place a checkmark in the Dependence checkbox and select the project name from the list in the Dependence checkbox 5 Click the Open button E Setting Active Project The active project is a project that undergoes Make Build Compile Assemble Start Debug and Include Dependence in the menu Make Build Compile Assemble and Include Dependence affects the subprojects in the active project To set an active project select Project Set Active Project When the submenu is displayed select the name of a project to be made active from the submenu E Deleting Project Stored in Workspace Select the project to be deleted in the SRC tab of project window Select Delete Project in the short cut menu The specified project is deleted from workspace but the project file itself is not deleted If the deleted project is used as the subpro
284. w O Project Window Output Window Symbol Window Assembly Window Register Window Memory Window Local Symbol Window Watch Window Trace Window Command Window XIXI XI XI XI xk xk x Xx oco XI XIX X X X X XI x KI KY x xy X Coverage Window Performance Window Sequence Window XIXI x X XI X XI X x xk xk XIX x XI X Object Window Lines other than the column title can be copied 2 Only the symbol name can be copied 124 CHAPTER 4 MENUS 4 3 3 All Select All Select selects all the character strings displayed in a window E Target This function operates only in the edit and output windows 125 CHAPTER 4 MENUS 4 3 4 Find Replace Find searches the text file displayed in the edit window for any character string Replace replaces the found character string with the specified character string E Target B Find B Replace 126 FIND and REPLACE can be executed only for the text files displayed in the edit window they cannot be executed in the output window and others When the find dialog shown in Figure 4 3 1 opens specify the character string you want to find from this dialog Character string search conditions Table 4 3 2 can also be specified from this dialog The found character string is displayed in reverse video The find dialog is not automatically closed irrespectiv
285. when SOFTUNE Workbench is running Figure 5 1 3 Customize Bar Menu ge SOFTUNE Workbench sample Debug File Edit View Project Debug Setup Window Reaister Memory Local Watch Trace average Beromance Command WBJEct Tool bar Status Bar Tab Font View 335 CHAPTER 5 Add in Module 5 1 3 Registering in the Customize Bar This section describes registering in the customize bar E Registering in Customize Bar You can registers batch files Workbench menus and external tools in the customize bar Register using the Customize Bar Setting Dialog Figure 5 1 4 displayed in View Customize Bar Setting For details on how to register see Sections 5 1 3 1 Registering Batch File 5 1 3 2 Registering Workbench Menu and 5 1 3 3 Registering External Tool Figure 5 1 4 Customize Bar Setting Dialog Customize bar Setting Dialog C Softune Initialize pre RunBreak SetupDbgenv NPTEPAD D s BatchFile C SSoftuneNnitialize prc 336 CHAPTER 5 Add in Module E Items in Dialog File List The settings registered in the customize bar are displayed Number Specify the number to register in the customize bar Numbers from 1 to 10 can be specified Kind Select either Batch File or Menu to register in the customize bar Entry 1 When Batch File is selected in Kind Enter the batch file name to be registered in the customize bar
286. xecuted lines are in brown It is only valid while MB2141 emulator debugger Switches whether to display or not disassemble list Specify whether the window should set to active or not when the program is stopped Closes source window Opens the edit window to modify the current source file See Section 3 6 Edit Window Standard Editor Find Searches the text in the current source file Perform this operation in the following procedure 1 Click the right button of the mouse in the source window to display the short cut menu then select Find from the menu The search dialog shown in Figure 3 7 2 opens Set a search direction Un A N Set the character string you want to search If necessary display a check mark to Match case Click the Find Next button The fond character string is displayed in reverse video 6 To terminate search click the Cancel button 69 CHAPTER 3 Windows Figure 3 7 2 Find Dialog in Source Window i E nm NE Hatch whole word ion Position All girl Ll fe ursan Regular Expressions al C lop A STHUIGUGUS Gotan Jump Specifies the position to display in the source window Perform this operation in the following procedure 1 Click the right button of the mouse in the source window to display the short cut menu then select Jump from the menu See Section 4 3 6 Jump 2 Specify a specification format
287. y is specified to store its file and folder in the project The file dialog box for file selection is displayed Two or more files can be selected at a time The selected files are added to the project and displayed in the Project Window 197 CHAPTER 4 MENUS 4 5 3 1 Add Member File A file is specified and stored in the project E Add Member File The file dialog box for file selection is displayed Two or more files can be selected at a time Figure 4 5 3 Add Member Dialog File Add Member x Lookin YPoiect l e A e MBS9W625 jt sample c e startup asm D LL Files of type Source File C as sm Cancel Mem Type 7 Insertion Folder sample Source Files Mem Type The file to be stored is stored as the type of specified member in the project If Automatic is selected the type of member is determined by the extension Insertion Folder The project in which a file is stored and the folder into which the file is inserted are specified The character string enclosed between and is the project name BB Procedure for Addition For the procedure for addition of a member see Section 2 5 Creating and Registering Source File in Project 198 CHAPTER 4 MENUS 4 5 3 2 Add Member Directory A directory is specified to store its file and folder in the project E Add Member Directory Figure 4 5 4 Add Member Dialog Directory Add Member Directo

Download Pdf Manuals

image

Related Search

Related Contents

Craftsman 316.35085 Operator's Manual  Mercedes-Benz 2011 C300 Sport Sedan Automobile User Manual  Hama 00053454 game console accessory  F Trancheuse UNA 9  Random Orb - Alphametal  MS JP6 USER'S MANUAL  Deli Multisserie - Fri-Jado  GPS ロガー取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file