汽车编程-TASKING Script Debugger User Guide.pdf
《汽车编程-TASKING Script Debugger User Guide.pdf》由会员分享,可在线阅读,更多相关《汽车编程-TASKING Script Debugger User Guide.pdf(52页珍藏版)》请在文库网上搜索。
1、TASKING Script DebuggerUser GuideMA160-864 February 20, 2017Copyright 2017 TASKING BV.All rights reserved.You are permitted to print this document provided that (1) the use of such is for personal use onlyand will not be copied or posted on any network computer or broadcast in any media, and (2) no
2、modifications of thedocument is made. Unauthorized duplication, in whole or part, of this document by any means, mechanical or electronic,including translation into another language, except for brief excerpts in published reviews, is prohibited without theexpress written permission of TASKING BV. Un
3、authorized duplication of this work may also be prohibited by localstatute.Violators may be subject to both criminal and civil penalties, including fines and/or imprisonment. Altium,TASKING, and their respective logos are registered trademarks of Altium Limited or its subsidiaries. All other registe
4、redor unregistered trademarks referenced herein are the property of their respective owners and no trademark rights tothe same are claimed.Table of Contents1. Using the Stand-alone Script Debugger . 11.1. Run the Debugger in Interactive Mode . 11.1.1. Configure the Debugger . 21.1.2. Run and Debug a
5、 Script . 71.2. Run the Debugger from the Command Line . 91.3. Dynamic Variables . 92. Debugger Script Language . 112.1. Introduction . 112.2. Identifiers . 112.3. Special Identifiers . 122.4. Whitespace and Comments . 122.5. Include Statements . 122.6. Nil, $defined(.) and $delete(.) . 132.7.Types,
6、 $type(.) . 132.7.1. Numbers . 132.7.2. Strings . 142.7.3. Indexed Arrays . 152.7.4. Associative Arrays . 162.8. Operators . 162.9. Assignment . 172.9.1. Assignment by Value or by Reference . 172.9.2. Assignment of Literals . 172.9.3. Assignment versus Expression . 182.10. Resolving of Identifiers .
7、 192.11. Flow Control . 192.11.1. if / elseif / else . 192.11.2. do and while . 202.11.3. for . 202.11.4. foreach . 202.11.5. goto . 212.11.6. continue and break . 212.11.7. switch . 222.12. Functions . 232.12.1. Local Variables . 242.12.2. Accessing Global Variables . 242.12.3. Return Value . 252.1
8、2.4.Variable Argument List . 252.13. Classes . 272.13.1. Constructor and Other Member Functions . 272.13.2. Class Instance Variables . 282.13.3. Class Variables . 282.14. Garbage Collection . 282.15. Exceptions . 292.15.1. Throwing Exceptions Explicitly: throw($e) . 312.16. Built-in Functions . 322.
9、16.1. Functions Applicable to All Types . 322.16.2. Functions Applicable to Numbers . 322.16.3. Functions Applicable to Strings . 34iii2.16.4. Functions Applicable to Indexed Arrays . 362.16.5. Functions Applicable to Associative Arrays . 372.16.6. Debugger Specific Functions . 372.16.7. Miscellaneo
10、us Functions . 442.17. Built-in Classes . 442.17.1. Class $addr . 442.18. File I/O . 452.19. Multithreading . 46ivTASKING Script Debugger User Guide软件下载:https:/ 提取码:uo1z Chapter 1. Using the Stand-alone ScriptDebuggerThe TASKING product installation contains two debuggers. One debugger is integrated
11、 in the Eclipseenvironment and the other is a separate program, the stand-alone script debugger.This chapter describesthe stand-alone script debugger.The stand-alone script debugger is not a complete debugger; facilities such as a register or a memorywindow are not available. Instead, its primary pu
12、rpose is to run scripts created by the user for testingpurposes.The recommended way of using the program involves the following steps:1.Create a script file in a text editor.The directory examples/dbgtc contains a few example scriptsto get you started. For details about the script language see Chapt
13、er 2, Debugger Script Language.In particular Section 2.16.6, Debugger Specific Functions describes the script language functionalitythat you can use to access and control the target.2.Test the correctness of the script (i.e. debug the script itself) using the script debugger in interactive(graphical
14、 user interface) mode.This also involves creating a configuration file (.dcf) for the targetto be used.3.Once the script is correct, run it from the command line (possibly from a batch file):dbgtc options name_of_script_file1.1. Run the Debugger in Interactive ModeTo start the script debugger select
15、 Script Debugger from the Start menu.The program starts with anempty window except for a menu bar at the top.The area below that is used for so-called panes.Youcan resize a pane by dragging one of its four corners and you can move a pane by dragging its title.11.1.1. Configure the DebuggerWhen the s
16、cript debugger is started, it creates a default configuration, called Untitled, that uses thesimulator and the TC1796B CPU. If this default is not suitable, you need to change the configuration.1.From the File menu, select Edit configuration.The Configuration dialog appears.2TASKING Script Debugger
17、User GuideThe dialog consists of several panes, which you can select on the left-hand side.2.Select Target and click on the Copy from predefined. button.The Copy from Predefined dialog appears.This dialog shows all the predefined target configurationsthat come with the toolset.The information in thi
18、s dialog is based on Debug Target Configuration (DTC) files. DTC files defineall possible configurations for a debug target.The files are located in the etc directory of the installedproduct and use .dtc as filename suffix. For more information on DTC files, see the TASKINGVX-toolset for TriCore Use
19、r Guide.3.Select a predefined configuration and click OK.The settings will be copied to your configuration.3Using the Stand-alone Script Debugger4.Optionally, adapt the settings in the other panes. For example, in the Registers pane you can addregister settings that may depend on your particular har
20、dware situation and application program. Inthe TriCore simulator pane you can overrule the default directory for simulator configuration filesand/or simulator output files. It is not recommended to change the configuration directory, becauseby default the configuration directory is derived from the
21、processor that has been selected.5.Click OK.6.From the File menu, select Save configuration as.The Save Configuration dialog appears.7.Give your configuration file a name with extension .dcf.Global program settingsA few settings that are not expected to be different for different configurations are
22、stored separately in aglobal file settings.dst. For example, you can extend the list of processors.1.From the File menu, select Settings.The Settings dialog appears.2.Click Add.The Add Processor Definition File dialog appears.3.Select the file that contains additional processor definitions and click
23、 Open.The new file will be added to the list of processor definition files.4.Click OK.The new settings will be saved automatically when you exit the program.4TASKING Script Debugger User Guide1.1.1.1. Setup a Flash DeviceIn the Flash pane you can setup a flash device.With the TASKING script debugger
24、 you can downloadan application file to flash memory. Before you download the file, you must specify the type of flash devicesyou use in your system and the address range(s) used by these devices.To program a flash device the debugger needs to download a flash programming monitor to the targetto exe
25、cute the flash programming algorithm (target-target communication).This method uses temporarytarget memory to store the flash programming monitor and you have to specify a temporary data workspacefor interaction between the debugger and the flash programming monitor.Setup a flash device1.From the Fi
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 汽车编程-TASKING Script Debugger User Guide 汽车 编程 TASKING