Home
Getting Started Guide - v2.1 RH850 C Compiler
Contents
1. int is for i 1 i lt 3 i printf Sd n i printf Hello world printf this is n printf a small dst n i 3 27 Getting Siarted with the TASKING VX toolset for RH850 printf debugging example n 3 Save the file 4 Build your project To be able to debug it is essential that your project has been built properly All steps required above are demonstrated in Chapter 3 Setting up a Project 4 1 2 Create a Debug Configuration Before you can debug a project you need a Debug launch configuration Such a configuration identified by a name contains all information about the debug project which debugger is used which project is used which binary debug file is used which perspective is used and so forth You can create a launch configuration when you create a new RH850 project with the New C Project wizard In Section 3 1 Create a Project we created one for the TASKING simulator At any time you can change this configuration If you want to debug on a target board you have to create a custom debug configuration for your target board For details on creating or changing a debug configuration refer to section Creating a Customized Debug Configuration in Chapter Using the Debugger of the TASKING VX toolset for RH850 User Guide 4 2 Start a Debug Session 1 From the Debug menu select Debug project Alternatively you can click the button in the main toolbar The TASKING Debug
2. 3 Press F5 again The printf statement has been executed now The bottom area of your workbench now shows a new view FSS 1 myproject FSS stands for File System Simulation The FSS view simulates the input and output to and from the target board or simulator when you are debugging The value of int i is printed and sent to the FSS view for output To clear the FSS view right click in the view and select Clear To restart your application from the Debug menu select Restart B 4 Step further through your application Watch the value of int i in the Variables view and observe the output in the FSS view The output is only flushed after a newline n 4 4 Setting and Removing Breakpoints Instead of stepping you can set breakpoints to suspended the application at a certain point A breakpoint is set on an executable line of a program If a breakpoint is enabled during debugging the execution suspends before that line of code executes Add breakpoints To add a breakpoint Double click the marker bar located in the left margin of the C C Editor next to the line of code where you want to add a breakpoint A dot is displayed in the marker bar and in the Breakpoints view along with the name of the associated file When the breakpoint is actually set a check mark v appears in front of the dot Disable breakpoints You can disable a breakpoint or completely remove it To disable a breakpoint do one of the fo
3. Getting Started with the TASKING VX toolset for RH850 MC150 800 v2 1 June 23 2014 Copyright 2014 Altium BV All rights reserved You are permitted to print this document provided that 1 the use of such is for personal use only and will not be copied or posted on any network computer or broadcast in any media and 2 no modifications of the document 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 the express written permission of Altium BV Unauthorized duplication of this work may also be prohibited by local statute Violators may be subject to both criminal and civil penalties including fines and or imprisonment Altium TASKING and their respective logos are trademarks or registered trademarks of Altium Limited or its subsidiaries All other registered or unregistered trademarks referenced herein are the property of their respective owners and no trademark rights to the same are claimed Table of Contents 41 Preparing for First USG va iscsacsacacisencenane ne deniednsncneearea ya n E ETna ATOA Oa EPERE 1 1 1 Installing the Software ccececeeeee cece e eee e eect eee a nese e dete eeaeeeeeaeeeeeseeeeeaeeeeeaeeaeeaeeaees 1 1 1 1 Installation for WINdOWS sensere teanen a tant E EEA 1 1 12 LICENSING seraient sens ivedeeseie ts testi a aa EE E Ea
4. cece cece e eee nent eee e esate snes een eeeta teeta ea neta ees 25 4 Debugging your Application csiccc iets seine cageesce ted cise sites nevnews iiaa AaS OEE EEEa ENE aE 27 4 1 Setting up a Project for Debugging ee cee eee eee eee eee e eee ee neta ee eee n een eea een eea een eea eee 27 4 1 1 Create a Sample Project ccceecsee eee eee eee ee cee a eect ece eae eaeeaeeaeeaeeaeeaneneeaeed 27 4 1 2 Create a Debug Configuration cceceeeceee eee nett eee ee eee ee nee eea ee eea een eea eed 28 42 Start a Debug SOSSION seen Srne iei in crap aeei ae c ken E Ean aE AE nE EEEa 28 4 3 Stepping through the Application cece teeter eee e eee rete eter nent etnies 29 4 4 Setting and Removing Breakpoints cceeeeeeeeeneee eee eeeeeneeeeeaeeeeeaeeaeeaeeaeeneeaeeaes 30 4 5 Reload Current Application s icscidsesccuet eg ceca edtavegan ius Sete cewecedvens Eh nE NE REDRE RSA 31 4 6 End a DEDUG SOSSION is sccneoisanseitenetsneenneetna cide dene nigandedd agedtnesngundans inieseneligandntdandease 32 4 7 Multiple Debug Sessions eceee cece e eee e eect etter teeter eee etree teen ee eea ee eeeeseeeeeeeenes 32 Getting Started with the TASKING VX toolset for RH850 Chapter 1 Preparing for First Use This chapter guides you through the installation process of the TASKING VX toolset for RH850 It also describes which documentation is available and how you best can use it In thi
5. Closing the RH850 Eclipse IDE To close RH850 Eclipse IDE From the File menu select Exit Upon exit the RH850 Eclipse IDE saves the current workbench layout The next time you start the RH850 Eclipse IDE the last saved workbench layout is used 1 3 How to Use the Documentation The documentation for the TASKING VX toolset for RH850 consists of online documentation for Eclipse e this Getting Started manual online TASKING VX toolset for RH850 User Guide Preparing for First Use It is strongly recommended to read the documentation in this order Getting acquainted with Eclipse If you are new to Eclipse start familiarizing with Eclipse Eclipse comes with several online documents One document describes how Eclipse is organized as a Workbench with Perspectives that contain Views another document explains how to create a sample C C project build and debug it CDT documentation To start with this documentation 1 Start Eclipse 2 From the Help menu select Help Contents The help screen overlays the Eclipse Workbench 3 Inthe left pane select Workbench User Guide to learn more about working in Eclipse 4 Continue with C C Development User Guide to learn more about creating and developing a C C project This part of the documentation explains how to create a hello world example Be aware that this example does not use the TASKING tools it uses the standard GNU compiler in Eclipse instead Getting started
6. also removes the entire myproject subfolder from your hard disk If you disable this option this would have removed your project from the workbench but leaves it on you hard disk Files can be used later in other projects or you can later import the whole project 3 Click OK to confirm 3 3 Manually Add a File to Your Project We will recreate the project as described in Section 3 1 Create a Project however this time without the automatic Hello World example C source file Instead the example below illustrates how you can manually add a file to your project Recreate your project without Hello World 1 First repeat steps 1 and 2 of Create a RH850 project with the New C Project wizard in Section 3 1 Create a Project 2 Inthe Project type box you can select whether to create an application or a library Expand TASKING RH850 Application and select Empty Project This creates a project without a C source file containing the function main e Click Next to continue The RH850 Project Settings page appears 3 Repeat steps 4 through 7 of Create a RH850 project with the New C Project wizard in Section 3 1 Create a Project 14 Setting up a Project 4 Click Finish to finish the wizard and to create the project Add a new file to your project To add a new empty file 1 Inthe C C Projects view right click on the name of the project myproject and select New Source File The New Source File dialog app
7. debugger without restarting it 1 Make the necessary changes in your source 2 Rebuild your application 3 Click on the Reload current application button 5 31 Getting Started with the TASKING VX toolset for RH850 The new application is loaded in the debugger 4 6 End a Debug Session To end the debug session 1 From the Debug menu select Terminate or click on the Terminate button 2 To remove the debug session from the Debug view right click on the debug session and select Remove All Terminated or click on the Remove All Terminated Launches button 3 in the Debug view 4 7 Multiple Debug Sessions It is possible to run multiple debug sessions To do so just repeat the steps for starting a debug session First make sure that you have terminated all debug sessions 1 From the Window menu select Preferences The Preferences dialog appears 2 Select TASKING Debugger Startup 3 Enable the option Allow multiple simultaneous debug sessions 4 Select what you want to happen When trying to start another debug session for the same configuration Select Re download to download the absolute file again or select Start new session or select Prompt to get a question each time you try to start a new session 5 Click OK 6 From the Debug menu select Debug Configurations The Debug Configurations dialog appears 7 Select the debug configuration myproject simulator and click on the Debug button T
8. installation 1 2 Starting Closing the RH850 Eclipse IDE The TASKING VX toolset for RH850 uses Eclipse as the Integrated Development environment IDE Starting the RH850 Eclipse IDE To start the RH850 Eclipse IDE 1 From the Windows Start menu select Programs TASKING VX toolset for RH850 vx yrz RH850 Eclipse IDE vx yrz The Workspace Launcher dialog appears 2 Enter the path to the workspace In the remainder of this manual we assume you use the default 3 Enable the option Use this as the default and do not ask again 4 Click OK to proceed Initially the RH850 Eclipse IDE opens with a workbench displaying the C C perspective with only the Welcome view visible This view provides some general information and alternative ways to access the online documentation e Close the Welcome view to make the other views in the perspective visible O Welcome K Your workbench should now look similar to this Getting Siarted with the TASKING VX toolset for RH850 TASKING C C RH850 Eclipse IDE vx yrz oJ File Edit Navigate Search Project Debug Window Help civ Gr Greer Sr X vigy X X X v r Quick Access E TASKING C C Fie C C Proj 3 5 Navigator O p B Outline 23 a aS Y An outline is not available El Problems amp E Console E Properties lm 0 items Description Resource Path Location Dy Type At any time you can get the Welcome view back again by selecting Welcome from the Help menu
9. project and has been removed from your project folder The original file however remains untouched at its original location e In the C C Projects view right click on the file existing c and select Delete The file existing c is no longer part of your project and has been removed from your project folder Be aware that when you remove a file from your project it always will be removed from its location in the project folder on your hard disk too 3 4 Editing Files C C Editor Editing a file Enter the following simple C source in your new source document the code deliberately contains a mistake which you will correct later on include lt stdio h gt int main void l printf Hello World n lt missing semicolon Note the following The tab label of the editor view shows an asterisk in front of the file name myfile c to indicate that the file has been modified The C C editor view uses syntax coloring The Outline view shows the structure of the file You can use this view to navigate through larger source files easily Alternatively you can expand the structure of the file in the C C Projects view e Right clicking in the editor view presents you with a list of menu commands To receive more help about the editor view make sure it is active and press F1 Saving and closing a file To save the file From the File menu select Save Citrl S 17 Getting Siarted with the T
10. which you want to import the project properties and click Finish The properties of the selected project will be replaced by the properties from the selected file 25 Getting Started with the TASKING VX toolset for RH850 26 Chapter 4 Debugging your Application This tutorial shows how to debug your application using the internal debugger Before you start with this chapter it is recommended to read the Eclipse documentation first It provides general information about the debugging process This chapter guides you through a number of examples using the TASKING debugger with simulation as target You can find the Eclipse documentation as follows 1 2 Start Eclipse From the Help menu select Help Contents The help screen overlays the Eclipse Workbench In the left pane select C C Development User Guide Open the Getting Started entry and select Debugging projects This Eclipse tutorial provides an overview of the debugging process Be aware that the Eclipse example does not use the TASKING tools and TASKING debugger 4 1 Setting up a Project for Debugging 4 1 1 Create a Sample Project 1 Create or reopen the project mypro ject as created in Section 3 1 Create a Project Use the default values and make sure that you select Hello World C project in the New C Project wizard enable at least the Debug configuration Edit the file myproject c as follows include lt stdio h gt int main void
11. with the TASKING VX toolset for RH850 this manual The TASKING Getting Started and User Guide contain specific information for the TASKING VX toolset for RH850 Its content overrides any information found in the Eclipse and CDT documentation The next chapters of this manual explain how to setup and work with a RH850 project It shows some important features of the RH850 toolset Online TASKING VX toolset for RH850 User Guide Once you are introduced to Eclipse and the RH850 toolset you can start creating your own projects The online documentation for the RH850 toolset covers the RH850 C Assembly language as well as detailed description of the various tools and options Accessing the documentation for the RH850 toolset is similar to accessing the online documentation for Eclipse 1 Start Eclipse 2 From the Help menu select Help Contents The help screen overlays the Eclipse Workbench 3 Inthe left pane select TASKING VX toolset for RH850 User Guide to access the documentation for the RH850 toolset The TASKING manuals are also available in PDF format via de Windows Start menu Browse to Start Programs TASKING VX toolset for RH850 vx y rz Manuals and select the manual you need Getting Started with the TASKING VX toolset for RH850 1 4 Related Publications C Standard e CA Reference Manual fifth edition by Samual P Harbison and Guy L Steele Jr 2002 Prentice Hall e ISO IEC 9899 1999 E Programming language
12. 0 examples The Import dialog appears 24 Setting up a Project Select the RH850 examples you want to import into the current workspace Enable the option Goto workbench after import and click Finish The original examples are copied into the current workspace The project s should now be visible in the C C Projects view You can set additional project options and build the sample projects as explained in the previous sections 3 11 Import Export Project Properties You can export project properties into a file prop so that you can import a specific configuration into a project whenever you want for example in another workspace Export project properties 1 From the File menu select Export The Export dialog appears Select TASKING C C TASKING C C Project Properties and click Next The Export TASKING C C Project Properties dialog appears Select the project and configuration from which you want to export the project properties Specify the destination properties file extension prop and click Finish The properties will be saved in the specified file Import project properties 1 From the File menu select Import The Import dialog appears Select TASKING C C TASKING C C Project Properties and click Next The Import TASKING C C Project Properties dialog appears Specify the properties file extension prop you want to import Select the destination project and configuration into
13. 0x00000842 ff80 003a jarl printf 0 printf debugging example n for mF dese at z ox00000846 a241 add 0x1 r20 2 gt m a la E Console amp gt Tasks EA E AB re o O Memoy X Gwe IE el ye ST fal ences Debug myproject Monitors dh Starting Debugger a TASKING VX toolset for RH85 debugger Build 010 Copyright 2014 Altium BV Launching configuration myproject iz m The Debug view shows your running application Because of the settings in the debug configuration execution has suspended at the first instruction in the function main The Editor view shows the C source files of your application and shows the line where the execution has suspended The Variables view shows the variables in your application in this case int i 4 3 Stepping through the Application At this moment your application is executing but suspended on the function main This means the C startup code has been executed already From this point you can step through your application while inspecting what happens 1 From the Debug menu select Step Into or press F5 or click on the Step Into button in the Debug view The highlight in the Edit view moves to the next statement 2 Press F5 again The highlight in the Edit view moves to the next statement 29 Getting Siarted with the TASKING VX toolset for RH850 In the Variables view you can inspect the value of the variable i It is now set to 1
14. 1 1 2 2 2 Installing Client Based Licenses Node Locked Floating license A floating license is a license located on a license server and can be used by multiple users on the network Floating licenses allow you to share licenses among a group of users up to the number of users seats specified in the license For example suppose 50 developers may use a client but only ten clients are running at any given time In this scenario you only require a ten seats floating license When all ten licenses are in use no other client instance can be used For information about installing a floating license see Section 1 1 2 2 1 Installing Server Based Licenses Floating or Node Locked License service types The license service type specifies the process used to validate the license The following types are possible e Client based also known as standalone The license is serviced by the client All information necessary to service the license is available on the computer that executes the TASKING product This license service type is available for node locked licenses only Server based also known as network based The license is serviced by a separate license server program that runs either on your companies network or runs in the cloud This license service type is available for both node locked licenses and floating licenses Licenses can be serviced by a cloud based license server called Remote TASKING License Server
15. ASKING VX toolset for RH850 The project will be saved To close the file From the File menu select Close Ctrl F4 Eclipse will ask you to save the files that have been modified since the last save Notice also the menu commands Save All and Close All which you can use when you are working with multiple files Opening a file in the C C editor There are several ways to open an existing file An easy way to open the C source file my file c directly in the C C editor is e In the C C Projects view double click on the file name Eclipse recognizes the file as a C source file and opens the file in the C C editor e Correct the file by entering the missing semicolon Save and close the file Opening a file in a system editor If you want to open a C source file in an application editor outside Eclipse instead of the built in C C editor proceed as follows e Inthe C C Projects view right click on the file myfile c and select Open With System Editor The file opens in the application that is associated with the file extension c 3 5 Closing Opening and Activating a Project Closing a project Like files you can close a complete project To do so 1 Inthe C C Projects view right click on the project myproject and select Close Project If there are unsaved files the Save Resources dialog appears in which you can choose which modified files need to be saved before closing the project 2 Select the files
16. E 2 1 2 Starting Closing the RH850 Eclipse IDE 2 2 2 0 cece eee e eee eee e eee ee eee eeeeeeeeeeeeeeeeeeees 5 1 3 How to Use the Documentation 0 cece eee eee eee e eee e eee teen teeta ee neaeaeee ea eteeaeeeea eens 6 1 4 Related PUbliCatloms snina E AEA E EE EEEE 8 2 Toolset OverVieW sis sccicvie dicen ineteleblbnghslias EEEE T EE EEE TE ats Aaaa 9 SP Seting Up a PRO SCE sirs ch cec ac te cateteccseesine att aaicbatena it nanchgeledsnnnse Stee nedee choseannaathadadecapetannacanles 11 3 1 Create a Project 2 2 0 ccc cececec eee eec een eeeeece eee eceeeeece sees ec ese eseeseeeeeseeeeeaeeseeseeeeeaeeeees 11 3 2 Delete a ProjeCt vcd ciniccs aeeaiiag ae A a E E E EA A E Sen A Eia 14 3 3 Manually Add a File to Your Project ssssssseeesesrerersirrrrrerrrririrtrerernirrrrernrnrrrerrens 14 3 4 Editing Files C C Editor iiris nee e eee a een teens nese s a E E a e i naian 17 3 5 Closing Opening and Activating a Project ccceeeeeeeee eee ee eee eee eee eea een eee een eeaeea eens 18 3 6 0 0 Rind 0 ne ee ee ee ee eee eee 19 3 7 Setting Project Options si ierre aa ieia Gi A ee E EE 20 3 8 Refer to Another Project from a RH850 Project ceeeeeeeeeee nets eee ee een eeeta tensa eneees 23 3 9 Build a Proje Ct saccade vaesnsedesenaadungeettandaedeute a e E a T a 23 3 10 Using the Sample Projects ceci inscannen i e a E E 24 3 11 Import Export Project Properties
17. This is a license server that is operated by TASKING Alternatively you can install a license server program on your local network Such a server is called a Local TASKING License Server You have to configure such a license server yourself The installation of a local TASKING license server is not part of this manual You can order it as a separate product SW000089 The benefit of using the Remote TASKING License Server is that product installation and configuration is simplified Unless you have an IT department that is proficient with the setup and configuration of licensing systems we recommend to use the facilities offered by the Remote TASKING License Server Preparing for First Use 1 1 2 1 Obtaining a License You need a license key when you install a TASKING product on a computer If you have not received such a license key follow the steps below to obtain one Otherwise you cannot install the software Obtaining a server based license floating or node locked e Order a TASKING product from Altium or one of its distributors A license key will be sent to you by email or on paper If your node locked server based license is not yet bound to a specific computer ID the license server binds the license to the computer that first uses the license Obtaining a client based license node locked To use a TASKING product on one particular computer with a license file Altium needs to know the computer ID that uniquely identifies you
18. a single line containing comments only e You can store the file anywhere on your hard disk but not in your project folder for example in C TEMP In Eclipse follow the next steps to import the existing file 1 Inthe C C Projects view right click on the project myproject and select Import 15 Getting Siarted with the TASKING VX toolset for RH850 The Import wizard appears 2 Select General File System Click Next to continue 3 Inthe From directory field type the path to the directory where you saved existing c for example C TEMP and click in the empty white box below The left box shows the file structure of the directory the right box shows the files located in that directory similar to the Windows Explorer 4 Inthe left box select the folder TEMP 5 Inthe right box select the file existing c 6 Click Finish to finish the wizard and import the file into your project The file existing c is copied from its location at C TEMP into your project folder and is added to your project It is now visible as a C source file in the C C Projects view Changes you make to this file will not affect the original file stored in c TEMP Also removing this file from your project will remove the file also from your project folder but the original file remains untouched Create a file in the project folder Instead of importing a file you can create the file existing c with a standard editor
19. d you try to change the configuration you are asked whether to apply the changes first 21 Getting Siarted with the TASKING VX toolset for RH850 Creating your own build configuration Because of the amount of possible options it may be very convenient to create your own build configuration 1 Click on the Manage Configurations button next to the Configuration field The Manage Configurations dialog appears 2 Click on the New button The Create New Configuration dialog appears 3 Type a Name Myconfig and optional a Description for your configuration In the Copy settings from box you can choose the initial option settings for your configuration 4 Select Existing configuration and choose the Debug configuration The existing Debug configuration is the same as the default Debug configuration because we applied the default settings in the previous example 5 Click OK The Manage Configurations dialog shows the new configuration 6 Select the new configuration Myconfig and click Set Active 7 Click OK Your new configuration has become the active configuration From now on a build will use the option settings from the Myconfig configuration Note that when you select a configuration from the Configuration field this only affects the property pages it does not make the configuration active Important the Restore Defaults button is still associated with the default Debug configuration Because the new configuration Mycon
20. e aa Environment Logging Tool Settings Build Steps T Build Artifact b Binary Parsers Error Parsers Memory Processor GS Global Options 7 Use global product directory preference Settings 4 C Compiler S eclipse home Stack Heap Preprocessing C C General Include Paths Treat warnings as errors Project References S Language E Keep temporary files Refactoring History Floating Point Verbose mode of control program Run Debug Settings 83 Code Generation Allocation Optimization 8 Custom Optimization Compilation Speed Debugging MISRA C 8 Custom 2012 GB Custom 2004 Custom 1998 a 8 CERT C Secure Coding Custom CERT C Diagnostics Miscellaneous a W Assembler Preprocessing Include Paths symbols Optimization List File Diagnostics Miscellaneous 4 amp Linker Output Format Libraries Data Objects Script File Optimization Map File Diagnostics Miscellaneous Restore Defaults Apply e On the Tool Settings tab the options are grouped in Global Options C Compiler Assembler and Linker or Archiver if you are building a library Note that the options you enter in the Assembler page are not 20 Setting up a Project only used for hand coded assembly files but also for the assembly files generated by the compiler In the Configuration field you can choose a configuration for which you want to make changes Not
21. e that this does not make the configuration active For a detailed description of all TASKING VX toolset for RH850 options refer to the TASKING VX toolset for RH850 User Guide Selecting a predefined build configuration A build configuration is a predefined set of options When you created the sample project myproject as described in Section 3 1 Create a Project you should be able to choose between the Debug and the Release configuration Both have their own settings Check this for your self 1 Select the Release configuration 2 Expand the C Compiler entry and select Debugging The option Generate symbolic debug information is set to None 3 Select the Debug configuration The option Generate symbolic debug information is set to Default Setting options and restoring defaults You can use one of the available configurations as starting point for setting your options For now choose the Debug configuration 1 Change the option Default to Full At this point you can change as many options as you like 2 Click Apply to apply the new setting s to your project The dialog does not close but the new options are saved to the Debug configuration To restore to the default Debug configuration options 1 Click the Restore Defaults button The option settings are changed to the default settings of the chosen configuration 2 Click Apply to apply the default settings to your project If you change options without applying them an
22. ears 2 Specify a source folder and a name for the new file By default the new file will be stored in the project folder in this case mypro ject If your projects contains multiple folders you can browse for an alternative source folder to store the new file in In the Source folder field make sure it refers to myproject e Inthe Source file field type the name of the new file for example myfile c Note that for C files you must specify the extension c Inthe Template field select a code template for your source file for example Default C source template or select lt None gt if you want to start with an empty file Note that you can configure your own templates if you click on the Configure button 3 Click Finish to continue The new file myfile c is created and ready for editing in the editor view Add an existing file to your project import There are three ways to add a file to your project Import a file the original file is copied to the project folder e Create a file in the project folder e Create a link in the project folder to an existing file Import a file Instead of creating a new file it is also possible to import an existing file into your project or to create a file directly in the mypro ject folder To demonstrate this follow the steps below Do not close Eclipse e First create a C source file for example existing c with a standard editor outside Eclipse As content you can for example use
23. elect New TASKING RH850 C Project The New C Project wizard appears 2 Enter a name for your project for example myproject In the Location field you will see the location where the new project will be stored To change the default location you can uncheck the Use default location check box and browse for an alternative location However use the default location for now 3 Inthe Project type box you can select whether to create an application or a library e Expand TASKING RH850 Application and select Hello World C Project This creates the file myproject c with a simple main function e Click Next to continue The RH850 Project Settings page appears 11 Getting Siarted with the TASKING VX toolset for RH850 12 CG New C Project bajes RH850 Project Settings lt gt Select a processor to continue Processor selection J Core Architecture aan RH850 FLH RH850 FLL Expand Selected RH850 P1x RH850 R1x _ Collapse Al Actions Add startup file s to the project V Add linker script file to the project O lt Back Net Finist Cancel Select the target processor for which you want to build the application For example V850E3 Afterwards you can always change the processor in the Project Properties for dialog You can choose to add a linker script file to your project Enable Add linker script file to the project This adds the file myproject 1s1 to your project which can be edited to c
24. er based and node locked licenses can be server based All server based licenses are installed using the same procedure Getting Started with the TASKING VX toolset for RH850 1 1 2 2 1 Installing Server Based Licenses Floating or Node Locked If you do not have received your license key read Section 1 1 2 1 Obtaining a License before you continue 1 6 7 If you want to use a local license server first install and run the local license server before you continue with step 2 You can order a local license server as a separate product SW000089 Install the TASKING product and follow the instruction that appear on your screen The installation program asks you to enter the license information In the License key field enter the license key you have received from Altium and click Next to continue The installation program tries to retrieve the license information from a remote TASKING license server Wait until the license information is retrieved If the license information is retrieved successfully subsequent dialogs are already filled in and you only have to confirm the contents of the dialogs by clicking the Next button If the license information is not retrieved successfully you have to enter the information by hand Select your License type and click Next to continue You can find the license type in the email or paper that contains the license key Select Remote TASKING license server to use one of the remote TASKING lice
25. fig is based on the Debug configuration the defaults of the Debug configuration also apply to the Myconfig configuration Creating your own defaults The previous example showed how to create your own build configuration to store settings However it was impossible to return to your own defaults only the original Debug and or original Release defaults were available Below it is described how you can create your own defaults Basically you create a configuration A in which you set your own defaults then you create a new configuration B which will be based on configuration A If you have found a satisfying combination of option settings you can create a configuration named Mydefaults 1 First change the option settings to your own needs 22 Setting up a Project 2 Repeat steps 1 through 7 of Creating your own build configuration but in step 3 type the name Mydefaults Normally any settings you change from here are saved to Mydefaults thus loosing your original defaults To prevent this 1 Repeat steps 1 through 3 of Creating your own build configuration to create a second new configuration and name it Myworkoptions The name suggests that this will be the configuration for experimentally changing option settings 2 Select Existing configuration and choose the Mydefaults configuration Your new working configuration is now the same as the configuration named Mydefaults 3 Click OK The Manage Configurations dialog show
26. he debug session launches 8 Repeat steps 1 and 2 but in step 2 choose myproject board There are now two debug sessions for the same application In case you have multiple projects you can make dedicated debug configurations for them You can use these debug configurations to run multiple debug sessions at the same time Each session uses its own FSS view for output In the Debug view you can select the debug session or file in the debug session for which you want to inspect for example the value of its variables in the Variables view 32
27. ile 151 relocatable linker object file out Intel Hex ELF DWARF Motorola S record absolute object file absolute object file absolute object file hex elf Sre All tools are described in detail in the TASKING VX toolset for RH850 User Guide 10 Chapter 3 Setting up a Project This tutorial shows how to create an embedded software project with the RH850 toolset It lets you create your own project with a simple Hello World example By now you should be familiar with the Eclipse workbench perspectives and views If you are not please read the Eclipse documentation as described in Section 1 3 How to Use the Documentation 3 1 Create a Project Set the TASKING C C perspective Before creating a RH850 project it is necessary to have the TASKING C C perspective on the workbench By default this should be the case when you start Eclipse but if it is not do the following 1 Start Eclipse Eclipse starts with the last saved workbench layout 2 To open the TASKING C C perspective from the Window menu select Open Perspective Other TASKING C C The name of the perspective is displayed in the title bar of the workbench window If you attempt to create a RH850 project while the TASKING C C perspective is not active Eclipse will ask you to activate the TASKING C C perspective after you finish the New C Project wizard Create a RH850 project with the New C Project wizard 1 From the File menu s
28. ll be built Removes all intermediate files that are created during a build As a consequence the next build cannot rely on existing results from previous builds thus simulating a rebuild If you set this option the selected project will be built automatically after each applied change in the project properties and after each saved change in the source files This way of building is not recommended for C C development In order for this option to work you must also enable option Build on resource save Auto build on the Behaviour tab of the C C Build page of the Project Properties for dialog Builds the active project Rebuilds the active project This builds every file in the project whether or not a file has been modified since the last build A rebuild is a clean followed by a build 3 10 Using the Sample Projects The TASKING VX toolset for RH850 comes with a number of examples delivered in the directory lt RH850 installation path gt examples Each directory contains a file readme txt with information about the example You can import the RH850 examples via the Welcome page This is an alternative for importing existing projects via the File Import TASKING C C TASKING RH850 Example Projects wizard Import an existing project from the Welcome page 1 From the Help menu select Welcome The Welcome page appears 2 Click the following button The Welcome Samples page appears 3 Click RH85
29. llowing e In the Breakpoints view disable a breakpoint by clearing the check box In the Editor view right click on a breakpoint dot in the margin and select Disable Breakpoint The blue breakpoint dot turns white 30 Debugging your Application Remove breakpoints To completely remove the breakpoint do one of the following Inthe Breakpoints view right click on a breakpoint and select Remove In the Editor view right click on a breakpoint dot in the margin and select Toggle Breakpoint e Inthe Editor view double click on a breakpoint The blue breakpoint dot disappears Example With the techniques described above 1 Seta line breakpoint on the code line printf a small dst n i 3 2 Clear the FSS view 3 Restart your application The application suspends when entering the main function because this was defined in the Debug configuration 4 To resume execution from the Debug menu select Resume or press F8 or click on the Resume button Ul in the Debug view The application suspends execution before this line is executed The FSS view now shows il 2 3 Hello world this is 5 Resume execution again to finish execution Note that though the application has finished execution it has not been terminated yet Your debug session is still active 4 5 Reload Current Application When your application had changed for example because you solved a bug you can reload the application in the
30. nse servers or select Local TASKING license server for a local license server The latter requires optional software For local license server only specify the Server name and Port number of the local license server Click Finish to complete the installation 1 1 2 2 2 Installing Client Based Licenses Node Locked If you do not have received your license key and license file read Section 1 1 2 1 Obtaining a License before continuing 1 Install the TASKING product and follow the instruction that appear on your screen The installation program asks you to enter the license information In the License key field enter the license key you have received from Altium and click Next to continue The installation program tries to retrieve the license information from a remote TASKING license server Wait until the license information is retrieved If the license information is retrieved successfully subsequent dialogs are already filled in and you only have to confirm the contents of the dialogs by clicking the Next button If the license information is not retrieved successfully you have to enter the information by hand Select Node locked client based license and click Next to continue In the License file content field enter the contents of the license file you have received from Altium Preparing for First Use The license data is stored in the file licfile txt in the etc directory of the product 5 Click Finish to complete the
31. outside Eclipse and store it directly in the myproject folder To add the file to your project e In the C C Projects view right click on myproject and select Refresh The file existing c should now be visible as part of your project Create a link in the project folder to an existing file The third way to add a file to your project is to create a link to an existing file which is stored on a different location 1 Inthe C C Projects view right click on the project myproject and select New File from Template The New File wizard appears 2 Select the project folder in which to create the link type the name of your project myproject or select the project in the box below 3 Inthe File name field enter a name for the link for example link2existing c 4 Click the Advanced gt gt button Additional options appear on the dialog to let you create a link to an existing file 5 Enable the option Link to file in the file system 6 Browse to the location where existing c is located select this file and click the Open button 7 Click Finish to finish the wizard and create the link to the file in your project 16 Setting up a Project Remove a file or link from your project As we do not need this file for the remainder of this tutorial we can safely remove it again from the project e Inthe C C Projects view right click on the file 1ink2existing c and select Delete The link 1ink2existing c is no longer part of your
32. perspective is associated with the TASKING C C Debugger Because the TASKING C C perspective is still active Eclipse asks to open the TASKING Debug perspective 2 Optionally enable the option Remember my decision and click Yes The debug session is launched This may take a few seconds 28 Debugging your Application TASKING Debug myproject myproject c RH850 Eclipse IDE vi yrz en foe File Edit Source Refactor Navigate Search Project Debug Window Help ri m ifimty Sy G Srid R MGW Si Fi WAGON EN AQRH S HiOVK H eeror Quick Access E E TASKING C C 3B TASKING Debug F Debug 5S i gt Y Gi 00 Variables 53 2o Breakpoints att Registers 23 X dame 4 myproject TASKING C C Debugger s B T3 c4 7 Group Core z 4 RH850 Simulator V850E3 6 19 14 11 45 AM Su Name Value 4 gi Thread RH850 Suspended c Pn oh Name Value Usage 1 main myproject c 3 0x00000834 Ll SEEE n 0x0 a 2_STARTO 0x0000001e a oo 2 0x0 B Oxfedeel80 al Oxfedec000 m r myproject c 53 6 le Disassembly 53 BE Outline im include lt stdio h gt Address 0100000834 int main void int main void wii 0x00000834 0780 0821 prepare r20 1p 0x for i 1 i lt 3 i for i 1 i lt 3 i E 0x00000838 a201 mov 0x1 r20 printf d n i printf d n i R 0x0000083a 0626 0024 0000 mov 0x24 r6 pees aie O 0x00000840 3814 mov r20 r7 aipe a pade ae eee 3
33. r assembly source input files amk Make utility which supports parallelism and utilizes the multiple cores found on modern host hardware ar850 Archiver With this utility you create and maintain library files with relocatable object modules o generated by the assembler hidump850 High level language HLL object dumper With this utility you can dump information about an object file Key features are a disassembler with HLL source intermixing and HLL symbol display and a HLL symbol listing of static and global symbols expire850 A utility to limit the size of the cache by removing all files older than a few days or by removing older files until the total size of the cache is smaller than a specified size The individual steps of the development flow are show below The C compiler takes the following files for input and output Csource file compiler intermediate file mil assembly file SIC The assembler takes the following files for input and output assembly file SIC assembler relocatable object file 0 assembly file asm hand coded listfile 1st errormessages ers The linker takes the following files for input and output Getting Started with the TASKING VX toolset for RH850 relocatable objectfiles o relocatable linker object file out relocatable object library a linker map file map Saana error messages elk memory definition file mdf linker script f
34. r computer You can do this with the getcid program that is available on the TASKING website The detailed steps are explained below 1 Download the getcid program from htip www tasking com 2 Execute the getcid program on the computer on which you want to use a TASKING product The tool has no options For example C Tasking getcid Computer ID 4XrC ScSR yGG JxJ5 The computer ID is displayed on your screen 3 Order a TASKING product from Altium or one of its distributors and supply the computer ID A license key and a license file will be sent to you by email or on paper When you have received your TASKING product you are now ready to install it 1 1 2 2 Installing a License The license setup procedure is done by the installation program If the installation program can access the internet then you only need the licence key Given the license key the installation program retrieves all required information from the remote TASKING license server The install program sends the license key and the computer ID of the computer on which the installation program is running to the remote TASKING license server no other data is transmitted If the installation program cannot access the internet the installation program asks you to enter the required information by hand If you install a node locked client based license you should have the license file at hand see Section 1 1 2 1 Obtaining a License Floating licenses are always serv
35. reate the project The project has now been created and is the active project If you click on the Build myproject button the project is built and should give no errors or warnings The left hand pane of the Workbench window has two views The C C Projects view shows the structure of your projects complete with all files that are used in the project 13 Getting Started with the TASKING VX toolset for RH850 The Navigator view lets you navigate through the physical project folder and project files on your hard disk The navigator view does not show the include files needed for your project because these files are stored in the general include folder not in your project folder In the standard Eclipse documentation about the workbench is described how you can move and organize views on your workbench 3 2 Delete a Project The project as you just created is stored as a subfolder named myproject in the folder C Documents and Settings user workspace_c850_version Windows XP or in the folder C Users user workspace_c850_version Windows 7 or higher To delete a project it needs to be properly removed from the workbench To delete the project which you just created 1 Inthe C C Projects view right click on the name of the project myproject and select Delete A dialog appears which asks for confirmation 2 Enable Delete project contents on disk cannot be undone This will remove your project from the workbench and
36. s C ISO IEC More information on the standards can be found at hitp www ansi org CERT C Secure Coding Standard e The CERT C Secure Coding Standard by Robert C Seacord October 2008 Addison Wesley e The CERT C Secure Coding Standard web site htip www securecoding cert org For general information about CERT secure coding see hitp www cert org secure coding MISRA C e MISRA C 2012 Guidelines for the use of the C language in critical systems MIRA Ltd 2013 See also http www misra c com e MISRA C 2004 Guidelines for the Use of the C Language in Critical Systems MIRA Ltd 2004 See also http www misra c com e Guidelines for the Use of the C Language in Vehicle Based Software MIRA Ltd 1998 See also http Awww misra org uk RH850 e RH850 Family User s Manual Renesas e RH850 Compiler ABI Specification Renesas e V850E3v5 Architecture Specification 7th edition Renesas Chapter 2 Toolset Overview The following table contains an overview of the tools that are part of the TASKING VX toolset for RH850 c850 C compiler The C compiler translates your C source input file into an assembly file as850 Assembler The assembler translates assembly source input files into object files 1k850 Linker The links and locates object files and libraries into one absolute ELF file cc850 Control program The control program invokes all tools in the toolset and lets you quickly generate an absolute object file from C and o
37. s manual TASKING VX toolset for RH850 and RH850 toolset are used as synonyms 1 1 Installing the Software This section describes the installation of the embedded software for Windows It also describes how to license the software 1 1 1 Installation for Windows System Requirements Before installing make sure the following minimum system requirements are met e Windows 8 Windows 7 or Windows XP 2 GHz Pentium class processor e 1 GB memory 3 GB free hard disk space e Screen resolution 1024 x 768 or higher Installation 1 Insert the TASKING VX toolset CD ROM into the CD ROM drive 2 If the installation program does not start automatically browse to your CD ROM drive and run the program setup exe The TASKING Setup dialog box appears 3 Select a product and click on the Install button 4 Follow the instructions that appear on your screen Getting Started with the TASKING VX toolset for RH850 1 1 2 Licensing TASKING products are protected with TASKING license management software To use a TASKING product you must install that product and install a license The following license types can be ordered from Altium Node locked license A node locked license locks the software to one specific computer so you can use the product on that particular computer only For information about installing a node locked license see Section 1 1 2 2 1 Installing Server Based Licenses Floating or Node Locked and Section
38. s the new configuration 4 Select the new configuration Myworkoptions and click Set Active 5 Click OK Now you can work with the Myworkoptions configuration If you want to return to your defaults you can either make the Mydefaults configuration active or create a new configuration using the Mydefaults configuration to copy the settings from 3 8 Refer to Another Project from a RH850 Project To tell a RH850 project that another project for example a MIL library project should be part of it you need to create a project reference 1 Inthe C C Projects view right click on the name of a RH850 project and select Properties The Properties dialog appears 2 Inthe left pane select Project References 3 Inthe right pane select the project that must be part of the RH850 project and click OK 3 9 Build a Project When you build a TASKING RH850 C project in Eclipse the TASKING VX toolset for RH850 compiler assembler and linker are used to compile and link all the source code and the libraries associated with the project To build a project From the Project menu select Build myproject From the Project menu the following Build commands are available 23 Getting Started with the TASKING VX toolset for RH850 Build Project Build Working Set Clean Build Automatically Build project Rebuild project Builds the selected project Opens a wizard in which you can create a customized set of files that wi
39. t dialog appears 3 Enter a name for your new project for example Copy of myproject In the Location field you will see the location where the copy of your project will be stored To change the default location you can uncheck the Use default location check box and browse for an alternative location However use the default location for now 4 Click OK to continue Eclipse makes a copy of the project renames the LSL file and updates the project configuration and launch configurations In the C C Projects view the project Copy of myproject is now visible as a closed map and is the active project 19 Getting Siarted with the TASKING VX toolset for RH850 3 7 Setting Project Options Now you are familiar with opening and editing files in your project and you have selected a target configuration we will have a look at the options you can set for building your project First make sure the project myproject is open To access the options for your project 1 From the Project menu select Properties for Alternatively you can click the 2 button The Properties for myproject dialog appears 2 If not selected expand C C Build and select Settings to access the RH850 tool settings A screen similar to the following should now appear C Properties for myproject Co See type filter text Settings or x Resource Builders a C C Build Configuration Debug Active Manage Configurations Build Variables ar
40. ustomize linking and locating If you do not add the linker script file here you can always add it later with File New Linker Script File LSL For details on changing the linker script file refer to the TASKING VX toolset for RH850 User Guide Click Next The Target Settings page appears Setting up a Project J New C Project Target Settings gt Create a configuration to launch the debugger Name myproject Target gt Initialization E Project Arguments 7 Source Miscellaneous Target settings Show all targets Show targets for V850E3 Target RH850 Simulator w Configuration Connection settings Connection Simulator Z J Settings Field Value Edit V Add launch configuration to the project Next Finish Cancel 7 In order to debug your project you need to create a debug configuration Select a target You can select a target board or a simulator For this example we select the RH850 Simulator Optional If you selected a target board specify the Configuration and Connection settings For the simulator you can skip this Enable Add launch configuration to the project This allows you to debug your project e Leave the other tabs as is For more information see section Creating a Customized Debug Configuration in Chapter Using the Debugger of the TASKING VX toolset for RH850 User Guide 8 Click Finish to finish the wizard and to c
41. you want to be saved and click OK to continue Any selected unsaved files are saved first then the project closes In the C C Projects view the project myproject is now visible as a closed map 18 Setting up a Project Opening a project To reopen the project again In the C C Projects view right click on the project myproject and select Open Project The project is open for modifications again You may need to expand the project structure to view its contents Activating a project The project related menu items and buttons act on the currently active project When you create a new project the new project automatically becomes the active project If you want to work with another project you have to make it active first To make a project active Inthe C C Projects view right click on the project myproject and select Set Active Project The project is now active This is mentioned after the project name Project properties build and debug will act on this active project 3 6 Copy a Project If you want to use a project as a starting point for a new project you can make a copy of a project Not only a copy of a project is made but also the project specific filenames and settings will reflect the new project name To copy a project 1 Inthe C C Projects view right click on the project myproject and select Copy 2 Inthe C C Projects view right click on the project myproject and select Paste The Copy Projec
Download Pdf Manuals
Related Search
Related Contents
Mode d´emploi - Campingaz Shop FRANÇAIS MODE D`EMPLOI ERA® PickUp™ Composite d`attache Owners Manual Nissan Armada 2008-up Nissan Pathfinder LE 取扱説明書 (操作編) Manual do produto Enterotoxigenic E. Coli (ETEC) Real Time PCR Kit User Manual For Remote Control Wireless Switch & Controllers UDG 4500715 JVC KW-NT30HD Copyright © All rights reserved.
Failed to retrieve file