Home

Using DAC with HIWARE Tools - Development Assistant for C

image

Contents

1. Label In the inline mode the label beginning in the first line does not have to end with a colon unless the option MCUasm compatibility is selected Allowed de assert stack adj ingen dcb dew del def directives ded HIWARE ST7 V5 x In the inline mode Label In the inline mode the label beginning in the first line does not have to end with a colon unless the option MCUasm compatibility is selected Allowed If the option ST7 compatibility is selected expression directives syntax differs from standard syntax See HIWARE ST7 Reference Manual ST7 compatibility is valid only for separate files that is not for inline assembler blocks a 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 Using DAC with HIWARE Tools HIWARE HC12 V5 x In the inline mode Label In the inline mode the label beginning in the first line does not have to end with a colon unless the option MCUasm compatibility is selected Allowed If the Semi Avocet compatibility option is selected the directives following directives can be used switch case endsw default Otherwise the switch directive is used for choosing some of the previously defined assembler sections and if you try to use some of the other directives an error is reported DAC 40 71 109 2002 RistanCASE GmbH 23 DAE V4 0 Using DAC with HIWARE Tools 5 Debugger mm P 4 gt DAC V4 0 is currently integrating a DAPI Debugging support Applica ti
2. It also gives you the possibility of adding files to the project All files needed to run the Demo example will now be added to the project In the Explorer View browse through the demo HC05 subfolder of the HIWARE folder right click on the Sources subfolder and from the shortcut menu choose Add to project All file types configured in the pre vious section Configuring File Types are now added to the project 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 9 DAC 40 71 109 Using DAC with HIWARE Tools eee Hiware B demo E f Hc05 E Cmd Files E Pm B Projects abs obj gt G Readme Sy Sources _db Hc08 Hel2 E lat MCore Ppe G st C source fil 01 10 1999 11 08 C source fil 11 09 2002 14 32 Development Assistant for C Project 23 09 2002 14 51 C source file 12 09 2002 11 26 Assembler source file 27 08 1997 09 14 Fibo_mmds c 635 C source file 28 03 1995 11 52 Fibo_mmevs c 635 C source file 28 03 1995 11 52 lo demo c 1 42KB C source file 06 07 1999 15 08 Leds c 817 C source file 23 03 1998 13 41 LEDS AsmASM 2 45KB Assembler source file 12 09 2002 12 43 MACRODEM_AsmASM 1 93KB Assembler source file 26 08 1998 16 25 Simple cpp 1 25KB C Builder Source File 03 09 1997 10 31 termioO5 c 1 68KB C source file 30 09 1999 15 45 Termio05 h 787 C header file 22 06 1999 23 34 Timer c 1 49KB C source file 05 07 1995 12 07 Timer mmds c 1 49KB C source file 05 07 1995 12 07 Timer mmevs c 1 4
3. Tools Possible problems and ways to overcome them Problem There is no HIWARE HI WAVE 6 0 in the Debugger box on the Debugger Options dia log box 5 2 1 Debug ger Answer Check DAC Version and release number On the Help menu click About It should be V4 0 build 055 or later Check the Program subfolder of the DAC folder for necessary DLL The required DLL is CDHIWAVE6x dll Probably HI WAVE support in DAC has not been licensed as well If this is the case please contact your supplier When loading the DAC component into HI WAVE the message box entitled Component Loading Error is dis played with the follow ing message Could not load component C HIWARE PROG dac wnd or with one of its libraries Error code 1157 Check if the Ndapi dll is located in the prog subfolder of the HIWARE folder If not copy the specified DLL into it as described in section 5 1 Installation of communication DLL s 2002 RistanCASE GmbH DAC 40 71 109 DAE V4 0 Using DAC with HIWARE Tools Problem Answer DAC displays the alert This means that the name currently speci message box with the fied in the Debugger Options dialog box message External does not match the debugger name speci debugger tried to connect fied in HI WAVE to a DAC project dissimi Open the Setup dialog box in HI WAVE lar to the one config by clicking the DAC Link component and ured choosing the Setup command from
4. subfolder of the DAC folder Another file that should be customized to reflect the properties of the tar get system on which a program is to be executed is the linker command file If the HIWARE HCO05 V5 x dmt makefile template is expanded the linker command file will automatically be generated along with the make file The template file section responsible for the linker command line file generation is at the end of the template and is commented To enable automatic makefile generation do the following e Copy the file HIWARE HC05 V5 x dmt from the Makefile Genera tor Templates subfolder of the DAC folder to the demo HC05 Sources subfolder of the the HIWARE folder e Customize HIWARE HCO05 V5 x dmt to your needs e On the Options menu click Makefile Generator and then select Generate makefile or its components e Inthe Makefile template box enter HIWARE HCO05 V5 x dmt or use the Browse button to find it e Click OK e On the Start menu click Generate Makefile The makefile for your project will be generated automatically Makefile Generator Options px Generate makefile or its components Makefile template Hiware HCO5 V5 x dmt Browse se ere ee Figure 3 3 Makefile Generator Options The report of the automatic project makefile generation process is dis played in the Messages window under the Makefile Generator tab After 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 D
5. the DAC Link menu The Connection Specification dialog box is opened Figure 5 8 Compare the Debugger Name in this dia log box with the selected Debugger in DAC Figure 5 2 They must be identical If this is not the case change the debugger name in the HI WAVE Connection Speci fication dialog box and click OK This will cause a new connection to be established and the connection specifica tion to be saved in the current Project ini file in the following section DAC DEBUGGER NAME HIWARE HI WAVE 6 0 SHOWPROT 1 Debugger Name JHIWARE HIHWAVE 6 0 M Show Protocol Sele ee Figure 5 8 Connection Specification dialog box DAC 40 71 109 2002 RistanCASE GmbH 31 DAE V4 0 Using DAC with HIWARE Tools 32 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 Using DAC with HIWARE Tools BE 6 Index kx 7 Symbols D include 8 10 D 8 dep 3 d 8 8 DAC prefix 10 V4 0 055 1 _db 4 Demo Mode 1 toolbar 17 dac dep 19 A Dac wnd 25 Analysis for Symbols ASM Source 20 dac wnd 30 Analysis for Symbols C Source 20 DAPI 25 DAPI Debugging support Application Programming Interface 24 Database 4 B Build 13 19 Build Project 17 19 directory 4 Building the Database 13 Update 13 19 Debugger 24 Defines Control file 8 C Demo 2 3 10 13 C Source 8 Demo abs 19 C Hiware demo HC05 1 Demo c 14 CDHIWAVE6x dll 25 30 Demo dcp 3 Compile All Files 17 Demo mak 19 Compi
6. 2002 RistanCASE GmbH DAC 40 71 109 DAE V4 0 Using DAC with HIWARE Tools I Requirements Dem e DAC V4 0 055 or later Development Assistant for C RistanCASE The latest version with Demo Mode license included can be downloaded from the following URL http www RistanCASE com dac v40 dac_download php If you are running DAC in Demo Mode you can easily obtain a trial license and enjoy all the comforts of DAC for two weeks For more details choose Technical Support from the Help menu e GNU make V3 75 or later Free Software Foundation The gmake exe with RistanCASE improvements can be downloaded from the following URL http www RistanCASE com gnu gnu_products php In the following sections it is assumed that your HIWARE HC05 V5 x tools have been installed in the C Hiware demo HC05 folder In the text that follows the C Hiware folder will be referred to as the HIWARE folder You may have to adapt the paths used in the example provided to match your current installation paths HIWARE HC05 V5 x tools and the GNU make utility folders have to be in the system PATH The GNU make should be named gmake exe It is also assumed that DAC has been installed in the C Program Files RistanCASE Development Assistant for C folder which does not have to be in the system PATH In the text that follows this folder will be referred to as the DAC folder DAC 40 71 109 2002 RistanCASE GmbH 1 DAC V4 0 Usin
7. 9KB C source file 05 07 1995 12 07 Figure 2 8 Project Window Explorer View Undocked mode Another alternative is to add each file separately by selecting each one and adding it to the project 2 8 Building the Database Development Assistant for C provides the static code analysis of C and ASM source files and generates various data based on the results The analysis of the project source files and the generation of the database are divided into two phases the analysis of individual program modules and the generation of data on global symbols usage The results of the analysis are saved in database files on the disk allowing them to be used in DAC later on You can choose between the unconditional analysis of all project files and the analysis of changed source files only using the Build Database and the Update Database commands from the Start menu respectively The Update Database command will optionally check if the include files used in program modules have been changed as well To build the database in the Demo example on the Start menu click the Build Database command This command performs the unconditional analysis of all project files and creates a database containing information on the analyzed source code The errors and warnings detected during this 2002 RistanCASE GmbH 13 DAE V4 0 Using DAC with HIWARE Tools operation are displayed in the Messages window as illustrated below for the Demo c sample fi
8. AC 40 71 109 Using DAC with HIWARE Tools the project makefile has successfully been created you can use the Link All Files Make Project or Build Project UDA to generate the Demo abs file The generated Demo mak file can be opened for inspection Please bear in mind that any changes made in it would be overwritten as soon as any of the following actions from the Start menu is performed Build Data base Update Database or Generate Makefile This means that if any changes to makefiles are to be made the make template file should be edited instead DAC UDA handles compiler error reports and displays them in the Mes sages window under the Compiler Messages or Linker Messages tab depending on the UDA performed 3 3 Using HIWARE Tools by Default If you want your newly created project files to automatically inherit the proper setup for HIWARE HC05 V5 x tools you should also customize the default DAC project file dac dcp which is located in the Program subfolder of the DAC folder 2002 RistanCASE GmbH 19 DAC V4 0 Using DAC with HIWARE Tools EEE 4 Limitations of Static Code Analysis kk gt 4 1 Analysis for Symbols C Source Since DAC Static Code Analysis supports a great number of dialects it stands to reason that each and every one of these dialects cannot be sup ported in minute detail However if you find that any of these limitations prevents you from using DAC in the optimal way please send us th
9. E Rene lee ooo Save as type Project file dep x Cancel Figure 2 1 Creating a new project 2 2 Configuring Working Directories On the Options menu click Project to open the Project Options dialog box Use this dialog box to set project directories 2002 RistanCASE GmbH 3 DAC V4 0 Using DAC with HIWARE Tools Project Options 2 x Directories File Types Miscellaneous Project Root director I Browse Referential Project Root directory Browse Header Directories Browse Database directory d Browse User Help file CAHIWARE prog hiwave hip Browse I Automatically add new project paths to Header directories Figure 2 2 Configuring working directories Project Root directory The full path is expected in the Project Root directory text box or as a special value a single period character which stands for the directory where the project file resides The names of all files belonging to the project are considered relative to the Project Root directory if the full file path is not given In our example keep the single period character for the Project Root directory Referential Project Root directory If not empty it specifies an alternative path for searching for files that DAC fails to find in the original project path DAC will attempt to find files with the referential extension in the Project Root directory prior to searching the referential Project Roo
10. Maximum identifier length This is the number of significant characters in the identifiers The remain ing characters are ignored The default value is 31 Special table processing It determines the treatment of arrays of pointers to functions in the analy sis If this option is selected such variables are treated as functions other wise they are treated in the usual way default Defines Control file It determines the list of macro definitions to be set at the beginning of the module preprocessing This box may contain the control file name with absolute or relative path in relation to the project root with the prefix The prefix is also used in the Project file dcp to specify included files Therefore you should avoid using the character at the beginning of the names of files and folders that are to be used in the project Control file lines beginning with i or I subsequently contain the list of directories for searching for include files separated by a semicolon Control file lines beginning with d or D subsequently contain the list of macro defi nitions as described in the previous paragraph The remaining control file lines are ignored 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 DAC 40 71 109 Using DAC with HIWARE Tools Nested comments It allows proper recognition of nested C style comments for example LE aaa FIL C comments It determines if C comments beginning with are t
11. Technical Note 109 Development Assistant for C V4 0 Using DAC with HIWARE Tools Software Development Quality and Documentation Tool RistanCASE GmbH Tools for Embedded System Developers Development Assistant for C V4 0 Documentation Release date September 25 2002 File name DAC HIWARE TN LT pdf Version 1 8 URL http www RistanCASE com dac v40 specificsupport metrowerks php Copyright 1990 2002 RistanCASE GmbH Switzerland All rights reserved The information contained in this document is subject to change without notice RistanCASE GmbH makes no warranty of any kind with regard to this manual including but not limited to the implied warranties of merchantability and fit ness for a particular purpose RistanCASE GmbH shall not be liable for errors contained herein direct indirect special incidental or consequential damages in connection with the furnishing performance or use of this material ALL RIGHTS RESERVED No part of this publication may be copied in any form by photocopy microfilm retrieval system or by any other means now known or hereafter invented without the prior written permission of RistanCASE GmbH IBM PC XT AT are trademarks of the International Business Machine Corpora tion Microsoft Windows is a registered trademark of the Microsoft Corporation All other trademarks used in this document may be trademarks or registered trademarks of their respective owners and are hereby
12. acknowledged Corporate Headquarters RistanCASE GmbH Zielackerstrasse 19 CH 8304 Wallisellen Zurich Switzerland Telephone 41 0 1 883 35 70 Fax 41 0 1 883 35 74 E mail info RistanCASE com Web www RistanCASE com This document was designed to be distributed electronically and then printed on a laser printer on an as needed basis Therefore the fonts and layout of this document have been chosen for optimal printing rather than for optimal viewing on screen To view this document on screen however simply increase the magnification using the magnification box at the top of the window For the best results when viewing dialog boxes on screen increase the magnification to 200 Some figures have hot links on them DAC 40 71 109 Contents Requirements ies csissassncasnconssessessesosesausuaxevenautecsesasatsantevnsnesnnnosuavesans l 2 Configuring DAC ssssssssssssisssssssssisssvosssssosssospsoossssosssossssadsssrosssss 2 2 1 Creating a New Project ornrnrnnvnrnnvnnnnvnnnnnnnnnnnnnnvnnnnnnnnennnree 3 2 2 Configuring Working Directories srrrnrrnnrnnnrnvnnnnnnnvvrrnnnnnvnenn 3 Project Root directory Stssiisioriicicariconcsniarneeanmniers 4 Referential Project Root directory srrrrnrrrnnnnrnnrrnvnrnnnnrr 4 Header Directories Jeanne inne vemines 4 Database directory suscavuhid viataterinevoaeeecianieiactgnnecd umes 4 erververen 5 2 3 Configuring File Types lt sscscrsessesvssssssessseav
13. ally at the beginning of every C source module during the analysis as if the include directive containing the name of the file in question enclosed in quotation marks was present in the first line of the ana lyzed source code The preinclude file is used to specify predefined mac ros variable and function declarations for a particular compiler which are not set by default in DAC analysis The one corresponding to the Demo example project has been selected here HIWARE HCO05 V5 x h This file contains declarations of HIWARE HC05 V5 x C Compiler predefined macros It is located in the Preinclude Files folder of the DAC folder To adapt this file to your needs on the File menu point to Configuration Files and click Compiler Preinclude File 2 6 Configuring Assembler Dialect and Header Directories On the Options menu click Assembler to open the Assembler Options dialog box This dialog box contains options which enable you to set assembler source code analysis parameters Assembler Options 21 x Assembler r Source HIwAREHCOSV x Heb Assembler header files Browse Preinclude header file HARE HCOSVSxn Browse rm Dialect specific options I Support for structured types I Case insensitive symbols I MCUasm compatibility Figure 2 7 Assembler Options Source It contains the list of supported assembler languages for the current project It is possible to select a particular dia
14. can dis continue previous debugging Therefore you will probably turn on Ask before initializing debugger option if you have already started debug ging process and want to continue that process with DAC where you left in debugger 2002 RistanCASE GmbH 27 DAC V4 0 28 Using DAC with HIWARE Tools Check debugging through non project files During the debug session in the external debugger simulation can stop somewhere in the code DAC naturally follows the point where the simu lation has stopped and represents it in the appropriate way in its environ ment If the simulation has stopped in the code that is not in the DAC project DAC will not be able to offer complete functionality If you select this option DAC will follow debugging and notify you in case it leaves the DAC project so that you will be able to update the project and make the most of DAC features 5 3 Configuring HI WAVE Debugger Options Before configuring the project file please quit DAC e Open HI WAVE and on the File menu click Open Project Select the Project ini file from the currently defined working directory in this example it is WORK lt processor gt c subfolder of the HIWARE folder In the project layout the HI WAVE DAC component dac wnd will now be added In HI WAVE on the Component menu click Open and then choose Dac Open Window Component x Figure 5 5 Open Window Component The HI WAVE DAC window needed for
15. communication with DAC is now open mi DAC Link EN Figure 5 6 DAC Link e On the File menu in HI WAVE click Save Project to save this con figuration Thus this component will be loaded automatically next time this project is called 2002 RistanCASE GmbH DAC 40 71 109 DAE V4 0 Using DAC with HIWARE Tools Quit HI WAVE 5 4 Synchronized Debugging It is now possible to test the synchronization between DAC and HI WAVE e Open the project in DAC e Open Fibo c if it s not already open e Right click the Fibo c source window and select main from the shortcut menu The pointer now points to the void main void statement 1 In DAG on the Debug menu click Set Breakpoint or click the cor responding button on the Debug toolbar Figure 5 7 The selected line is marked in configurable color indicating that a breakpoint has been set e On the Debug menu click Run HI WAVE has now been started and after a certain period of time it will stop at the specified breakpoint tee Paes Figure 5 7 Toolbar with the debugger commands from left Synchronize Run Stop Step Into Step Out Step Over Go Until Set Breakpoint Clear Breakpoint Starting now you can debug directly from DAC using the toolbar or even from HI WAVE Synchronization between the two programs has been ensured DAC 40 71 109 2002 RistanCASE GmbH 29 DAC V4 0 30 5 5 Troubleshooting Using DAC with HIWARE
16. e 2 10 Project Window Logical View Undocked Mode DAC 40 71 109 2002 RistanCASE GmbH 15 DAC V4 0 Using DAC with HIWARE Tools 16 3 Integrating the Tools mm gt 3 1 User Defined Actions UDA Setup To integrate the HIWARE HC05 V5 x tools and GNU make into DAC on the Option menu click User Defined Actions and then click the Start Menu Actions tab Now check the Use compiler template check box By selecting this option you have decided on what is probably the most common manner of using HIWARE HC05 V5 x tools The action is contained in the HIWARE HCO5 V5 x tpl file located in the UDA Templates subfolder of the DAC folder You can edit it and adjust it to your needs RistanCASE would appreciate your sharing additional features and ideas with us Now click OK 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 DAC 40 71 109 Using DAC with HIWARE Tools User Defined Actions 21 x Start Menu Actions Version Control Menu Actions Shortcuts Command Shell New Deere Hename B Compile amp All Files 3 B 8Link All Files gt 1 template BB amp Make Project vi Down r Show output data in GMS DOS Prompt UDA Cupu window OE Dorit show output m Toolbar None Cia Picture JRivare_compile_file bmp Browse Save source file and set dir to project root Update CurFile XSetDir ZPriRoot XSetwin MIN Check if the project contains neit
17. e description of that limitation to support RistanCASE com You can find more about these limitations in User Manual chapters Pre processor and Dealing with Syntax Extensions 4 2 Analysis for Symbols ASM Source HIWARE assemblers have support for the structured types If the Support for structured types option is selected the following direc tives will be analyzed struct union endstruct endunion type If this option is not selected an error will be reported in case any of the men tioned directives is used All HIWARE assemblers also have the support for embedding inline assembler blocks in C code There are two syntaxes for inline assembler blocks asm assembler_instruction and 20 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 Using DAC with HIWARE Tools asm assembler block Inline assembler blocks analysis is supported for both the syntaxes Also the specific details in which the code within inline assembler blocks dif fers from the assembler code in separate files are supported Since these specifics differ depending on particular assemblers they will be listed within their specific groups The support for using the pointer in the assembler is provided on the level where the following is realized in case of no error is reported correct usage in case of an error is reported but no further check is carried out incorrect For example in case of a gt b expression there is sy
18. easesonssensesassennceseses 5 BES ai ered EE EYS 5 Assembler Source file rrrnnrnnnnrnnnnrnnrnnrnnrrnrrrnnnrrnrnrnnrrnnenn 5 Header fil ensornir ai o aas 5 DAA TC E 6 Text saman eip a aE neo hekk 6 Referential pairs el 6 2 4 Configuring Analysis for Symbols sronvrrnnnnnnovnnnvrnnnvrsvrnnnnnnnn 6 2A General RE NE 7 Environment SUDSHIULES x osscvseevinexine seasaantecsaateua nederst 7 24 2 C See 8 Maximum identifier length srrrrrrrrrnrrrnrrrnrnrnnrnrrrnrrnnvrnnne 8 Special table processing gennunsdnnnsnnaidemad sener 8 Defines Control file vaimnamsstngenmsnubentei snin 8 Nested comments hes 9 CEF OO CNS se 9 EEE 9 EE REE 9 2 5 Configuring Compiler Dialect and Header Directories 9 OUT OS SEERE RE corsets 10 Compiler header directories srrnrrrnnrrnvnnrrnrrrnvnrnnnrnnn 10 Preinclude TAG 11 2002 RistanCASE GmbH i 2 6 Configuring Assembler Dialect and Header Directories II Ve lI Assembler header evas 12 Preinclude header file varnmsdnsensisnereemarjmnn 12 Support for structured types cccccccccccccccseessecssseesetesseessees 12 MCUasm compatibility rrrnrnrnnnrrrnrnnrnrvrnrrn vnr vrrrnrnrrnnrnnn 12 Case insensitive symbols ccsosavanvcostessseaneauevatsie a esecivoernantes 12 2 7 Adding Files to the Project cscssssssssceeseeeseeeecesseseseeess 12 2 8 Building the Database ooonnnnnnnrnnonrnnnnrnnnnrnnnnrnnenrnnnnrnsenresenn 13 3 Integrating the T
19. ected in this box In the Demo example project the HIWARE HC05 V5 x dialect is used Compiler header directories It enables you to set the list of directories which are to be searched for the files named using the include directive Different directories within a list are separated by a semicolon character Only the listed directories are searched for files whose names are written enclosed in brackets lt and gt The search for files whose names are written enclosed in quotation marks starts in the folder in which the source file containing the include directive resides The list of header directories can be assigned to a file In that case the Compiler header directories box contains the file name with absolute or relative path in relation to the Project Root with the prefix The directories listed in the file are separated by a semicolon or a new line no semicolon necessary The prefix is also used in the Project file dcp to specify included files Therefore you should avoid using the character at the beginning of the names of files and folders that are to be used in the project The path of the Compiler libraries for the used CPU should be defined as the lib HC05c include subfolder of the HIWARE folder 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 DAC 40 71 109 Using DAC with HIWARE Tools Preinclude header file It enables you to set the name of the file which will be included automati c
20. g DAC with HIWARE Tools 2 Configuring DAC xx 00 To make the most of your HIWARE HC05 V5 x tools with DAC these are the steps to follow Creating a New Project Configuring Working Directories Configuring File Types Configuring Analysis for Symbols Configuring Compiler Dialect and Header Directories Configuring Assembler Dialect and Header Directories Adding Files to the Project Building the Database Integrating the Tools As you progress through this technical note you will be led through the process of creating a new DAC project named Demo The Demo example project can be found on RistanCASE s CD ROM in the DAC Technical Notes HIWARE folder or downloaded from RistanCASE s web site http www RistanCASE com dac v40 specific support metrowerks php Tools supported by DAC V4 0 055 or later Supported compilers Supported assemblers 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 DAC 40 71 109 Using DAC with HIWARE Tools Tools supported by DAC V4 0 055 or later Continued Supported compilers Supported assemblers Supported debugger 2 1 Creating a New Project Start DAC and choose New Project from the Project menu Browse through the demo HC05 Sources subfolder of the HIWARE folder and enter the project file name Demo A project file will be created The standard project file extension is dcp so the created file will be named Demo dcp a AE Saen aswe AA E
21. her C nor ASM source files it ZCFile ZRA T rue ZR ZF alse ll Cancel Apply Help Figure 3 1 User Defined Actions Start Menu Actions On the View menu point to Toolbars and then click User Defined Actions Five UDA buttons should now appear on the DAC toolbar and the items Compile File Compile All Files Link All Files Make Project and Build Project on the Start menu On the toolbar appearing from left to right the UDA buttons are EPEE Figure 3 2 UDA toolbar undocked mode Compile File amp e Compile All Files E Link All Files Make Project adl e Build Project 3 2 Makefile Template Setup In order to completely define the Compile File Compile All Files Link All Files Make Project and Build Project UDA with the gmake utility a project makefile must be provided This file should have the same name 2002 RistanCASE GmbH 17 DAC V4 0 Using DAC with HIWARE Tools as the current project and the extension mak It can be edited manually or generated automatically The template files are generally used to define all the necessary macros commands rules and so on which facilitate automatic project makefile generation by means of the Makefile Template Macro Language instruc tions expansion Since manual editing is a very tedious and error prone process an exam ple makefile template HIWARE HC05 V5 x dmt has been provided in the Makefile Generator Templates
22. ics 4 Source 10 Special table processing 8 ST7 compatibility 22 Start 13 17 Start Menu Actions 16 Symbols 4 T TEXTPATH environment variable 5 U UDA buttons 17 Toolbar 17 Use compiler template 16 User Defined Actions UDA Setup 16 Help File 5 Using HIWARE Tools by Default 19 using the pointer in the assembler 21 DAC 40 71 109
23. l identifier defined and used in only one module Demo c 53 Warning 302 Int rr Global identifier defined and used in only one module Figure 2 9 Messages Window Analysis for Symbols tab Undocked mode Once the analysis of all project files has been completed the new data base file containing the information on global symbols is created Please refer to the DAC manual for further information on how symbols infor mation can be used 14 2002 RistanCASE GmbH DAC 40 71 109 DAE V4 0 Using DAC with HIWARE Tools In the DAC Project Window select the Logical View tab and unfold fields to get an overview of your project Cen ee Demo Default folders Project Root O Demo c E Demo dep Hiware HCO5 V5 x dmt GF Drive C 3 HIWARE Ga LIB 3 HCO5e INCLUDE O Hidef h O Stddef h O Stdtypes h PROGRAM FILES 3 RISTANCASE 1 9 DEVELOPMENT ASSISTANT FOR C Preinclude Files O HIWARE HCOS V5 x h Default types C Source Files Assembler Source Files E Header Files Document Files Miscellaneous Files Default states E writable Read Only Changed Q Not Changed Symbols Messages Version Info Dependencies Con 4 gt ML hich anotherUnused base c c ch Figur
24. le Analysis for Symbols MISRA C Compliance _ Demo c 95 Waring 301 i Identifier never used Demo c 11 Warning 304 sch Module level symbol used only in function Funct Demo c 12 Warning 304 ch Module level symbol used only in function Funct Demo c 13 Warning 304 ss Module level symbol used only in function Func1 Demo c 14 Warning 304 us Module level symbol used only in function Func1 Demo c 15 Warning 304 si Module level symbol used only in function Funct Demo c 16 Warning 304 ui Module level symbol used only in function Func1 Demo c 17 Warning 304 sl Module level symbol used only in function Func1 Demo c 18 Warning 304 ul Module level symbol used only in function Funct Demo c 19 Warning 304 ull Module level symbol used only in function Funct Demo c 20 Warning 304 sLL Module level symbol used only in function Func1 Demo c 21 Warning 304 fl Module level symbol used only in function Func1 Demo c 22 Warning 304 dfl Module level symbol used only in function Func1 Demo c 23 Warning 304 ddfl Module level symbol used only in function Func1 Demo c 51 Warning 304 s ar Module level symbol used only in function main Demo c 95 Warning 302 anotherUnused Global identifier defined and used in only one module Demo c 52 Warning 301 unusedlnt rr Identifier never used Demo c 99 Warning 301 unused Identifier never used Demo c 104 Warning 302 EmptyFunc Globa
25. le File 17 DnDAPI32 dll 25 Compiler header directories 10 Help 5 E librar ies 10 embedding inline assembler blocks 20 Configuring Explorer View 12 Analysis for Symbols 6 Assembler Dialect and Header Directories 11 Compiler Dialect and Header a Directories 9 File Types tab 5 DAC 2 Free Software Foundation 1 File Types 5 Working Directories 3 DAC 40 71 109 2002 RistanCASE GmbH 33 DAC V4 0 34 G General 7 Generate Makefile 19 Generate makefile or its components 18 gmake 1 GNU 1 H HIWARE HC05 V5 x 1 5 10 11 16 19 Windows Workbench Help 5 HIWARE HC05 V5 x dmt 18 HIWARE HC05 V5 x tpl 16 HIWARE HI WAVE 6 0 26 30 31 HIWARE inline assembly syntax 21 HI WAVE debugger V6 0 24 HIWAVE EXE 26 hiwave hlp 5 l I 8 i 8 iNdapi32 dll 25 Integrating the Tools 16 L license Demo Mode 1 trial 1 Limitations of Static Code Analysis 20 Link All Files 17 19 Logical View 15 M M68k CPU 24 Make Project 17 19 Makefile Generator 18 Generator Templates 18 Template Setup 17 Maximum identifier length 8 Messages window 14 N Ndapi dll 25 30 New Project 3 0 Options 18 2002 RistanCASE GmbH Using DAC with HIWARE Tools P prefix 8 Preinclude file 11 Project Adding Files to the Project 12 Creating a New Project 3 Root Directory 4 Window 12 15 R Referential 4 Requirements 1 RistanCASE s CD ROM 2 24 S Semi Avocet compatibility 23 Software Metr
26. lect or the value lt none gt which means that parts of the C code containing inline assembler code will be ignored information on symbols will not be retrieved but no syn 2002 RistanCASE GmbH 11 DAG V4 0 spe Using DAC with HIWARE Tools tax errors will occur either In the Demo example project the HIWARE HC05 V5 x assembler is used Assembler header files It determines a list of directories which are to be searched for the files named within the INCLUDE directive Directories are separated by a semi colon Preinclude header file If a file is specified in this edit box typed in or selected using the Browse button it will be included in each assembler file prior to commencing assembler analysis This is identical to entering the INCLUDE directive in each assembler file Support for structured types It allows using the directives for dealing with structured types Also it allows using structured types in the assembly code MCUasm compatibility It includes MCUasm compatibility In case this option is enabled the label must end with a colon even if it begins in the first column Case insensitive symbols Enables case insensitive mode for symbol names When enabled all char acters are converted to uppercase 2 7 Adding Files to the Project In the Project Window the Explorer View replaces the Windows Explorer and supplies you with plenty of information on directories con taining project files
27. les defined in Windows can be made a part of various path specifications in DAC by enclosing the variable identifier in characters Apart from variables defined in the Windows environment it is possible in Environment substitutes also to define DAC environ ment variables in the form of env_var env_string If the senv var construct is found in DAC paths project root directory database directory include path Env env_var env var will be replaced with env_string These substitutions are also necessary if the environment variables of your development environment have been set only in the DOS window in which you build project binaries As the variables are not known at Win dows level if you intend to use them you will have to define them in DAC in Environment substitutes For a detailed explanation of other options in the General tab please con sult DAC help 2002 RistanCASE GmbH 7 DAC V4 0 Using DAC with HIWARE Tools 2 4 2 C Source On the Options menu click Analysis for Symbols and then click the C Source tab to open the following dialog box Analysis for Symbols Options 21 x General C Source Wamings MISRA C Compliance Symbol Name Checking Max identifier length 31 I Special table processing Preprocessor Defines Control file Browse I Nested comments V C comments I Traditional I Ignore line Figure 2 5 C Source Analysis for Symbols Options
28. ntax no check whether a is a structural type and whether it has the field p If the register is used as a pointer it is also not checked whether it points to the variable of the appropriate type pointer defi pointer definitions are supported through the pseudo nitions opcode pointer All HIWARE assemblers allow using operation extensions b w and l for example mov b in inline assembler blocks HIWARE assembler syntax which is applied to separate assembler files allows the character to be part of an identifier name For this reason it is not advisable to give an identifier a name ending with b I or w A name ending such as this one can depending on the context be under stood as a mark of operation length and be discarded in the process of analysis DAC 40 71 109 2002 RistanCASE GmbH 21 DAC V4 0 Using DAC with HIWARE Tools 4 2 1 Notes about assembler support for the specific HIWARE assemblers HIWARE HC05 V5 x HCI V5 x HC16 V5 x M68xxx CPU32 V5 x H8 500 V5 x XA V5 x In the inline mode Label In the inline mode the label beginning in the first line does not have to end with a colon unless the option MCUasm compatibility is selected Within inline assem bler blocks labels must end with a colon Allowed directives de deb dew and del If you try to use other directives an error will be reported HIWARE HC08 V5 x and M CORE V5 x In the inline mode
29. o be considered editable the list ends with a period Enter dep txt pjt Ist map prm err dmt tpl in the box Referential pairs Fields for entering alternative referential extensions are located in this area The original extension is entered in the Original column while the alternative extension is entered in the Referential column Up to five orig inal alternative pairs can be set If opening the file with the original extension fails DAC will attempt to find and open the file with the identi cal name and the alternative extension 2 4 Configuring Analysis for Symbols For this example you may need to configure Analysis for Symbols Options from General and C Source sections 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 DAC 40 71 109 Using DAC with HIWARE Tools 2 4 1 General On the Options menu click Analysis for Symbols and then click the General tab to open the following dialog box Analysis for Symbols Options 21 x m Warnings m Headers Disabled IV Check headers on update C Enabled IV Use default search C Disabled for all headers I Use search paths Disabled for standard library headers IV Use VAXAYMS drives IV Show unresolved externals Stop After IV Show unused symbols foo Enors IV Globals statics used in one module function o Warnings Environment substitutes Figure 2 4 General Analysis for Symbols Options Environment substitutes Environment variab
30. o be recognized while analyzing the source code Traditional It determines if the pre ANSI preprocessor is to be used For the tradi tional preprocessor a comment is equivalent to nothing while for the ANSI preprocessor it is a white space The traditional preprocessor does not delete comments within the define directive it does not recognize and operators and requires an initial in a directive at the very beginning of the line It allows specification foo if macro foo takes a single argument and permits a macro to be expanded recursively Ignore line It determines that the 1ine preprocessor directive be ignored 2 5 Configuring Compiler Dialect and Header Directories An additional path configuration must be performed to specify the loca tion of the HIWARE HC05 V5 x C compiler library header file needed for DAC symbol analysis On the Options menu click Compiler to show the Compiler Options dialog box This dialog box contains options which enable you to set C source code analysis parameters 2002 RistanCASE GmbH 9 DAC V4 0 10 Using DAC with HIWARE Tools Compiler Options 21 x Compiler m Source HIWARE HCO5 V5 x v Help Compiler header directories E Hiware lib HCO5c include Browse Preinclude header file HIWARE HCOS V5 x h Browse Figure 2 6 Compiler Options Source The supported C dialects of the C language used in the active project can be sel
31. on Programming Interface This interface will enable DAC to exchange messages with HI WAVE The advantages of such a connection are that it allows you to set or delete break points from within DAC and to execute other debugger operations Furthermore DAC is not only synchronized with HI WAVE but runs with it as it operates it is always in the same file and on the same line as HI WAVE Thus the usability of both DAC and HI WAVE is increased To make the most of your HI WAVE debugger V6 0 with DAC these are the steps to follow Installation of communication DLL s e Configuring DAC Debugger Options e Configuring HI WAVE Debugger Options e Synchronized Debugging e Troubleshooting An example configuration for the M68k CPU which can easily be adapted to each CPU supported by HIWARE can be found on RistanCASE s CD ROM in the DAC Technical Notes HIWARE folder or downloaded from RistanCASE s web site http www RistanCASE com dac v40 specificsupport metrowerks php 5 1 Installation of communication DLL s HI WAVE and DAC communication is based on DDE protocol The whole system contains e HI WAVE e DAC 24 2002 RistanCASE GmbH DAC 40 71 109 DAE V4 0 Using DAC with HIWARE Tools e Generic DAPI interface implementation DLLs used by DAC for DDE communication CDHIWAVE6x dll and DnDAPI32 dll e A DAPI communication DLL used by HI WAVE DLL Ndapi dil e AHI WAVE specific DLL for bringing its interface
32. ools sscscisssscncssssssasvessiessissssadesseonsscivcseesssadessionss 16 3 1 User Defined Actions UDA Setup arrnnnvrnnrnvnnnrnrrvvnnnnnnnnnne 16 3 2 Makefile Template Setup roornnonrnonnnovrnnnnnennnrnnnenrrvnnnvnrevnene 17 3 3 Using HIWARE Tools by Default rrnnnnnrnvnnonnvnnnnnnrnnnnennne 19 4 Limitations of Static Code Analysis cccsscsssssssssesssceees 20 4 1 Analysis for Symbols C Source rrnnrnnvrnvnnnnnvevnnnnvnnnvrsvrnnnvnenn 20 4 2 Analysis for Symbols ASM Source rsnrrvnnnnnvnvnnnnnnnnvrsvrnnnvnenn 20 4 2 1 Notes about assembler support for the specific HIWARE seer al od RENE aotearoa 22 5 Debuggeru ursusnsuspgatnnngjnu ninvveddnsn 24 5 I Installation of communication DLL s nesonrnonrrnnonrnrrrrnverrnernn 24 5 2 Configuring DAC Debugger Options rrnnrnnnnrnnonrnvernnnenrnrrnn 25 ID 26 5 2 2 COMMS COM EN AEE Ea aaia 26 Program to Stafi scssi eicere ni i E REE 26 Timeouts enes 27 5 2 3 Project DS Pen eM xs iascsssnesdonsetewssesosanandsrneusdinbiansscsoubens 27 REE EE 27 L ad binary EEE EE 27 Ask before sending to debugger rrrrnnrrvnnrrnvrrnvrrrnrnrvrnrrnr 27 Check debugging through non project files 0 00 00 0 28 5 3 Configuring HI WAVE Debugger Options srranrnrnrnrnvrrvrnvnne 28 5 4 Synchronized Debugging ueuasesomnsemneinessaienmsvnmuien 29 5 5 Tr ubleshooimne css ciuencessasuituadecuricdararsatenddusiaedantiansna wines 30 Gy MONE RR EE EN EN E 33
33. t directory The specified path may either be full or relative to the Project Root and it may not specify a sub folder in the Project Root directory tree In this example it should be left empty Header Directories You should specify paths to all header directories used in the project The paths are separated by a semicolon Database directory It allows the Symbols and Software Metrics database files folder to be set The path in question can be absolute or relative to the Project Root direc tory If the Database directory is left unspecified the Symbols and Soft ware Metrics database files are created in the Project Root directory along with source and other files It is recommended that you should specify the Database directory to keep these files from mixing Enter db in the box 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 DAC 40 71 109 Using DAC with HIWARE Tools User Help file It enables you to set the User Help file for example the Compiler Help file The shortcut key for the User Help file can be set in the Keyboard definition file default CTRL SHIFT F1 Browse through the prog subfolder of the HIWARE folder and select the hiwave hlp help file This will give you an entry point for HIWARE Windows Help 2 3 Configuring File Types On the Options menu click Project and select the File Types tab Here you can set file extensions for the basic project file types A file type extension list consis
34. th and name of the HI WAVE executable Default HIWAVE EXE 26 2002 RistanCASE GmbH DAC 40 71 109 DAC V4 0 DAC 40 71 109 Using DAC with HIWARE Tools Timeouts During establishing the connection DAC extensively communicates with the external debugger sending and receiving data Depending on different technologies data transfer can be faster or slower and sometimes DAC lets the debugger have the control waiting for an answer In the whole communication timeouts are often used to insure that establishing and maintaining the connection will be carried out in the foreseeable time The length of timeouts depends on the selected debugger 5 2 3 Project Dependent Debugger Options 21x Debugger Connection Project Dependent About Plugin Switches Load binary CH IWARE WORK MB8KC fibo abs IV Ask before sending to debugger IV Check debugging through non project files Cancel Help Figure 5 4 Debugger Options the Project Dependent tab Switches Leave it empty Load binary Specify the binary file to be opened debugged In the example provided for your use the fibo abs file is to be debugged Ask before sending to debugger If this option is selected before establishing the connection between DAC and the debugger you will be asked to confirm initialization of the debug ger after the connection is established The debugger initialization is a debugger specific process which
35. to the debugging environment and DAC s DAPI Dac wnd provided by HIWARE iNDAPI32 dil DAC DLL Notification messaging DDE HI WAVE Command messaging DDE CDHIWAVE6x dil DAC DLL Figure 5 1 Communication between DAC and HI WAVE The files CDHIWAVE6x dll and DnDAPI32 dll will be installed auto matically during the DAC installation process As previously described HI WAVE needs the DAPI communication DLL provided by DAC This DLL Ndapi dll is automatically installed during the HIWARE toolkit installation process However if you are installing a new DAC release later than V3 5 build 555 you will have to follow this procedure e From the Program subfolder of the DAC folder copy iNdapi32 dll version 3 5 555 or later into the PROG subfolder of the HIWARE folder in which HI WAVE is located Then rename iNdapi32 dll to Ndapi dll 5 2 Configuring DAC Debugger Options On the Options menu click Debugger to open the Debugger Options dialog box which has four tabs Debugger Connection Project Depen dent and About Plug In DAC 40 71 109 2002 RistanCASE GmbH 25 Using DAC with HIWARE Tools Figure 5 2 Selecting the Debugger In the Debugger field select the corresponding debugger HIWARE HI WAVE 6 0 5 2 2 Connection Debugger Options Figure 5 3 Debugger Options the Connection tab Program to start In the Program to start box specify the pa
36. ts of up to 10 file extensions separated by a white space or the character To ensure maximally efficient use of HIWARE HC05 V5 x tools fill in the boxes as shown in the following picture Project Options BEI Directories File Types Miscellaneous r Referenti C Source file Original Ref C HE DE Assembler Source file f asm Header file p EE Document file f doc nt Text file dep tet pit Ist map prm err dmt tpl Figure 2 3 Configuring File Types C Source file Files with one of the extensions listed in this box will be considered C source files Header file extensions should not be defined within this field Enter c in the box Assembler Source file Files with one of the extensions listed in this box will be considered included Assembler files Module file extensions should not be defined within this field Enter asm in the box Header file Files with one of the extensions listed in this box will be considered included C header files Module file extensions should not be defined within this field Enter h in the box 2002 RistanCASE GmbH 5 DAC V4 0 Using DAC with HIWARE Tools Document file Files with one of the extensions listed in this box will be considered docu ment files Enter doc rtf in the box Text file Files with one of the extensions listed in this box will be considered edit able text files If files without extensions are t

Download Pdf Manuals

image

Related Search

Related Contents

Samsung B1245AVGW1/XEE Bruksanvisning  Axis P1214  Bedienungsanleitung Bedieneinheit RC30 - heizungsbau  Harbor Freight Tools 96156 User's Manual  Filament Design CLI-ACG192675 Installation Guide  User Manual - Stone Oakvalley Studios  User`s Manual  

Copyright © All rights reserved.
Failed to retrieve file