Home
SK78K0R Ver. 3.02 SK78K0 Ver. 2.20 Stack Estimation Tool UM
Contents
1. MEMO Users Manual U18950EJ1VOUM MEMO 8 User s Manual U18950EJ1VOUM CONTENTS CHAPTER1 OVERVIEW 13 1 1 Functional Outline 13 1 2 Outline of Operation 13 1 3 Operating Environment 14 1 4 Terminology 14 CHAPTER2 INSTALLATION 15 2 1 Installation of SK78KO SK78KOR 15 2 2 Folder Configuration 15 2 3 Uninstallation of SK78KO SK78KOR 16 CHAPTER 3 STARTUP AND TERMINATION 17 3 1 Starting SK78KO SK78KOR 17 3 2 Exiting SK78KO SK78KOR 18 CHAPTER 4 INPUT OUTPUT FILES 19 4 1 Types of Files Handled by SK78KO SK78KOR 19 4 2 Explanation of Files 19 4 2 1 Projectfile prj 19 4 2 2 Assembler source module file asm 19 4 2 3 Stack size specification file txt 20 4 2 4 stk system file psg 23 4 2 5 Output result file txt csv 23 CHAPTER 5 WINDOW REFERENCE 26 5 1 Overview of Windows and Dialog boxes of SK78K0 SK78KOR 5 2 Explanation of Windows Dialog Boxes 27 Main window 28 Adjust Stack Size dialog box 35 Stack Size Unknown Adjusted Function Lists dialog box Open dialog box 40 Save As dialog box 42 About sk78k0 sk78kOr dialog box 44 User s Manual U18950EJ1 VOUM 26 38 CHAPTER 6 MESSAGES 45 6 1 Display Format 45 6 2 ErrorMessages 46 6 3 Warning Messages 47 6 4 Confirmation Messages 53 APPENDIX A QUANTITATIVE LIMITS 54 A 1 Quantitative
2. Since the version of the CC78K0 CC78KO0R is old the stack size cannot be calculated correctly if calling of the run time library or standard library is included 50 User s Manual U18950EJ1VOUM CHAPTER 6 MESSAGES W9434 Assembler source module file for different device path The file path is the one generated by a compiler for another microcontrollers This file cannot be analyzed W9435 Assembler source module file generated by different version of CC78K0 CC78KOR path The Assembler source module file asm path is the one compiled by another version of the CC78K0 CC78KOR This file cannot be analyzed W9440 Illegal project file oath Check the file The project file is invalid Check the file This error is output if a project file opened from the menubar after startup is invalid W9450 Number of lines reached limit 32767 in output The output result exceeds 32 767 lines Change the selection of the functions or change the setting so that only the maximum call chain is output W9451 Number of characters in one line reached limit 5119 in output A line in the output result includes 5 119 or more characters Change the selection of the function or output the file in the text format In the text format file a linefeed is inserted W9460 Too many callee functions The limit is 1024 The number of callee functions exceeds the limit Reduce the number to 1 024 or lower Even if all of the callee
3. This button is dimmed if there are no functions having size information User s Manual U18950EJ1VOUM 33 CHAPTER 5 WINDOW REFERENCE 4 Help menu SK78K0 Help Opens the SK78K0 SK78KOR online help SK78KOR Help Functions in the same manner as the button About sk78kO0 Opens the About sk78k0 sk78kOr dialog box and displays the SK78K0 About sk78k0Or SK78KOR version information Toolbar The toolbar includes the buttons that enable execution of comparatively frequently used menu items by one click Table 5 4 Toolbar Buttons Opens the Save As dialog box and saves the call chain whose stack size is the largest among the selected files in the Output result file txt csv Functions in the same manner as when Save Call Chain with Maximum Stack is selected from the File menu This button is dimmed when no functions are selected Recalculates the stack size and updates the display Functions in the same manner as when Recalculate Stack Size is selected from the View menu Stops the jobs currently running Functions in the same manner as when Stop is selected from the View menu Opens the Adjust Stack Size dialog box and set the stack size of the selected function Functions in the same manner as when Adjust Stack Size is selected from the Option menu This button is dimmed when no functions are selected Opens the SK78K0 SK78KO0R online help Functions in the same m
4. functions are registered only the stack size of the one with the largest stack size is added W9461 Too many characters in specification for one function The limit is 5119 The number of items in size setting information exceeds the limit of the number of characters 5 119 Reduce the number of specifications of callee functions Even if all of the callee functions are registered only the stack size of the one with the largest stack size is added The parameter names and separators are included in 5 119 characters W9462 Illegal value character for additional margin An illegal value is specified as the additional margin Specify a decimal value or a hexadecimal from 0 to 65 535 starting with Ox as the additional margin W9463 Illegal value character for recursion depth An illegal value is specified as the recursion depth Specify a positive decimal value or a positive hexadecimal value starting with Ox W9464 Too big additional margin The limit is 65535 A value greater than 65 535 is specified as the additional margin Specify a value equal to or smaller than 65 535 User s Manual U18950EJ1 VOUM 51 o2 CHAPTER 6 MESSAGES W9465 Total stack size exceeds 65535 in function function name Reduce recursion depth The amount of stack consumed by the function exceeds 65 535 Reduce the value of the recursion depth W9466 Total stack size exceeds 65535 in function function name Reduce stac
5. Bl subi EI subii L subiz E sample cs C subi4 The contents of the listed items are as follows Cr projitest sample sample c Ci projitest sample sample c Ci projitest sample sample c Ci projitestisample sample c Ci projitest sample sample c Ci projitest sample sample c By clicking the column header over the list the listed items are sorted according to the column clicked Table 5 3 Items in List View Area Total Stack Size Additional Margin brackets function type A Recursive function limit refer to Total stack size The function name defined in the C source file is displayed Name order If the name of the C source file that includes the function definition is unknown like functions manually coded in assembly language or library functions the function name from which an underscore _ at the top of the symbol name in the assembler source file is excluded is enclosed with When the function is a static function the function name is preceded with the file name without path and or file name function name One or two of the following symbols is are appended according to the amp Function including an indirect call that uses a function pointer 2 is displayed if the size is unknown and SIZEOVER if the size exceeds the is displayed if the size is unknown and SIZEOVER if the size exceeds the Nothing is displayed if no additional ma
6. Take action by clicking the button in the message dialog box W9412 Too long function name function name in file path line line number The limit is 1022 Do you want to stop reading A too long function name is found in the Stack size specification file txt Keep the number of characters 1 022 or fewer Take action by clicking the button in the message dialog box W9413 Illegal value value after ADD in file path line line number Do you want to stop reading An illegal specification of the additional margin is found in the Stack size specification file txt Following ADD specify a decimal value or a hexadecimal value from 0 to 65 535 starting with Ox as the additional margin For details refer to 4 2 3 Stack size specification file txt Take action by clicking the but ton in the message dialog box W9414 Multiple ADD s for one function in file path line line number Only one is allowed Do you want to stop reading An illegal specification of the additional margin is found in the Stack size specification file txt Only one type of additional margin can be specified for a function For details refer to 4 2 3 Stack size specification file txt Take action by clicking the button in the message dialog box W9415 Jlllegal value va ue after RECTIME in file path line line number Do you want to stop reading An illegal specification of the recursion depth is f
7. appear in this document e NEC Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of NEC Electronics products listed in this document or any other liability arising from the use of such products No license express implied or otherwise is granted under any patents copyrights or other intellectual property rights of NEC Electronics or others e Descriptions of circuits software and other related information in this document are provided for illustrative purposes in semiconductor product operation and application examples The incorporation of these circuits software and information in the design of a customer s equipment shall be done under the full responsibility of the customer NEC Electronics assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits software and information e While NEC Electronics endeavors to enhance the quality reliability and safety of NEC Electronics products customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely To minimize risks of damage to property or injury including death to persons arising from defects in NEC Electronics products customers must incorporate sufficient safety measures in their design such as redundancy fire containment and anti failure features e NEC Electronics products are c
8. but Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics products are classified according to the following three quality grades Standard High Quality and Specific The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application categorized as Specific without the prior written consent of Renesas Electronics Further you may not use any Renesas Electronics product for any application for which it is not intended without the prior written consent of Renesas Electronics Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as Specific or for which the product is not intended where you have failed to obtain the prior written consent of Renesas Electronics The quality grade of each Renesas Electronics product is Standard unless otherwise expressly specified in a Renesas Electronics data sheets or data books etc Standard Computers offic
9. Limits 54 INDEX 55 User s Manual U18950EJ1 VOUM LIST OF FIGURES Figure No Title and Page 1 1 2 1 2 2 3 1 5 1 5 2 5 3 9 5 5 6 5 7 5 8 5 9 5 10 6 1 Estimation Flow When SK78K0 SK78KOR Is Used 13 Folder Configuration When Using SK78KO0 15 Folder Configuration When Using SK78KOR 16 Main Window When Using SK78KO 17 Main Window When Using SK78KO 28 Tree View Area 29 List View Area 30 Message Display Area 31 Sratusbar 34 Adjust Stack Size Dialog Box 35 Stack Size Unknown Adjusted Function Lists Dialog Box 38 Open Dialog Box 40 Save As Dialog Box 42 About sk78k0 sk78kOr Dialog Box When Using SK78KO 44 Message Dialog Box Example When Using SK78K0 45 User s Manual U18950EJ1 VOUM 11 LIST OF TABLES Table No Title and Page 4 1 Parameters of Stack Size Specification File 21 4 2 Parameters of stk System File 24 5 1 Windows and Dialog boxes of SK78K0 SK78KOR 26 5 2 Colors and Meanings of Function Icons 29 5 3 Items in List View Area 30 5 4 Toolbar Buttons 34 6 1 Message Types 45 6 2 Operation Performed by Clicking Buttons on Message Dialog Boxes for W9410 to W9426 47 12 User s Manual U18950EJ1VOUM CHAPTER 1 OVERVIEW 1 1 Functional Outline Stack usage tracers SK78KO or SK78KOR for the 78KO microcontrollers or the 78KOR microcontrollers hereafter referred to as SK7
10. charac ters per line For details on limits for each file refer to A 1 Quantitative Limits W9406 Too many lines in file path The limit is num The number of lines in the file path exceeds the limit num of the number of lines per file For details on lim its for each file refer to A 1 Quantitative Limits W9407 Too long file name path The limit is 255 The file name path is too long A file name containing 255 or more characters cannot be handled Check the file name User s Manual U18950EJ1VOUM 47 CHAPTER 6 MESSAGES W9410 Unknown function name function name in file path line line number Only functions explicitly referred to in the project are allowed Do you want to stop reading A function name function name that is not used in the project is specified in the Stack size specification file txt Only the functions whose definition or direct call is included in the C source file can be specified For details refer to 4 2 3 Stack size specification file txt Take action by clicking the button in the message dialog box W9411 Too long file name file name qualifying static function name in file path line ine number The limit is 255 Do you want to stop reading A too long file name including the definition of a static function which is appended at the top of the name is found in the Stack size specification file txt Keep the length 255 or shorter
11. clicked as shown in Table 6 2 Table 6 2 Operation Performed by Clicking Buttons on Message Dialog Boxes for W9410 to W9426 EE EMEN IENMNEMMSSEMEMBB8WNNENENN Cancels reading Ignores the error line and continues reading from the next line Ignore Ignores the error line and continues reading from the next line No message dialog boxes are displayed for the subsequent warnings W9410 to W9426 but the message is output to the Message display area only W9400 Cannot find file path Check that the file is readable The specified file does not exist Re specify the correct file name W9401 Cannot open file to read path Check that the file is readable Reading of the file path is prohibited Check the attribute of the file and enable reading of the file W9402 Cannot open file to write path Check that both the file and the folder are writable This file path is read only Check the attribute of the file and folder and enable writing to the file W94093 File read error path An error occurred while the file oath was read Check if the reading of the file is enabled W9404 File write error path An error occurred while the file oath was written Check if the writing to the file is enabled W9405 Too many characters in one line in file path line line number The limit is num Line ine number in the file path includes characters that exceed the limit num of the number of
12. functions already set Terminates the SK78K0 SK78KOR User s Manual U18950EJ1 VOUM CHAPTER 5 WINDOW REFERENCE 2 View menu Recalculate Stack Size Recalculates the stack size and updates the display Functions in the same manner as the button Stop Stops the jobs currently running Functions in the same manner as the button Sorts the list view area according to the sort type selected from the following submenus This menu is dimmed if there are no relevant functions 3 Option menu Stack Size Unknown Adjusted Function Lists Opens the Stack Size Unknown Adjusted Function Lists dialog box and displays a list of functions whose stack size is unknown or functions that are already set This menu is dimmed if there are no relevant functions Adjust Stack Size Opens the Adjust Stack Size dialog box and sets the size setting information of the selected function Functions in the same manner as the button This button is dimmed when no functions are selected Reset Function Resets the settings of the selected function to the initial value and deletes information saved in the stk system file PSQ This button is dimmed if there is no size information set for the specified function Reset All Functions Resets the settings of all functions to the initial value and deletes information saved in the stk system file psg the standard library is re set in the stk system file psg
13. granted hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information When exporting the products or technology described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations You should not use Renesas Electronics products or the technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations Renesas Electronics has used reasonable care in preparing the information included in this document
14. is not opened In braces the actual character string is displayed E9300 Cannot find project file path The specified project file is not found Check that the file actually exists E9301 Project file read error path An error has occurred while the project file was read Reading of the project file may be prohibited E9302 Illegal format in project file path Check the file The format of the project file is illegal This error is output when an illegal format is found in the project file Mod ify the relevant code or recreate the project E9303 Failed to invoke file path Startup of the SK78K0 SK78KO0R failed This error is output when the execution has failed to start the SK78K0 SK78KOR Retry startup of the SK78K0O SK78KOR If failure occurs again there is a possibility that the SK78K0 SK78KOR was not installed normally so reinstall the SK78KO SK78KOR User s Manual U18950EJ1VOUM CHAPTER 6 MESSAGES 6 3 Warning Messages The warning messages error numbers and their meanings are explained below The warning messages are displayed in both the Message display area and the message dialog box The actual character string is displayed in braces and the character string enclosed by brackets is displayed only in the message dialog box The following buttons are displayed in the message dialog box for W9410 to W9426 and the action taken by the SK78K0 SK78KOR varies depending on the button
15. size if it has not been reflected correctly W9430 Cannot find CC78K0 CC78KO0R generated assembler source module file Select PM s menu Tool Com piler Options and check both Create Assembler Source Module File in Output tab and Output Debug ging Information in Debug tab and then rebuild The Assembler source module file asm is not found Register the C source file in PM select Tool gt Compiler Options from the menubar and select the Create Assembler Source Module File check box on the Output tab and the Output Debugging Information check box on the Debug tab and then rebuild the assem bler source module file W9431 Cannot find CC78K0 CC78KOR generated assembler source module file path Check Compiler Options specified for the corresponding C source file and rebuild The Assembler source module file asm is not found Check that the Create Assembler Source Module File check box is selected for the corresponding C source file in Compiler Options in PM and then rebuild the assembler source module file W9432 Illegal format in file path line line number Check the file Line line number in the Assembler source module file asm includes an illegal format The assembler source module file may not be the one generated by the CC78K0 CC78KOR Check the file and rebuild it W9433 Cannot accept CC78K0 CC78KOR version generated assembler source module file Use version or later
16. using SK78KOR Select Help menu gt About sk78kOr Figure 5 10 About sk78k0 sk78kOr Dialog Box When Using SK78KO0 About sk 8k0 1 Stack Usage Tracer sk FEKO Miar Der aoe 200x GCopyrighttG NEC Electronics Corporation 200x All rightz reserved This section describes the following items Explanation of each area Function button Explanation of each area 1 Version information area Displays the version of the SK78K0 SK78KO0R as Product name Version Day Month Year Function button Bun Function Closes this dialog box 44 User s Manual U18950EJ1VOUM CHAPTER 6 MESSAGES 6 1 Display Format Messages output by the SK78K0 SK78KOR are displayed in the Message display area and or message dialog box refer to Figure 6 1 The messages are classified into three types refer to Table 6 1 and a letter that identifies the type is appended at the top of the message number Figure 6 1 Message Dialog Box Example When Using SK78K0 v 19503 Do you wank to cancel adjustments to all Ehe Functions Mo Table 6 1 Message Types E Message dialog box only Warning Messages Message display area and message dialog box EN Confirmation Messages User s Manual U18950EJ1 VOUM 45 CHAPTER 6 MESSAGES 6 2 Error Messages 46 The error messages error numbers and their meanings are explained below The error messages are displayed only in the message dialog box so the Main window
17. 0 name total stack size frame size adjustment information 80 0 sub1 720 240 0 sub2 480 200 0 sub3 280 280 0 80 0 sub1 720 240 0 sub2 480 200 0 sub31 160 160 0 80 0 sub11 500 30 20 10 sub11 500 30 20 10 80 0 sub12 amp 400 200 0 sub21 200 200 0 80 0 f c Hsub13 300 250 50 80 0 sub14 50 50 80 0 sub15 2 0 b Example in which the call chain with the maximum stack is output File menu gt Save Call Chain with Maximum Stack Function name total stack size frame size adjustment information main 800 80 0 sub1 720 240 0 sub2 480 200 0 sub3 280 280 0 User s Manual U18950EJ1VOUM 25 CHAPTER 5 WINDOW REFERENCE 5 1 Overview of Windows and Dialog boxes of SK78K0 SK78KOR The windows and dialog boxes used in the SK78K0 SK78KO0R are listed below Table 5 1 Windows and Dialog boxes of SK78K0 SK78KOR Window Dialog Box Name Function Main window A window used for basic manipulation of the SK78K0 SK78KOR Adjust Stack Size dialog box A dialog box used to set additional margin and callee functions Stack Size Unknown Adjusted A dialog box that displays a list of functions whose stack size is not Function Lists dialog box unknown or functions already set Open dialog box A dialog box used to specify a Project file prj or Stack size specification file txt to be read Save As dialog box A dialog box used to spe
18. 8 400 200 sub21 200 200 4 f c sub13 300 250 50 4 sub14 50 50 sub15 b Example in which the call chain with the maximum stack is output File menu Save Call Chain with Maximum Stack ma in 800 80 4 sub1 720 240 sub2 480 200 sub3 280 280 User s Manual U18950EJ1 VOUM 3 CSV format CHAPTER 4 INPUT OUTPUT FILES If the CSV format is selected the same content as that in the Text format is output in the following form where a call chain is composed of function names and function information each element delimited by a comma Unlike the text format however the CSV format outputs a message without starting a new line when the number of characters per line exceeds the limit and outputting of the file is aborted Information of each function is output in the following format Function name auxiliary mark total stack size frame size adjustment information The content of each parameter is the same as that in the text format In the case of the CSV format however 0 is output for the adjustment information of functions to which no adjustment information is specified 0 is output if 0 is specified for the additional margin a Example in which all the call chains are output File menu Save All Call Chains Function main ma in main main main ma in ma in 800 800 800 800 800 800 80
19. 8K0 SK78KO0H is tool for calculating the amount of stack each function may consume during execu tion and displays the result in tree form based on the assembly language file output by the 78KO microcontrollers C compiler CC78KO0 or the 78KOR microcontrollers C compiler CC78KOR hereafter referred to as CC78KO or CC78KO0R The SK78K0 SK78KOR have the following functions and features It works with PM The result of calculating the stack size is displayed in GUI It provides an easy user interface to specify additional stack size information 1 2 Outline of Operation The flow of the operation with the SK78K0 SK78KOR is as follows Figure 1 1 Estimation Flow When SK78K0 SK78KO0R Is Used Stk system file Stack size specifi C source file Assembler source cation file module file User s Manual U18950EJ1 VOUM 13 CHAPTER 1 OVERVIEW 1 3 Operating Environment An environment that satisfies the following requirements is required for using the SK78K0 SK78KO0R 1 Host machine Compatible with the following operating systems OS Windows 2000 Windows XP Home Edition Windows XP Professional Caution It is recommended to install the latest service pack for each OS 2 Related development tools Integrated development environment Project Manager PM 78K0 microcontrollers C compiler CC78KO 78KOR microcontrollers C compiler CC78KOR 1 4 Terminology The terms required to understand the SK78K0 SK78KOR operat
20. ILES Table 4 1 Parameters of Stack Size Specification File Function This parameter specifies the name of a function whose stack size is to be adjusted in the same form as displayed by the SK78K0 SK78KOR or in the form of a symbol name defined in the assembly language source If a name starting with an underscore _ is described the SK78K0 SK78KO0R regards it as a symbol name defined in assembly language searches for a function whose name matches the name from which the underscore is excluded If no functions hit then the SK78KO0 SK78KOR regards the name including the underscore as a function name and searches for a function whose name matches it For example if a description func exists and a function func symbol name is func is found in the file the SK78K0 SK78KO0H regards that func as specifying the func and if not found regards the func as specifying the function func symbol name is func Function names starting with a character other than an underscore are regarded as function names and the SK78K0 SK78KO0R searches for functions whose names match with them If a file name is not specified for a static function the SK78K0 SK78KO0R searches for a global function with the same name and if no functions hit the SK78K0 SK78KOR searches for a local function with the same name If multiple local functions hit the local function found first is regarded as the target of specification ADD size This paramet
21. ITATIVE LIMITS A 1 Quantitative Limits The limits and the range settings are as follows Table A 1 Quantitative Limits i NN A a Cees Number of lines per file Assembler source module file Went Stack size specification file txt Number of files related number of files that can be read at once Lenghofflename Z of file name LL EERNNNMKAAM of characters per line pu 19 including element name and separator Number of functions that can be specified in one line 1 Number of callee functions that can be specified in 1 024 one line one function Number of lines per file 82767 767 Number of functions that can be registered num EE 767 ber of lines Output result file txt csv related Length of file name 55 Length of one line Note Recursion depth A value that does not exceed the limit as a result of multiplying by the stack size Stack size limit 65 535 Message display area Number of characters per line 5 119 Number of lines 32 767 Note In the text format file a line is wrapped at the 5 119th character 54 User s Manual U18950EJ1VOUM A About sk78k0 sk78kO0r dialog box 44 ADD 20 Additional margin 14 Additional margins 35 Adjust Stack Size dialog box 35 Adjustment information 14 23 All call chains 23 Assembler source module file asm 14 19 Auxiliary mark 23 25 C CALL 20 Call chain with max
22. K0 SK78KO0R Should resetting be executed by selecting Reset Function Reset All Functions from the Option menu this setting will be automatically re set by the SK78KO SK78KOR Function whose size settings were adjusted from the default setting are moved to Adjusted Functions Caution For details on the display format function information of each list refer to 4 2 5 2 Text format Function button Buttons Function Closes this dialog box Adjust Size Opens the Adjust Stack Size dialog box This button is dimmed when no functions are selected Displays the help topics for this dialog box User s Manual U18950EJ1VOUM 39 CHAPTER 5 WINDOW REFERENCE Open dialog box This is a dialog box used to specify a Project file prj or Stack size specification file txt to be read Take either of the following actions to open this dialog box Select File menu Open Project Select File menu gt Load Stack Size Specification File Figure 5 8 Open Dialog Box 1 Look in B fokOsample a E s lib size txt 2 File name 3 Files of type Stack Size Specification File t Cancel This section describes the following items Explanation of each area Function button 40 User s Manual U18950EJ1VOUM CHAPTER 5 WINDOW REFERENCE Explanation of each area 1 Look in Select from the drop down list t
23. To our customers Old Company Name in Catalogs and Other Documents On April 1 5 2010 NEC Electronics Corporation merged with Renesas Technology Corporation and Renesas Electronics Corporation took over all the business of both companies Therefore although the old company name remains in this document it is a valid Renesas Electronics document We appreciate your understanding Renesas Electronics website http www renesas com April 1 2010 Renesas Electronics Corporation Issued by Renesas Electronics Corporation http www renesas com Send any inquiries to http www renesas com inquiry 24 NE S AS 8 10 11 12 Notice All information included in this document is current as of the date this document is issued Such information however is subject to change without any prior notice Before purchasing or using any Renesas Electronics products listed herein please confirm the latest product information with a Renesas Electronics sales office Also please pay regular and careful attention to additional and different information to be disclosed by Renesas Electronics such as that disclosed through our website Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is
24. Windows 2 Insert the supply medium into the relevant device equipment CD ROM drive of the host machine the setup program will then automatically run If the setup program does not run automatically start install exe from the CD ROM drive using Explorer Win dows accessory 3 Continue installation of the SK78K0 SK78KO0R following the messages displayed thereafter Whether the SK78K0 SK78KOR has been installed normally can be checked with the Tool menu of PM after installation of the SK78K0 SK78KO0R is completed When installation is completed normally The following two items are displayed in the Tool menu when a project file for the 78K0 or 78KOR microcontrollers is opened in PM When using SK78K0 Startup SK78KO When using SK78KOR Startup SK78KOR 2 2 Folder Configuration The folder structure configured after the SK78K0 SK78KOR installation is as follows Figure 2 1 Folder Configuration When Using SK78K0 Installation folder default C NECTools32 bin a sk78k0 exe SK78KO execution file sk78kOp dll DLL file for PM dat 8k0 I0 IOf lOsm lOr lorsm txt Stack size specification files for compiler s library Document files pdf txt Help file chm User s Manual U18950EJ1 VOUM 15 CHAPTER 2 INSTALLATION Figure 2 2 Folder Configuration When Using SK78KOR Installation folder default C NECTools32 bin sk78kO0r exe SK78KOR executi
25. al U18950EJ1VOUM For further information please contact NEC Electronics Corporation 1758 Shimonumabe Nakahara ku Kawasaki Kanagawa 211 8668 Japan Tel 044 435 51 11 http www necel com America NEC Electronics America Inc 2880 Scott Blvd Santa Clara CA 95050 2554 U S A Tel 408 588 6000 800 366 9782 http www am necel com Europe NEC Electronics Europe GmbH Arcadiastrasse 10 40472 Dusseldorf Germany Tel 0211 65030 http www eu necel com Hanover Office Podbielskistrasse 166 B 30177 Hannover Tel 0 511 33 40 2 0 Munich Office Werner Eckert Strasse 9 81829 Munchen Tel 0 89 92 10 03 0 Stuttgart Office Industriestrasse 3 70565 Stuttgart Tel 0 711 99 01 0 0 United Kingdom Branch Cygnus House Sunrise Parkway Linford Wood Milton Keynes MK14 6NP U K Tel 01908 691 133 Succursale Francaise 9 rue Paul Dautier B P 52 78142 Velizy Villacoublay C dex France Tel 01 3067 5800 Sucursal en Espana Juan Esplandiu 15 28007 Madrid Spain Tel 091 504 2787 Tyskland Filial Taby Centrum Entrance S 7th floor 18322 Taby Sweden Tel 08 638 72 00 Filiale Italiana Via Fabio Filzi 25 A 20124 Milano Italy Tel 02 667541 Branch The Netherlands Steijgerweg 6 5616 HS Eindhoven The Netherlands Tel 040 265 40 10 Asia amp Oceania NEC Electronics China Co Ltd 7th Floor Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100083 P R China T
26. anner as when SK78K0 Help SK78KOR Help is selected from the Help menu Statusbar Explanations of functions of the selected menu items or buttons on the toolbar and the progress bar that indicates the processing status during file input output are displayed Figure 5 5 Sratusbar For Help press F1 The explanation of the selected function is displayed The message For Help press F1 is displayed by default 34 User s Manual U18950EJ1VOUM CHAPTER 5 WINDOW REFERENCE Adjust Stack Size dialog box This is a dialog box used to set additional margins for the selected function and callee functions Take either of the following actions to open this dialog box Select a function in the Tree view area or List view area in the Main window then select the Option menu Adjust Stack Size or Adjust Stack Size in the right click menu Click the Adjust Size button in the Stack Size Unknown Adjusted Function Lists dialog box Figure 5 6 Adjust Stack Size Dialog Box Adjust Stack Size 1 Function Name sublT 2 Frame Size Cancel 3 Additional Margin 4 Recursion Depth Callee Function List For Indirect Call Callee Functions All Functions mul 7 S isdigit iD 2 0 manit 4 2 stab sub 41 2 254 6 subl 12 2 subl2 2 2 This section describes the following items Explanation of each area Function buttons User s Man
27. cify the name and location of an Output result file txt csv or Stack size specification file txt to be saved About sk78k0 sk78kOr dialog box A dialog box that displays the version of the SK78K0 SK78KO0R 26 User s Manual U18950EJ1VOUM CHAPTER 5 WINDOW REFERENCE 5 2 Explanation of Windows Dialog Boxes In this section windows dialog boxes of the SK78KO SK78KOR are explained in the following format Window Dialog box name A name of the window or dialog box is shown in the frame In this part the screens of the window or dialog box functional outline and opening methods are explained Explanation of each area The settings for each area and the displayed items in the window dialog box are explained Menubar The menu items pulled down from the relevant menubar items are listed and their functions are explained Toolbar The functions of buttons on the toolbar are explained Function buttons Operations performed by clicking the buttons in the dialog box are explained User s Manual U18950EJ1VOUM 21 CHAPTER 5 WINDOW REFERENCE The Main window appears first after the SK78K0 SK78KOR starts up It displays the call tree and the stack size for each function Figure 5 1 Main Window When Using SK78K0 Toolbar Menubar s 7Bk sample prj sk78k0 PRISES File dw Option Help B IER stab1 main 414 2 C projitest sample sample c Bii sub E stab1 cm sub Bl subi 412 264 C projitestsamp
28. e as type Test Format Output Result tst Cancel This section describes the following items Explanation of each area Function button 42 User s Manual U18950EJ1VOUM CHAPTER 5 WINDOW REFERENCE Explanation of each area 1 Save in Select from the drop down list the drive or folder in which the file is to be stored The files already stored in the specified location are listed below this area 2 File name Directly input from the keyboard the file name to be saved If a file name in the above field is clicked the selected file name will be displayed here 3 Save as type Select from the drop down list the type extension of file to be saved Select one of the following file types To save Output result file txt csv Text Format Output Result txt Saves the file as the text format file CSV Format Output Result csv Saves the file as the CSV format file To save stack size specification file txt Stack Size Specification File txt Function button Function Save Saves the file with the specified name and format Cancel Closes this dialog box without saving the file User s Manual U18950EJ1VOUM 43 CHAPTER 5 WINDOW REFERENCE About sk78k0 sk78kOr dialog box This is a dialog box that displays the version of the SK78K0 SK78KOR Take the following action to open this dialog box When using SK78K0 Select Help menu gt About sk78k0 When
29. e equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems medical equipment or systems for life support e g artificial life support devices or systems surgical implantations or healthcare intervention e g excision etc and any other applications or purposes that pose a direct threat to human life You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under c
30. e specification file txt Specify a function name after CALL A function not used in the project cannot be specified For details refer to 4 2 3 Stack size specification file txt Take action by clicking the button in the message dialog box W9419 Multiple function names after CALL in file path line line number Place CALL before each functions Do you want to stop reading An illegal specification of callee functions is found in the Stack size specification file txt Only one function can be specified after CALL To specify multiple functions describe CALL by the num ber of functions For details refer to 4 2 3 Stack size specification file txt Take action by clicking the button in the message dialog box W9424 Multiple specifications for one function in file path line line number line line number2 Only one is allowed Do you want to stop reading Specifications for the same function are found on line ine number 1 and line number 2 in the Stack size specification file txt Delete one of them Take action by clicking the button in the message dialog box W9425 Too many characters in one line in file path line line number The limit is 5119 Do you want to stop reading Line line number in the Stack size specification file txt exceeds the limit of the number of characters per line 5 119 Reduce the number of callee functions specified Even if all of the call
31. e stack size was changed or to which a callee function was added B Light green Recursive function or function in the chain of recursion m Yow Undetermined function whose stack size is not unknown Other functions ordinal functions For example if a setting of an undetermined function whose stack size is not unknown yellow recursive func tion green or ordinary function white is changed in the Adjust Stack Size dialog box or in the Stack size specification file txt the icon color is changed to light blue or red if the stack size becomes the largest among the callee functions if the settings are initialized by specifying reset in the Adjust Stack Size dialog box or selecting Reset Function from the Option menu the original icon color is restored Settings cannot be made for individual locations In the example in Figure 5 2 if a setting is made for mul which is called from sub1 1 the setting is reflected in I mul which is called from sub3 By right clicking the mouse in this area the following shortcut menu is displayed Adjust Stack Size Opens the Adjust Stack Size dialog box for the selected function User s Manual U18950EJ1 VOUM 29 30 2 List view area CHAPTER 5 WINDOW REFERENCE This area lists the functions selected in the Tree view area and its callee functions Column header Figure 5 3 List View Area Total Stack Size Additional Margin 2 E main E stabi
32. ee functions are registered only the stack size of the one with the largest stack size is added Take action by clicking the button in the message dialog box User s Manual U18950EJ1VOUM 49 CHAPTER 6 MESSAGES W9426 Illegal format in file path line line number Check the file Do you want to stop reading Line line number in the Stack size specification file txt includes an illegal format Check the file For details refer to 4 2 3 Stack size specification file txt Take action by clicking the button in the message dialog box W9427 Can not find stack size specification file for system library functions path Default values the same as default file name are used The Stack size specification file txt for the standard library is not found Size information held by the SK78K0 SK78KOR same as default file name will be used instead The file may not have been installed normally so reinstall it W9428 Illegal format in stack size specification file for system library functions path line line number The Stack size specification file txt for the standard library includes an illegal format The file may not have been installed normally so reinstall it W9429 Broken stk system file path The file was ignored The stk system file psg is invalid Adjustment of the stack size performed previously and before may not be reflected correctly Check the file and re adjust the stack
33. el 010 8235 1155 http www cn necel com Shanghai Branch Room 2509 2510 Bank of China Tower 200 Yincheng Road Central Pudong New Area Shanghai PR China P C 200120 Tel 021 5888 5400 http www cn necel com Shenzhen Branch Unit 01 39 F Excellence Times Square Building No 4068 Yi Tian Road Futian District Shenzhen P R China P C 518048 Tel 0755 8282 9800 http www cn necel com NEC Electronics Hong Kong Ltd Unit 1601 1613 16 F Tower 2 Grand Century Place 193 Prince Edward Road West Mongkok Kowloon Hong Kong Tel 2886 9318 http www hk necel com NEC Electronics Taiwan Ltd 7F No 363 Fu Shing North Road Taipei Taiwan R O C Tel 02 8175 9600 http www tw necel com NEC Electronics Singapore Pte Ltd 238A Thomson Road 12 08 Novena Square Singapore 307684 Tel 6253 831 1 http www sg necel com NEC Electronics Korea Ltd 11F Samik Lavied or Bldg 720 2 Yeoksam Dong Kangnam ku Seoul 135 080 Korea Tel 02 558 3737 http www kr necel com G0706
34. elp Functian Total Stack Size Frame Size Additional Margin File E stabi Bl nain C projitestisample sample c subi E stabi n sube Bl ubi Cr projtestisamplelsample c HB subs subii C Iprajitesttsample sample c v I sub12 Ci projtestisamplelsample c E sample c Cr projtestisample sample c LJ subst 31 9 subii Lll sub14 CiprojitestisampleYsample c mL subi2 H sample c sub13 J sub14 amp prajsample ssample Bk sample asm Heading L propsample sample Bk sample asm Reading completed CANECT aalz32 dat BELIUr tet Reading CANNECT aolz32 dat BEUIUr tet Reading completed CANNECT anlz32 dat BEI tet Reading CANECT aalz32 dat 8k00 tst Reading completed For Help press F1 Caution If an attempt is made to start the SK78K0 SK78KOR multiple times for the same project the SK78K0 SK78KOR currently running will pop up User s Manual U18950EJ1VOUM 17 CHAPTER 8 STARTUP AND TERMINATION 3 2 Exiting SK78K0 SK78KOR To terminate the SK78K0 SK78KO0H perform the following operation on the Main window When using SK78KO0 Select File menu gt Exit sk78k0 When using SK78KOR Select File menu gt Exit sk78kOr Caution When terminating PM or when the active project of PM has been changed a confirmation message will be displayed and then SK78K0 SK78KOR will be terminated 18 User s Manual U18950EJ1VOUM CHAPTER 4 INPUT OUTPUT FILES 4 1 Types of Files Ha
35. embly language library functions functions that include an indirect function call using a function pointer recursive functions and functions with variable parameters whose stack sizes cannot be obtained accurately 1 Reading a stack size specification file After a stack size specification file is read the stack size is recalculated to reflect the information If some adjust ment information has already been specified it is overwritten by information read from this file Select File menu Load Stack Size Specification File 2 Saving a stack size specification file The specified information and information on undetermined functions function names whose stack sizes are not determined are saved in a file Select File menu Save Stack Size Specification File 3 Format The format of a stack size specification file is composed of the function name and each of the parameter delim ited with a comma Spaces one byte spaces and tabs are not regarded as delimiters Only the spaces immediately before and after a comma are ignored spaces cannot be placed before and after Size adjustment information for one function can be specified on one line A line starting with is regarded as a comment line and blank lines are ignored If just a function name is specified adjustment is not applied Function ADD size RECTIME time CALL func User s Manual U18950EJ1VOUM CHAPTER 4 INPUT OUTPUT F
36. er specifies the Additional margin value forcibly added to the stack size Specifies a decimal value or hexadecimal value that starts with Ox from 0 to 65 535 This value is equivalent to the one specified in Additional Margin in the Adjust Stack Size dialog box RECTIME time This parameter specifies Recursion depth value by which the stack size is multiplied Specifies a decimal value or hexadecimal value that starts with Ox which is larger than 1 and the stack size does not overflow This parameter can be specified only for recursive functions This value is equivalent to the one specified in Recursion Depth in the Adjust Stack Size dialog box dialog box CALL func This parameter specifies a callee function name of callee function to be added Specifies the function name in the same form as that for which the stack size is adjusted Up to 1 024 functions can be specified but only the function whose stack size is largest among the callee functions can be used for stack size adjustment This specification is equivalent to functions added to Callee Functions in the Adjust Stack Size dialog box dialog box The following are examples of a stack size specification file and outputs before and after reading a stack size specification file User s Manual U18950EJ1VOUM 21 CHAPTER 4 INPUT OUTPUT FILES a Example of a stack size specification file sample txt Specify 50 as the
37. ertain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or damage caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or system manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electro
38. he drive or folder in which the file to be read exists The files stored in the specified location are listed below this area 2 File name Directly input from the keyboard the file name to be specified If a file name in the above field is clicked the selected file name is displayed here 3 Files of type Select from the drop down list the type extension of file to be specified The following file type is displayed by default When this dialog box was opened by selecting the File menu Open Project Project File prj When this dialog box was opened by selecting the File menu Load Stack Size Specification File Stack Size Specification File txt Function button Bue Function Open Loads information from the specified file Closes this dialog box without reading the file User s Manual U18950EJ1VOUM 41 CHAPTER 5 WINDOW REFERENCE Save As dialog box This is a dialog box used to specify the name and location of an Output result file txt csv or Stack size specification file txt to be saved Take one of the following actions to open this dialog box Select File menu Save Call Chain with Maximum Stack Select File menu gt Save All Call Chains Select File menu Save Stack Size Specification File Figure 5 9 Save As Dialog Box 2 File name 3 we Sav
39. ication Note 1 NEC Electronics as used in this statement means NEC Electronics Corporation and also includes its majority owned subsidiaries 2 NEC Electronics products means any product developed or manufactured by or for NEC Electronics as defined above M8E 02 11 1 User s Manual U18950EJ1VOUM MEMO Users Manual U18950EJ1VOUM Readers Purpose Organization Related Documents INTRODUCTION This manual is intended for users who use 78KOR Series or 78KO Series C Compiler and develop its application systems This manual describes a tool that calculates the stack usage amount using the assembly language source output by the 78KOR Series or 78KO Series C compiler and displays the analysis result in the tree format This manual consists of the following chapters e OVERVIEW e INSTALLATION e STARTUP AND TERMINATION e INPUT OUTPUT FILES e WINDOW REFERENCE e MESSAGES The table below shows the documents such as users manuals related to this manual The related documents indicated in this publication may include preliminary versions However preliminary versions are not marked as such Documents related to development tools user s manuals N Conpler inane on RA78KO Ver 3 80 Assembler Package U17199E Structured assembly language U17197E RA78KOR Ver 1 20 Assembler Package U18547E PM plus Ver 5 20 U16934E PM Ver 6 30 Project Manager U18416E User s Manual U18950EJ1VOUM
40. imum stack 23 Callee functions 35 CC78KO 13 CC78KOR 13 Confirmation messages 53 CSV format 25 E Error Messages 46 Exiting 18 F Folder Configuration 15 Function with an indirect call 30 G Global function 21 H Host machine 14 Icons 29 Inputfiles 19 Installation 15 L List view area 30 Local function 21 INDEX M Main window 28 Menubar 32 Statusbar 34 Toolbar 34 Message display area 31 Messages 45 Confirmation Messages 53 Error Messages 46 Warning Messages 47 O Open dialog box 40 Operating Environment 14 Output files 19 Output result file txt csv 23 P PM 13 14 Project file prj 19 Q Quantitative limits 54 R RECTIME 20 Recursion depth 14 Recursive function 30 Right clicking the mouse 29 31 S Save As dialog box 42 Size setting information 14 SIZEOVER 24 30 36 Stack size specification file txt 20 Stack Size Unknown Adjusted Function Lists dialog box 38 Standard library functions 39 Starting 17 Static function 21 stk system file psg 23 User s Manual U18950EJ1VOUM 55 INDEX T Terminology 14 Text format 23 Total stack size 14 Tree view area 29 U Uninstallation 16 V Version information 34 W Warning messages 47 56 User s Manu
41. ions are explained below Assembler source module file asm A source file coded in the assembly language which is output by the CC78K0 CC78KOR based on a C source file Assembler source files coded manually are not included refer to 4 2 2 Assembler source module file asm Total stack size The maximum stack size of a function that includes the stack size of its callee functions and is calculated by the following formula if the function is recursive the value is multiplied by its recursion depth Total stack size frame size maximum stack size among those of callee functions additional margin Frame size The stack size of a function itself which does not include the stack size of callee functions Additional margin A size forcibly added to a stack size Recursion depth A predicted maximum number of times that a recursive function is executed in the recursive call chain A recursive call is an operation that a function calls itself directly or indirectly via another function Adjustment information Additional margin and recursion depth for recursive function Size setting information Information additional margin recursion depth and callee functions used to adjust the values calculated as the stack size 14 User s Manual U18950EJ1VOUM CHAPTER 2 INSTALLATION 2 1 Installation of SK78K0 SK78K0R The following describes the procedure for installing the SK78KO SK78KOR 1 Start
42. k size in the maximum call chain The amount of stack consumed by the function exceeds 65 535 Reduce the stack size of functions in the call chain with maximum stack User s Manual U18950EJ1 VOUM CHAPTER 6 MESSAGES 6 4 Confirmation Messages The confirmation messages error numbers and their meanings are explained below The confirmation messages are displayed in both the Message display area and message dialog box The actual character string is displayed in braces The operation varies in the SK78K0 SK78KO0R depending on the button selected in the message dialog box 19500 Exit Sk78k0 sk78kOr The SK78K0 SK78KO0R will be terminated To terminate the SK78K0 SK78KO0R click the OK button 19501 Do you want to overwrite it The existing file will be saved as a new file To continue the action click the Yes button To cancel the action click the No button 19502 Do you want to cancel adjustments to the selected function function name The settings made for the function function name are going to be reset to the initial values To continue the action click the Yes button To cancel the action click the No button 19503 Do you want to cancel adjustments to all the functions The settings made for all functions will be reset to the initial values To continue the action click the Yes button To cancel the action click the No button User s Manual U18950EJ1 VOUM 53 APPENDIX A QUANT
43. lassified into the following three quality grades Standard Special and Specific The Specific quality grade applies only to NEC Electronics products developed based on a customer designated quality assurance program for a specific application The recommended applications of an NEC Electronics product depend on its quality grade as indicated below Customers must check the quality grade of each NEC Electronics product before using it in a particular application Standard Computers office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots Special Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems safety equipment and medical equipment not specifically designed for life support Specific Aircraft aerospace equipment submersible repeaters nuclear reactor control systems life support systems and medical equipment for life support etc The quality grade of NEC Electronics products is Standard unless otherwise expressly specified in NEC Electronics data sheets or data books etc If customers wish to use NEC Electronics products in applications not intended by NEC Electronics they must contact an NEC Electronics sales representative in advance to determine NEC Electronics willingness to support a given appl
44. le sample c GB subs subii CO projitest sample sample c vin E sub12 Cuprajiestisample sample c C sub31 E sample c amp C projitest sample sample c m B sub11 E sub14 Cprajtestisamplesample c subi H sample c subi3 C sub14 LApraj sample sample ok 0 sample asm Reading prajssample sample ak O sample asm Heading completed SMELT aalz32 dat BEL tst Heading SMELT nalz32 dat Sk tr t t Reading completed SMELT nals32 datz BkO TD txt Heading ko WMELT aalz32 dat Bk DID tet Reading ca For Help press F1 Statusbar Tree view area Message display area List view area Note When using the SK78KOR sk78kOr is displayed on the title bar This section describes the following items Explanation of each area Menubar Toolbar Statusbar 28 User s Manual U18950EJ1VOUM CHAPTER 5 WINDOW REFERENCE Explanation of each area 1 Tree view area This area displays the function call tree Functions are not sortable or movable by dragging icons into this area Figure 5 2 Tree View Area 2 Ii ini E stabi 8 subi subz 8 subs E mul Bl isdigit J sub31 xi Il subii xL subiz xL sample c sub13 C subi The colors of icons indicate the function statuses in the order of priority as follows Table 5 2 Colors and Meanings of Function Icons e ooo om Red Function whose stack size is largest among the callee functions oa Light blue Function whos
45. name from which an underscore at the top of the symbol name in the assem bler source file is excluded is enclosed with brackets When the function is a static function the function name is preceded with the file name without path and or file name tt function name Auxiliary mark A symbol that indicates the function type is output A Recursive function amp Function including an indirect call that uses a function pointer Total stack size is displayed if the size is unknown and SIZEOVER if the size exceeds the limit is displayed if the size is unknown and SIZEOVER if the size exceeds the limit Adjustment information This item is output when the Additional margin size or Recursion depth time for recursive functions is specified If not specified nothing is output size additional margin A value specified in Additional Margin in the Adjust Stack Size dialog box or ADD in the Stack size specification file txt decimal value time recursion depth A value specified in Recursion Depth in the Adjust Stack Size dialog box or RECTIMES in the Stack size specification file txt decimal value a Example in which all the call chains are output File menu Save All Call Chains main 800 80 sub1 720 240 sub2 480 200 sub3 280 280 sub31 160 160 sub11 500 30 20 10 sub1 1 500 30 20 10 sub12
46. ndled by SK78K0 SK78KOR The input output files handled by the SK78K0 SK78KOR are as follows Input files Project file prj Assembler source module file asm Stack size specification file txt stk system file psg Output files stk system file psg Stack size specification file txt Output result file txt csv 4 2 Explanation of Files 4 2 1 Project file prj A project file which is generated by PM contains information on source files The SK78K0 SK78KOR reads the following information from a project file Project path C source file Options intermediate output directory register mode optimization option 4 2 2 Assembler source module file asm A source file coded in the assembly language which is output by the CC78K0 CC78KO0R based on a C source file registered in the Project file prj The SK78K0 SK78KOR analyzes the amount of stack consumed based on this file The user cannot specify the assembler source module file individually Generation of assembler source module file 1 Select Tool menu gt Compiler Options in PM 2 Select Assembler Source on the General or Output File tab User s Manual U18950EJ1 VOUM 19 CHAPTER 4 INPUT OUTPUT FILES 4 2 3 Stack size specification file txt 20 A stack size specification file is a text file for collectively specifying information about stack sizes for functions e g functions manually coded in ass
47. nics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics 434 NESAS User s Manual SK78KOR Ver 3 02 SK78KO Ver 2 20 Stack Estimation Tool Target Device 78KOR Microcontrollers 78KO Microcontrollers Documen t No U18950EJ1VOUMOO 1st edition Date Published October 2007 NEC Electronics Corporation 2007 Printed in Japan MEMO 2 User s Manual U18950EJ1VOUM Windows is either a registered trademark or a trademark of Microsoft Corporation in the United States and or other countries Users Manual U18950EJ1VOUM 3 e The information in this document is current as of October 2007 The information is subject to change without notice For actual design in refer to the latest publications of NEC Electronics data sheets or data books etc for the most up to date specifications of NEC Electronics products Not all products and or types are available in every country Please check with an NEC Electronics sales representative for availability and additional information e No part of this document may be copied or reproduced in any form or by any means without the prior written consent of NEC Electronics NEC Electronics assumes no responsibility for any errors that may
48. ns are made for one file in a file When no argument is specified for ADD RECTIME or CALL When a size specification information except for ADD RECTIME or CALL is specified When an illegal argument value other than a decimal value or hexadecimal value starting with Ox is specified for ADD or RECTIME When an illegal argument invalid function name is specified for CALL When multiple parameters are specified for ADD or RECTIME When RECTIME is specified for a non recursive function When multiple function names are specified for one CALL 22 User s Manual U18950EJ1VOUM CHAPTER 4 INPUT OUTPUT FILES 4 2 4 stk system file psg The stk system file is a file for saving stack size adjustment information The file name is fixed to project file name psg The file contents are saved in the same format as that of the Stack size specification file txt but reading and sav ing are performed automatically by the SK78K0 SK78KO0R only information of functions whose stack sizes have been changed is saved Caution Do not modify the stk system file 4 2 5 Output result file txt csv The stack size calculation results for a selected function can be output as an output result file by selecting the out put content and file format 1 Output content By using the following methods the calculation results of the stack size of the call chain with maximum stack or of all call chains will be output By selec
49. on file E sk78kO0rp dll DLL file for PM dat 8kOr IOR IORf ORsm IORr lORrsm txt Stack size specification files for compiler s library Document files pdf txt hlp eme Help file chm 2 3 Uninstallation of SK78K0 SK78KOR The following describes the procedure for uninstalling the SK78K0 SK78KOR 1 Start Windows 2 Start Add or Remove Programs on the Control Panel Add Remove Programs in Windows other than Win dowsXP 3 Select the items to be uninstalled NEC EL SK78KO Vx xx or NEC EL SK78KOR Vx xx NEC EL SK78KO Vx xx or NEC EL SK78KOR Vx xx Documents 4 Continue uninstallation of the SK78K0 SK78KO0R following the messages displayed thereafter 16 User s Manual U18950EJ1VOUM CHAPTER 3 STARTUP AND TERMINATION 3 1 Starting SK78KO SK78KO0R Before starting the SK78K0 SK78KO0H a project file created for the 78KO or 78KOR microcontrollers must be active in PM Next start the SK78K0 SK78KOR by performing the following operation in PM When using SK78KO0 Select Tool menu gt Startup SK78K0 When using SK78KOR Select Tool menu gt Startup SK78KOR Click the ra button registered on the toolbar When the SK78K0 SK78KOR is started the following Main window will open and the amount of stack consumed by the current project will be displayed Figure 3 1 Main Window When Using SK78K0 l 7Bk sample prj sk78k0 Seles File View Option H
50. ound in the Stack size specification file txt Following RECTIME specify a positive decimal value or a positive hexadecimal value starting with Ox as the recursion depth For details refer to 4 2 3 Stack size specification file txt Take action by clicking the button in the message dialog box 48 User s Manual U18950EJ1VOUM CHAPTER 6 MESSAGES W9416 Multiple RECTIME s for one function in file path line line number Only one is allowed Do you want to stop reading An illegal specification of the recursion depth is found in the Stack size specification file txt Only one type of recursion depth can be specified for a function For details refer to 4 2 3 Stack size specification file txt Take action by clicking the button in the message dialog box W9417 Illegal HECTIME for non recursive function in file path line line number It shall be specified for recursive functions Do you want to stop reading An illegal specification of the recursion depth is found in the Stack size specification file txt Specification of the recursion depth RECTIME can only be used for recursive functions For details refer to 4 2 8 Stack size specification file txt Take action by clicking the button in the message dialog box W9418 Missing function name after CALL in file path line line number Do you want to stop reading An illegal specification of callee functions is found in the Stack siz
51. rgin is specified Size order For a recursive function for which Recursion depth is specified recursion ditional margin Displays the name of C source files in which the function is defined Name order Nothing is displayed if there is no file including definition limit refer to Frame size depth is displayed following this display refer to Ad User s Manual U18950EJ1 VOUM CHAPTER 5 WINDOW REFERENCE By right clicking the mouse in this area the following shortcut menus are displayed Adjust Stack Size Opens the Adjust Stack Size dialog box for the selected function Sort List by Sorts the list view area according to the sort type selected from the following submenus Function Name Sorts the list view area in the order of function names alphabetic order Icon Type Sorts the list view area in the order of the function status with higher priority 3 Message display area A Warning Messages or the progress status of processing by the SK78K0 SK78KOR is displayed Figure 5 4 Message Display Area prajsample ssample Bk sample asm Reading L prajsample ssample ABl sample asm Heading completed CANNECT oole 32 dat BkDSIUr tet Reading CANNECT oole sedate OS I0r tet Reading completed CONNECT oole Sedat Sk O4I0 tet Reading CANECT cols se dat Sk M tet Reading completed By right clicking the mouse in this area the following shortcut menus are displayed Copy Copie
52. s the selected text to the clipboard Clear Clears all the messages displayed User s Manual U18950EJ1VOUM 31 CHAPTER 5 WINDOW REFERENCE Menubar 1 File menu Open Project Save Call Chain with Maximum Stack Save All Call Chains Load Stack Size Specification File Save Stack Size Specification File Exit sk78k0 Exit sk78kOr 32 Opens the Open dialog box reads information of the selected project file and calculates the stack size Opens the Save As dialog box and saves the call chain whose stack size is the largest among those starting from the selected function in the Output result file txt csv Functions in the same manner as the button This button is dimmed when no functions are selected Opens the Save As dialog box and saves the call chains and stack sizes of all the functions starting from the selected function in the Output result file txt csv This button is dimmed when no functions are selected Opens the Open dialog box and reads information of the selected Stack size specification file txt This menu is dimmed if there are no relevant functions Opens the Save As dialog box and saves all of the functions whose stack size is unknown or functions whose size has been changed including standard library in the new Stack size specification file txt This menu is dimmed if there are no functions whose stack size is unknown or
53. stack size of flib flib ADD 50 Set 0 to the stack size of flib zero for changing the display flib zero ADD 0 Adjust the stack size in hexadecimal and specify the recursion depth 3 times sub2 ADD 0xa RECTIME 3 Add sub4 and flib to the callee functions called through function pointer sub3 CALL sub c sub4 CALL flib Specify nothing sub c sub4 b Output image before stack size specification file is read main 310 100 sub1 210 200 sub2 10 10 sub2 10 10 sub3 amp 200 200 flib zero 7 sub cHsub4 50 50 flib 7 Caution An example when all call chains are output in the text format refer to 2 Text format c Output image after stack size specification file is read main 400 100 sub1 260 200 sub2 60 10 10 3 sub2 60 10 103 sub3 amp 300 200 sub c sub4 100 50 flib 50 50 flib 50 50 flib zero 0 0 sub c sub4 100 50 flib 50 50 4 Illegal specifications The specifications listed below are illegal for stack size information If the number of lines in a file exceeds the limit refer to A 1 Quantitative Limits a dialog box appears and an error message Is Output to the dialog box and the message display area then reading of the file is aborted When a function name not used is specified When multiple specificatio
54. ting Save Call Chain with Maximum Stack from the File menu only a call chain whose stack size is the largest among those starting from the selected function will be output By selecting Save All Call Chains from the File menu the stack sizes of all call chains starting from the selected function will be output The file format can be selected from the Text format or CSV format when saving the file 2 Text format If the text format is selected the result is output in the form of a call tree If there are multiple callee functions is placed between the caller and the calee If there is only one callee js placed there Each line can contain up to 5 119 characters the 5 120th and subsequent characters are displayed in a new line The maximum number of output lines is 32 767 If there are 32 768 lines or more a warning message is dis played and output is aborted Information of each function is output in the following format Parameters in brackets are not output if unneces sary Function Auxiliary mark Total stack size frame size adjustment information User s Manual U18950EJ1 VOUM 23 24 CHAPTER 4 INPUT OUTPUT FILES Table 4 2 Parameters of stk System File Function The function name defined in the C source file is output If the name of the C source file that includes the function definition is unknown like functions manually coded in assembly language or library functions the function
55. tions actually called are not deleted For details on the display format function information refer to 4 2 5 2 Text format 6 All Functions Lists the functions used in the Assembler source module file asm registered To add a function to Callee Functions select the function and click the Add button For details on the display format function information refer to 4 2 5 2 Text format 36 User s Manual U18950EJ1VOUM CHAPTER 5 WINDOW REFERENCE Function buttons Buttons Function Saves the changes in the stk system file psg and closes this dialog box Closes this dialog box without saving the changes Reset Clears the settings made for the selected function and resets to the initial value The size setting information of the function is not deleted from the stk system file psg until the OK button is clicked This button is dimmed if no settings were changed Displays the help topics for this dialog box Add Registers the function selected from All Functions to Callee Functions This button is dimmed when no functions are selected in All Functions Delete Deletes the function selected in Callee Functions functions actually called are not deleted This button is dimmed when no functions are selected in Callee Functions User s Manual U18950EJ1 VOUM 3 CHAPTER 5 WINDOW REFERENCE Stack Size Unknown Adjusted Function Lists dialog box This is a dialog box that displa
56. ual U18950EJ1VOUM 35 CHAPTER 5 WINDOW REFERENCE Explanation of each area 1 Function Name Displays the name of the selected function This area cannot be edited 2 Frame Size Displays the Frame size 2 is displayed if the size is unknown and SIZEOVER if the size exceeds the limit This area cannot be edited 3 Additional Margin Specify the Additional margin The specified margin is forcibly added to the stack size Specify a decimal value from 0 to 65 535 or a hexadecimal value starting with Ox If 0 is specified for a function whose stack size is the indication will be changed from to O Caution A warning message is displayed if the stack size of upper functions overflows as a result of this set ting 4 Recursion Depth Specify the Recursion depth The value multiplied by its recursion depth is set for the stack size Specify a 1 or lager value within a range in which the stack size does not overflow as a decimal value or a hexadecimal value starting with Ox This field is dimmed if the selected function is not a recursive function Caution A warning message is displayed if the stack size overflows as a result of this setting 5 Callee Functions Lists the functions to be called from the selected function will be added at the top of the name of the functions added from All Functions To delete a function from the list select the function and click the Delete button func
57. ys a list of functions whose stack size is not unknown or functions already set Take the following action to open this dialog box Select Option menu Stack Size Unknown Adjusted Function Lists Figure 5 7 Stack Size Unknown Adjusted Function Lists Dialog Box Stack 5ize Unknown Adjusted Function Lists Unknown Functions Adjusted Function mul sample ctsubl3 D U stab1 7 7 subl 2 2 System Library Functions sdigit 0 2 0 This section describes the following items Explanation of each area Function button 38 User s Manual U18950EJ1VOUM CHAPTER 5 WINDOW REFERENCE Explanation of each area 1 Unknown Functions Lists undetermined functions whose stack size is unknown Functions listed here include functions manually coded in assembly language library functions functions that include an indirect function call using a function pointer recursive functions and functions with variable parame ters for which no size setting information is specified 2 Adjusted Functions Lists the functions for which additional margins are specified or functions for which the callee functions are changed refer to Additional margin If a function is displayed in this area but does not have adjustment information the setting of its callee function has been changed 3 System Library Functions Lists the standard library functions to which the stack size is automatically set by the SK78
Download Pdf Manuals
Related Search
Related Contents
INSTRUCTIONS • INSTRUCCIONES • MODE D`EMPLOI Omega PSW-850 User's Manual LED-DELTA - SCHER`LOC D-Link DHP-W310AV Billing User Manual - Oracle Documentation Quicklub® - Airline Hydraulics Business Objects User Guide Copyright © All rights reserved.