© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.

Slides:



Advertisements
Similar presentations
Renesas Technology America Inc. 1 SKP8CMINI-15,17 Tutorial 2 Creating A New Project Using HEW4.
Advertisements

Code Composer Department of Electrical and Computer Engineering
© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Using Macros and Visual Basic for Applications (VBA) with Excel
Developing an Excel Application
Tutorial 8: Developing an Excel Application
Tutorial 12: Enhancing Excel with Visual Basic for Applications
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
Chapter 7: User-Defined Functions II
Lab6 – Debug Assembly Language Lab
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
COSC 120 Computer Programming
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Chapter 6. 2 Objectives You should be able to describe: Function and Parameter Declarations Returning a Single Value Pass by Reference Variable Scope.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
VMware vCenter Server Module 4.
Introduction Purpose Objectives Content Learning Time
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Lecture 6 Assembler Directives. 2  Code generation flow  Assembler directives—Introduction  Segment control  Generic segment (SEGMENT, RSEG)  Absolute.
Chapter 2 Software Tools and Assembly Language Syntax.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
Chapter 4 Code Editor Goals and Objectives Program more efficiently? How can you speed up your development process? Do you want to learn useful shortcuts.
© 2010 Delmar, Cengage Learning Chapter 7 Using Styles and Style Sheets for Design.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course provides an overview of the installation and.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
A Simple Two-Pass Assembler
1 C Programming Language Review and Dissection I: Overview, Static and Automatic Variables, and Program Control Flow These lecture notes created by Dr.
Operator Precedence First the contents of all parentheses are evaluated beginning with the innermost set of parenthesis. Second all multiplications, divisions,
Introduction Purpose This course describes the process of installing the KPIT GNU toolchain on your PC. Objective Learn how easy it is to get information.
chap13 Chapter 13 Programming in the Large.
Chapter 6 Advanced Report Techniques
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in.
Copyright 2001 Oxford Consulting, Ltd1 January Storage Classes, Scope and Linkage Overview Focus is on the structure of a C++ program with –Multiple.
A First Book of C++: From Here To There, Third Edition2 Objectives You should be able to describe: Function and Parameter Declarations Returning a Single.
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 3: Customizing Document Elements.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  The course describes the performance analysis and profiling tools.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Linux Operations and Administration
C++ History C++ was designed at AT&T Bell Labs by Bjarne Stroustrup in the early 80's Based on the ‘C’ programming language C++ language standardised in.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This training course provides an overview of the CPU architecture.
Fundamentals of C and C++ Programming. EEL 3801 – Lotzi Bölöni Sub-Topics  Basic Program Structure  Variables - Types and Declarations  Basic Program.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
Programmable Logic Training Course HDL Editor
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training module provides an overview of debugging features.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This course gives an overview of the Toolchain feature of the High.
Table of Contents TopicSlide Administrator Login 2 Administrator Navigations 3 Managing AlternativeDr.com Blogs 4 Managing Dr. Lloyd May Blogs 5 Managing.
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
S11-1 ADM , Section 11, August 2005 Copyright  2005 MSC.Software Corporation SECTION 11 MACROS: OVERVIEW.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
1 Introduction Purpose  This course gives an overview of assembler settings of the High-performance Embedded Workshop (HEW), used for developing software.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This course explains how to use Mapview, a utility program for the.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course describes Coverage, a utility that is used.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the Project Generator function.
Chapter 28. Copyright 2003, Paradigm Publishing Inc. CHAPTER 28 BACKNEXTEND 28-2 LINKS TO OBJECTIVES Table Calculations Table Properties Fields in a Table.
Creating Web Pages with Links, Images, and Embedded Style Sheets
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
Lecture 3 Translation.
2 At the top of the zone in which you want to add the Web Part, click Add a Web Part. In the Add Web Parts to [zone] dialog box, select the check box of.
2 At the top of the zone in which you want to add the Web Part, click Add a Web Part. In the Add Web Parts to [zone] dialog box, select the check box of.
Introduction Purpose Objectives Content Learning Time
Assembler Directives Code generation flow
SECTION 3 MACROS: OVERVIEW.
Lecture 6 Assembler Directives.
Using Templates and Library Items
Presentation transcript:

© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options of the High-performance Embedded Workshop (HEW), a key tool for developing software for embedded systems that use microcontrollers (MCUs) from Renesas Technology Corp. Objectives  Learn about the five main categories of C/C++ compiler configuration options that HEW provides.  Understand how to configure each of these options Content  43 pages  5 questions Learning Time  60 minutes Introduction

© 2008, Renesas Technology America, Inc., All Rights Reserved 2 Click on Build  Select H8 Standard Toolchain… Invoking C/C++ Configuration C/C++ settings for a specific project/ files configuration can be selected here. Here are the corresponding command line entries for all settings in the HEW linker dialog.

© 2008, Renesas Technology America, Inc., All Rights Reserved 33 Five categories of options Options in C/C++ Compiler To configure the source-file related information; for example, location of the include files, etc. To configure the type of output format for source files, section specification for source files, etc. To configure the optimization for the C and C++ files during compilation To configure the optimization for the C and C++ files during compilation To select the type of listing file generated for C and C ++ files. To select the type of listing file generated for C and C ++ files. To configure other miscellaneous options To configure other miscellaneous options 1. Source 2. Object 3. List 4. Optimize 5. Other 1. Source 2. Object 3. List 4. Optimize 5. Other

© 2008, Renesas Technology America, Inc., All Rights Reserved 4 Source settings  Include file directories  PreInclude files  Defines  Messages  Message level  File inline path Overview of Source Category

© 2008, Renesas Technology America, Inc., All Rights Reserved 5 Source settings  Include file directories - Specifies path for include files  PreInclude files - Specify an include file that will be inserted into head of a C/C++ source file  Defines - Specify definitions of macro names; e.g., #define DEBUG 1 Includes, Preincludes, Defines

© 2008, Renesas Technology America, Inc., All Rights Reserved 6 Display of Information Messages Source settings  Messages - Configures the information- level messages to be displayed during compilation - Default: Unchecked to keep build output messages as clean as possible Example (command line) ch38 -nomessage=5, test.c

© 2008, Renesas Technology America, Inc., All Rights Reserved 7 Adjusting the Level of Messages Source settings  Message level - Changes message level of different types of messages that are displayed during compilation - Available settings: - Default - Information - Warning - Error - Custom (such as, error=200) User’s Manual H8S, H8/300 Series C/C++ Compiler, Assembler, Optimizing Linkage Editor User’s Manual”.

© 2008, Renesas Technology America, Inc., All Rights Reserved 8 Inter-file Inline Expansion Source settings  File inline path* can be used to add location of files for inter-file inline expansion - Add, insert, and remove the path in the list box - Set path priority - Double-click on path to modify the entry in the “Include Files Directory” * Available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option * Available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option

© 2008, Renesas Technology America, Inc., All Rights Reserved 10 Five categories of options Options in C/C++ Compiler To configure the source-file related information; for example, location of the include files, etc. To configure the type of output format for source files, section specification for source files, etc. To configure the optimization for the C and C++ files during compilation To configure the optimization for the C and C++ files during compilation To select the type of listing file generated for C and C ++ files. To select the type of listing file generated for C and C ++ files. To configure other miscellaneous options To configure other miscellaneous options 1. Source 2. Object 3. List 4. Optimize 5. Other 1. Source 2. Object 3. List 4. Optimize 5. Other

© 2008, Renesas Technology America, Inc., All Rights Reserved 11 Overview of Object Category Object settings  Choose Output file type  Configure Section  Select Multiply/Divide operation specification  Select Template  Choose Data string storage location  Specify variables boundary alignment  Modify output directory  Select generate debug information choice

© 2008, Renesas Technology America, Inc., All Rights Reserved 12 Files Generated by the Compiler Object settings  Output file type - Machine code - Assembly source code - Preprocessed source file* * When this option is selected, no object code is generated, so many of the toolchain settings options no longer apply. * When this option is selected, no object code is generated, so many of the toolchain settings options no longer apply.

© 2008, Renesas Technology America, Inc., All Rights Reserved 13 Section Names Can Be Entered Object settings  Options for Section configuration - Program code section - Const data section - Data section - Un-initialized data section

