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.

Slides:



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

CS 450 MPX P ROJECT Introduction to Turbo C. W HY USE T URBO C? Many ANSI C compilers are available for free, however they lack certain features that.
Code Composer Department of Electrical and Computer Engineering
Excel Tutorial 6 Managing Multiple Worksheets and Workbooks
Accounts Payable–1099 Processing 1Freedom Systems – Accounts Payable – 1099 Processing WELCOME TO THE ACCOUNTS PAYABLE – 1099 PROCESSING WEBINAR WE WILL.
Lab6 – Debug Assembly Language Lab
Microsoft Windows Vista Chapter 6 Customizing Your Computer Using the Control Panel.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
LAUNCHXL2-RM57L – Project 0
Using PDG with e2studio: Example
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
Using the File Manager WebCT 6. Understanding File Manager The File Manager is the area where all course files are stored. Whenever you link a file in.
1 Introduction to Programming Environment Using MetroWerks CodeWarrior and Palm Emulator.
Inventory Throughout this slide show there will be hyperlinks (highlighted in blue) follow the hyperlinks to navigate to the specified Topic or Figure.
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 1 Introduction.
M16C/Tiny SKP Tutorial 1 Software Development Process using HEW4
Working with SharePoint Document Libraries. What are document libraries? Document libraries are collections of files that you can share with team members.
Introduction Purpose Objectives Content Learning Time
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
TrendReader Standard 2 This generation of TrendReader Standard software utilizes the more familiar Windows format (“tree”) views of functions and file.
The instructor presents the 1st 9 slides
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
USING REFWORKS Fall What is RefWorks? A web-based bibliographic and database manager Creighton University faculty, students, and staff have access.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course provides an overview of the installation and.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
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.
IT 211 Project Integration and Deployment Lab #11.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in.
Creating your own form from scratch.. To create a custom form, you can modify an existing form or design and create a form from scratch. In either case,
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
Creating Multimedia Interaction with Windows Media Technologies 7.
Duty Log and Chat Setup SSG Frese, Jerome S. Sensor Manager Cell 12 MDD.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
® 2-2 Projects 2.1Projects Overview Bootable Projects and VxWorks Configuration Integrated Simulator Downloadable Projects Build Specifications.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
1. Profile settings 2. Messaging system 3. Downloading files 4. Uploading files 5. Creating groups 6. Calendar events.
Alerts Manager Refer to Slide 2 for instructions on how to view the full-screen slideshow.Slide 2.
Active-HDL Interfaces Debugging C Code Course 10.
© 2012 The McGraw-Hill Companies, Inc. All rights reserved. word 2010 Chapter 3 Formatting Documents.
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
From Scratch: Open CCS Exit and restart CCS Click Browse to create a new workspace directory.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
LATTICE TECHNOLOGY, INC. For Version 10.0 and later XVL Web Master Tutorial For Version 10.0 and later.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco PublicPT Advanced 1 Packet Tracer: Advanced Session.
Using Advanced Options Lesson 14 © 2014, John Wiley & Sons, Inc.Microsoft Official Academic Course, Microsoft Word Microsoft Word 2013.
© 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.
Using This PowerPoint This PowerPoint presentation assumes your Computer Science teacher has provided you with the InstallingJava folder, which contains.
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.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
What Is Firefox? __________ is a Web ___________ that you use to search for and view Web pages, save pages for use in the future, and maintain a list.
Customize Your View of Data Training Presentation for Supply Chain Platform: BAE Systems May 2015.
Invoices and Service Invoices Training Presentation for Raytheon Supply Chain Platform (RSCP) April 2016.
How to Create eInvoices in SCP-RR Training Presentation for Supply Chain Platform: Rolls-Royce January 2016.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
Introduction Purpose Objectives Content Learning Time
Exploring Microsoft® Access® 2016 Series Editor Mary Anne Poatsy
Software Setup & Validation
Presentation transcript:

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 Updated:14 March 2005

14 March HEW4 M16C/Tiny Tutorial 2Overview In this lab, you will create new projects for the M16C using two different methods. The first method uses the SKP project generator, that will create an empty project. The second method will provide step by step instructions on creating a project with existing source files. Specific examples are shown throughout this tutorial using the SKP16C26A. The SKP16C28 and SKP16C29-CL are similar in all respects.

14 March HEW4 M16C/Tiny Tutorial 2 Starting HEW 1.From the Windows Start menu, click on Programs > Renesas > High-performance Embedded Workshop > High-performance Embedded Workshop

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project using the SKP Project Generator 1.Select ‘Create a new project workspace’ when the “Welcome!” dialog box appears. 2.Click 2 1

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project with the SKP project generator 1.Verify the Tool Chain is “Renesas M16C Standard” 2.Verify the CPU family is “M16C”. 3.Select the Project type “M16C/26A Starter kit Plus”. 4.Enter “Tutor2_pg” for the Workspace Name. 5.Click

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project with the SKP project generator (Cont.) 1.Select “Empty Project”. 2.Click 3.Click Note: The other project selections (Verify SKP and Sample Code) allow you to test the SKP and evaluate the MCU peripherals and features using pre-built sample code. 1 2

14 March HEW4 M16C/Tiny Tutorial 2 SKP Project Generator - Summary The following is a summary of what happens when creating a new project using the SKP project generator Empty Project: 1.The following files are created in the workspace or project directory (in this example, under C:\Workspace\Tutor2_pg\Tutor2_pg):  A copy of the user startup code (ncrt0_26Askp.a30 and sect30_26askp.inc).  A.c file (main_26askp_template.c) that contains the main function.  Copies of the SKP header files (sfr26A.h, skp_bsp.h, and skp_lcd.h)  A copy of the sfr_26a_labels.a30 file so SFR labels are visible in the debugger. 2.Creates a debug session for using the FoUSB ICD. 3.Links the startup files first as shown in the “Linking the startup files first” slides. 4.Adds the phase to generate a hex file when building the project as shown in the slide “Generate a hex file for the Programmer”.

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project Environment The SKP project generator greatly simplifies the creation of a new project. BUT, the only way you will understand this is if you have to build a project from scratch. (Wow. Better you then me…) Ok, my boss made me give you a little help, we are going to give you the original source files. The following slides will walk you through the project creation process: Create a new workspace from scratch Add source files Setup the software development environment including the linker, build, debugger, and programming configuration

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project (Page 1 of 9) 1.From the pull down menu, select “File -> New Workspace”. 2.Verify the Tool Chain is “Renesas M16C Standard” 3.Verify the CPU family to “M16C”. 4.Select the Project type “Application”. 5.Click on Browse to and surf to C:\Renesas\SKP16C26A\Sample _Code 6.Enter “Tutor2” for the Workspace Name. 7.Click

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project (Page 2 of 9) 1.Verify the Toolchain Version is “ ”. 2.Change the CPU Series to “M16C/Tiny”. 3.Click 1 2 3

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project (Page 3 of 9) 1.Change the Target type to “M16C/Tiny”. 2.Change the Startup file type to “USER” 3.Click 1 2 3

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project (Page 4 of 9) 1.Unselect ‘Use Heap Memory’ 2.Where asked about generating a main() function, change to ‘None’ (we will be giving you a main() function). 3.Select ‘Use FoUSB’ 4.Click

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project (Page 5 of 9) The stack settings are grayed out because the USER startup file was selected on page 3 of 8. If DEFAULT startup file had been selected, these settings would have been available. 1.Click 1

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project (Page 6 of 9) 1.Select the Target ‘M16C_R8C_FoUSB/UART’ 2.Click 1 2

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project (Page 7 of 9) 1.Click 1

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project (Page 8 of 9) We already have the source files and selected USER startup files (see Creating a New Project Pages 3 and 4), so there are no source files that will be generated. 1.Click Did anyone notice we went from x/6 to x/7 in the titles? 1

14 March HEW4 M16C/Tiny Tutorial 2 Creating a New Project (Page 9 of 9) A project summary is displayed to indicate a successful creation of the new project, tutor2. 1.Click

14 March HEW4 M16C/Tiny Tutorial 2HEW After creating the project, HEW will look similar to the figure below.

14 March HEW4 M16C/Tiny Tutorial 2 Default and User (SKP) Startup Files Default startup files (ncrt0.a30 and sect30.inc) are included with HEW. Typically the user will need to edit these files depending on which MCU you are using. Customized startup files are included with the SKP’s. For the /26A SKP the files are called ncrt0_26askp.a30 and sect30_26askp.inc. In many cases users can use these startup files for their target applications with no modification. If you did not purchase a starter kit, but wish to obtain these files, visit our SKP website at:

14 March HEW4 M16C/Tiny Tutorial 2 Adding Source Files (Page 1 of 2) 1.From the ‘Project’ Pull Down Menu select ‘Add Files…’. 2.Change the Look in directory to: ‘C:\Renesas\SKP16C26A\ Sample_Code\Tutor2_src’. 3.Select the two files ‘main_tutor2.c’ and ‘ncrt0_26askp_tutor2.a30’. 4.Click on ‘Add’

14 March HEW4 M16C/Tiny Tutorial 2 Adding Source Files (Page 2 of 2) After adding the source files, HEW’s workspace will look like this. If your workspace looks slightly different, configure the view to make it the same. (Right click in the project Window to get this option.) Displaying the source file dependencies this way makes it easier to verify if the header files are included before building a project.

14 March HEW4 M16C/Tiny Tutorial 2 M16C Linkage Order After checking dependencies, HEW4 must be setup to link the startup files first. The startup files contain information on memory addresses and sections which the linker uses to place the code at the correct addresses. Note if the startup file is named “Ncrt0.a30”, HEW4 will automatically link it first. If you configure the Project Window to show the files in time order, you will see the files in the order that they will be sent to the linker. If you go through the Tutor2 code in the order it will be linked, the first code that is linked defines the section information. (You will find it in the include file, sect30_26askp_tutor2.inc, starting on line 118.)

14 March HEW4 M16C/Tiny Tutorial 2 Link Order (M16C Toolchain Version and later) By default, HEW links the Project files in alphabetical order. BUT, when using M16C toolchain version and HEW 4.0 (or latter), you have the ability to manually control the link order! To manually control the link order, select “Build -> Linkage Order”

14 March HEW4 M16C/Tiny Tutorial 2 Linking the Startup File First 1.Check the box ‘Use custom linkage order’ 2.Select the file ‘ncrt0_26askp_tutor2.r30’ 3.Click ‘Move to top’ This configuration is done, lets copy it to the rest of the configurations 4.Click 5.Use the up and down arrows to select another configuration (these are just below the down arrow that you can see) 6.Click 7.Repeat for the remaining configurations. 8.Close the Linkage Order Window

14 March HEW4 M16C/Tiny Tutorial 2 Defining an Include Directory For this SKP, files that are common to all the sample code are kept in a directory named “\Common” under “\Sample_Code”. An example is the register definition file “sfr.h” that is included for all the projects, yet never needs to be modified. Because of this, we need to setup HEW so it knows where to look for these files during compile time. 1.From the ‘Build’ pull down menu, select ‘Renesas M16C Standard Toolchain’ 2.Change the Configuration to “All Configurations” 3.Click 4.Set the Relative to: option to ‘Custom directory’ and the Directory: to ‘C:\Renesas\SKP16C26A\ Sample_Code\Common’ 5.Click 6.Click

14 March HEW4 M16C/Tiny Tutorial 2 Building (compile & link) the Program 1.Click on the ‘Build’ icon. 2.Look in the Build tab of the Output Window. 3.If there are No Errors or Warnings, skip to page If there are Warnings, look at the note on the next page. 5.If there are Errors, you did something wrong. You will need to trace back your steps to see where you went wrong.

14 March HEW4 M16C/Tiny Tutorial 2 If You Get Warnings If you only got 1 Warning, verify that it was associated with the linker limiting the output to 64K (> 60 days). If this is the case, go to the next page: If you get more than 1 Warnings when you compile, you probably did not define the link order correctly. Go back to page 26 and define the linkage order.

14 March HEW4 M16C/Tiny Tutorial 2Optimization By default all optimization is turned off. Lets compare code size when optimization is turned off, to when it is on. Scroll up in the Build Tab of the Output window and find the code size. Non-optimized code size = ________________Bytes Now lets turn on optimization. From the ‘Build’ menu, select ‘Renesas M16C Standard tool chain’

14 March HEW4 M16C/Tiny Tutorial 2Optimization 1.Select ‘All configurations’ 2.Select ‘Tutor2’ Files 3.Change the Category to ‘Optimize’ 4.Enable Optimization Level: ‘[-O3]’ 5.Enable ‘Size or Speed:’ 6.Click

14 March HEW4 M16C/Tiny Tutorial 2Optimization Re-Build the now that optimization is on. Scroll up in the Build Tab of the Output window and find the code size. Optimized code size = ________________Bytes NOTE: The NC30 compiler also includes an advance optimization utility, ‘utl30.exe’ (see the NC30 manual).

14 March HEW4 M16C/Tiny Tutorial 2 Generate a hex file for the Programmer After building a program, a file with an.x30 extension is generated. For this example, ‘tutor2.x30’ is generated. This file contains information for the debugger and are downloaded using HEW. However, device programmers, including the E8 and FoUSB programmers, use hex files in Motorola or Intel format. Lets setup HEW to automatically generate a.mot file during a build. With the feature enabled, a hex (.mot) file is created when building the project. Look for a Tutor2.mot file in the C:\Renesas\SKP16C26A\Sample_Code\Tutor2\ Tutor2\Debug’ folder. 1.From the ‘Build Menu’, select ‘Build Phases’ 2.Make sure the ‘M16C Load Module Converter’ is enabled. 3.Click

14 March HEW4 M16C/Tiny Tutorial 2 End of Lab 3