© 2008, Renesas Technology America, Inc., All Rights Reserved 14 Multiply/Divide Operations Object settings  Multiplication and division operations can be handled in different ways - Based on ANSI* - Non ANSI* - Non ANSI ver6.0* * Available only for the following CPUs: H8/300 H8/300H H8S with Legacy=v4 option * Available only for the following CPUs: H8/300 H8/300H H8S with Legacy=v4 option

© 2008, Renesas Technology America, Inc., All Rights Reserved 15 Specify Template Instances Object settings  Five choices for conditions for generating Template instances - None - Static - Used - All - Auto

© 2008, Renesas Technology America, Inc., All Rights Reserved 16 String Data Storage Location Object settings  Store string data in - Const section - Data section

© 2008, Renesas Technology America, Inc., All Rights Reserved 17 Variables Alignment Boundary Object settings  Group by alignment - None - Auto - 4byte

© 2008, Renesas Technology America, Inc., All Rights Reserved 19 Five categories of options Options in C/C++ Compiler To configure the source-file related information; for example, location of the include files, etc. To configure the type of output format for source files, section specification for source files, etc. To configure the optimization for the C and C++ files during compilation To configure the optimization for the C and C++ files during compilation To select the type of listing file generated for C and C ++ files. To select the type of listing file generated for C and C ++ files. To configure other miscellaneous options To configure other miscellaneous options 1. Source 2. Object 3. List 4. Optimize 5. Other 1. Source 2. Object 3. List 4. Optimize 5. Other

© 2008, Renesas Technology America, Inc., All Rights Reserved 20 Overview of List Category List Settings  Generate list file* - Determines whether or not list file is generated - If selected, enables various options * Not available when Preprocessed source file is selected for the Output file type

© 2008, Renesas Technology America, Inc., All Rights Reserved 21 List File Tab Size, Contents List Settings  File tab size  Contents - Object list - Statistics - Allocation information - Source code listing - After preprocessor expansion

© 2008, Renesas Technology America, Inc., All Rights Reserved 22 Five categories of options Options in C/C++ Compiler To configure the source-file related information; for example, location of the include files, etc. To configure the type of output format for source files, section specification for source files, etc. To configure the optimization for the C and C++ files during compilation To configure the optimization for the C and C++ files during compilation To select the type of listing file generated for C and C ++ files. To select the type of listing file generated for C and C ++ files. To configure other miscellaneous options To configure other miscellaneous options 1. Source 2. Object 3. List 4. Optimize 5. Other 1. Source 2. Object 3. List 4. Optimize 5. Other

© 2008, Renesas Technology America, Inc., All Rights Reserved 23 Overview of Optimize Category Optimization settings  Enable optimization*  Select type of optimization: Speed or Size  Configure details optimization  Configure Switch statement generation  Configure Function calls indirect addressing mode  Specify Data access mode  Select Generate file for inter-module optimization choice * Not available when Preprocessed source file is selected for the Output file type

© 2008, Renesas Technology America, Inc., All Rights Reserved 24 Choice of Optimization Type Optimization settings  Size oriented*  Speed oriented* Like other compiler options, you can set different optimizations for individual files by first selecting them in the left-hand navigation pane before changing the option. * Not available when Preprocessed source file is selected for the Output file type Size option does not provide a Configuration option

© 2008, Renesas Technology America, Inc., All Rights Reserved 25 Speed Optimization Choices Optimization Settings  For Speed only - Register - Switch judgment - Shift to multiple - Structure assignment - Expression - Loop optimization - Loop unrolling - Inline function

© 2008, Renesas Technology America, Inc., All Rights Reserved 26 Switch Statement Generation Optimization settings  Options for generating code for switch statements apply to both Speed and Size optimization - Auto - If then - Table

© 2008, Renesas Technology America, Inc., All Rights Reserved 27 Memory Indirect Addressing Optimization settings  For Size optimization, Function calls can be made using different memory indirect addressing modes (None) - (Normal)  section “$INDIRECT” - (Extended)  section“$EXINDIRECT” Extended Normal None

© 2008, Renesas Technology America, Inc., All Rights Reserved 28 Access Statically Allocated Data Optimization settings  Data access modes for Size optimization  None  8-bit absolute addressing  16-bit absolute addressing

© 2008, Renesas Technology America, Inc., All Rights Reserved 29 Optimize Details: 3 Categories Optimization settings  Inline*  Global variables  Miscellaneous * Available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option * Available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option

© 2008, Renesas Technology America, Inc., All Rights Reserved 30 Treatment of Global Variables Optimization settings  Four choices for levels: - Level 1 - Level 2 - Level 3 - Custom* * Available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option * Available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option

© 2008, Renesas Technology America, Inc., All Rights Reserved 31 Global Variable Custom Settings Optimization settings  Specify optimizing range - All* - No loop* - No block* * These “Custom” settings are available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option * These “Custom” settings are available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option

© 2008, Renesas Technology America, Inc., All Rights Reserved 32 Customize Register Allocations Optimization settings  Allocate registers to global variables - Disable* - Enable* - Default* * Available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option * Available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option * These “Custom” settings are available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option * These “Custom” settings are available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option

© 2008, Renesas Technology America, Inc., All Rights Reserved 33 Propagation of Global Variables Optimization settings  Propagate variables which are const qualified - Disable* - Enable* - Default* Example const int x = 1; int A; void f() { A = x; } void f() { A = 1; /* x = 1 is propagated */ } * These “Custom” settings are available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option * These “Custom” settings are available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option

© 2008, Renesas Technology America, Inc., All Rights Reserved 34 Miscellaneous Category Optimization settings  Select Delete vacant-loop choice*  Specify maximum unroll factor*  Select Allocate registers to structure choice*  Select Inline memcpy/strcpy choice** ** Available only for the following CPUs: AE5 H8SX ** Available only for the following CPUs: AE5 H8SX * Available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option * Available only for the following CPUs: AE5 H8SX H8S without Legacy=v4 option

© 2008, Renesas Technology America, Inc., All Rights Reserved 35 Five categories of options Options in C/C++ Compiler To configure the source-file related information; for example, location of the include files, etc. To configure the type of output format for source files, section specification for source files, etc. To configure the optimization for the C and C++ files during compilation To configure the optimization for the C and C++ files during compilation To select the type of listing file generated for C and C ++ files. To select the type of listing file generated for C and C ++ files. To configure other miscellaneous options To configure other miscellaneous options 1. Source 2. Object 3. List 4. Optimize 5. Other 1. Source 2. Object 3. List 4. Optimize 5. Other

© 2008, Renesas Technology America, Inc., All Rights Reserved 37 Overview of “Other” Category “Other” Settings  Miscellaneous options  User defined options

© 2008, Renesas Technology America, Inc., All Rights Reserved 38 Additional Settings Choices “Other” Settings  Miscellaneous options - Allow comment nest - Check EC++ language* - Interrupt handler saves/restores MACH and MACL registers - Enum treatment - Register variable increase - Put common sub-expression on register temporarily * Must be enabled if EC++ library is used.

© 2008, Renesas Technology America, Inc., All Rights Reserved 39 Misc. and User Defined Choices “Other” settings  Miscellaneous options - Use EEPMOV in block copy - Loop condition treatment - Suppress #line - Enable register declaration - Obey ANSI specification*  User defined options - change_message= error Use EEPMOV in block copy Disable optimization of loop iteration condition Suppress #line Enable register definition Use EEPMOV in block copy Disable optimization of loop iteration condition Suppress #line Enable register definition * Valid only for AE5, H8SX, and H8S without Legacy=v4 option CPU types. Invalid if Preprocessed source file is selected for Output file type Generate your own options here.

© 2008, Renesas Technology America, Inc., All Rights Reserved 40 C/C++ Configuation Flexibility Toolchain configuration options  Apply settings to match your needs - To specific files - To entire C files only - To entire C++ files only If HEW displays the set of files or folder you have selected in a gray color rather than tan, those files have multiple settings.

© 2008, Renesas Technology America, Inc., All Rights Reserved 43 Categories for C/C++ files configuration What the many various settings are and do Application of toolchain configuration Course Summary Download a free evaluation copy of HEW at: