Using PDG with e2studio: Example

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Renesas Technology America Inc. 1 SKP8CMINI-15,17 Tutorial 2 Creating A New Project Using HEW4.
Introduction to HT-IDE3000 Micro-C development System Department.
The 8051 Microcontroller and Embedded Systems
Slides created by: Professor Ian G. Harris PIC Development Environment MPLAB IDE integrates all of the tools that we will use 1.Project Manager -Groups.
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
FIR TYPE-I Lowpass Filtering using TMS320C6711 Floating Point Processor DEMO Presentation Prepared by: Bashir SADEGHI Supervised by: Dr. Erhan A. INCE.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Infineon Technologies Corp. June 99 1 HOT167-1 Version 2.0 * C167CS not yet supported by DAvE V1.0 CD ROM. See “Hints regarding DAvE.” Exercise 7ASC_1.
Infineon Technologies Corp. June 99 1 HOT167-1 Version 2.0 F PWMmax = x 50ns = 78 kHz Pulse Width Modulation Unit (PWM) (20 MHz)  4 independent.
LAUNCHXL2-RM57L – Project 0
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
COMPREHENSIVE Windows Tutorial 10 Improving Your Computer’s Performance.
Using the Unity 98 Cordless Response System Directions : Courtesy of IHC public relations.
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
03 Using Eclipse. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 1 Introduction.
M16C/Tiny SKP Tutorial 1 Software Development Process using HEW4
®® Microsoft Windows 7 Windows Tutorial 10 Improving Your Computer’s Performance.
DEMONSTRATION FOR SIGMA DATA ACQUISITION MODULES Tempatron Ltd Data Measurements Division Darwin Close Reading RG2 0TB UK T : +44 (0) F :
Introduction Purpose Objectives Content Learning Time
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Silicon Labs ToolStick Development Platform
CHAPTER 1 XNA Game Studio 4.0. Your First Project A computer game is not just a program—it is also lots of other bits and pieces that make playing the.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
Packet Tracer: Novice Session
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course provides an overview of the installation and.
U81X0 Downloading Tool Manual 1 ( Version 1.2 ) FlashRW For U81X0 Version 4.0.0(Build #95V) February 2004 LG Electronics Inc.
ECE Department: University of Massachusetts, Amherst Using Altera CAD tools for NIOS Development.
High Speed Data Converter University
Thank you for your decision to try vTreePro Practice Tree Software! Your satisfaction is very important to us. Please feel free to send us an if.
1 Chapter Overview Configuring and Troubleshooting the Display Configuring Power Management Configuring Operating System Settings Configuring and Troubleshooting.
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
1. Insert the Resource CD into your CD-ROM drive, click Start and choose Run. In the field that appears, enter F:\XXX\Setup.exe (if “F” is the letter of.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. e 2 Studio – Getting Started.
1 Introduction to Xilinx ISL8.1i & 11.1 Schematic Capture 1.
Active-HDL Interfaces Debugging C Code Course 10.
1 NORMA Lab. 7 Generating Reports More Display Options File: NORMA_Lab6.ppt. Author: T. Halpin. Last updated: 2009 June 9.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
GumTree Development Environment Setup Windows Only Compatible with Eclipse 3.2 M3 (Last update: 16/11/05)
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
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.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
ChibiOS/RT Demo A free embedded RTOS
Creating and Editing a Web Page
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Open project in Microsoft Visual Studio → build program in “Release” mode.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the Project Generator function.
Copyright © 2007 by Pearson Education 1 UNIT 6A COMBINATIONAL CIRCUIT DESIGN WITH VHDL by Gregory L. Moss Click hyperlink below to select: Tutorial for.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
After Construction Name: Per #:.
Workshop Setup The software/hardware used in this workshop are:
Programming and Debugging with the Dragon and JTAG
Lab 1: Using NIOS II processor for code execution on FPGA
The first change to your project files that is needed is to change the device to the correct FPGA. This is done by going to the Assignments tab on the.
Eclipse Navigation & Usage.
PRU-ICSS Programming with CCS
RX111 Promotion Board (RPB) hands on
DEMO Presentation Prepared by: Bashir SADEGHI Supervised by: Dr
Software Setup & Validation
ECE 3567 Microcontrollers Lab
ECE 3567 Microcontrollers Lab
Presentation transcript:

Using PDG with e2studio: Example Here is a simple example project using Renesas Peripheral Driver Generator (PDG) for RX and the e2studio IDE to get an LED to flash on a Renesas Starter Kit+ for RX63N Configure I/O Port 10, connected to LED2 on the RSK+, as a general purpose Output pin. From the RSK+ schematic page 2: Use Timer 0 to generate periodic interrupts to turn the LED on and off © 2010 Renesas Electronics Europe. All rights reserved.

LED Flash Example The LED will turn on when the output from port 10 is 0, and will turn off when it is 1. © 2010 Renesas Electronics Europe. All rights reserved.

e2studio Project Start Renesas e2studio and specify a new workspace e.g. C:\Workspace\RX63N Create a new project: e.g. RX63N_LED_Flash We will be using E1 for hardware debug and the default of Little-endian data Select the correct device for your hardware target e.g. for RSK+ for RX63N select part number R5F563NBDxFC Click ‘Finish’ to run create the project © 2010 Renesas Electronics Europe. All rights reserved.

PDG Project Now start PDG and create a new project Start > All programs > Renesas > Peripheral Driver Generator 2 Click on File -> New Project Name the project ‘PDG_Files’ and locate it in the folder for the e2studio project you just created: e.g. C:\WorkSpace\RSK63N\RX63N_LED_Flash Ensure you have the right device part number, (which determines package and ROM/RAM capacity) selected for your target hardware e.g. For RSK+ for RX63N select part number R5F563NBDDFC (176 LQFP, 1MB Flash) Click ‘OK’ and after a few moments the PDG project editor will be displayed.. © 2010 Renesas Electronics Europe. All rights reserved.

Configure the PDG project – System clocks The clocking System window opens The error icons are initially displayed to show that configuration is necessary Move the mouse over the error icon to see a tooltip © 2010 Renesas Electronics Europe. All rights reserved.

Configure the PDG project – System clocks(2) Set up the Main clock (EXTAL input) frequency. The RSK+ for RX63N includes a 12MHz external crystal. Type ’12’ into the dialog box then scroll down and add the internal clock frequencies: In this example we will not use the PLL, which can generate an instruction clock up to the maximum (100MHz). Set the Instruction, Peripheral and Flash clocks to 3MHz: © 2010 Renesas Electronics Europe. All rights reserved.

Configure the PDG project – Ports Set up the I/O pin connected to the LED2 Select the I/O tab Select Port 1 and tick P10 ‘Used as an I/O port’ Select ‘Direction : Output’, CMOS output, High-drive output © 2010 Renesas Electronics Europe. All rights reserved.

Configure the PDG project - TMR Set up the TMR timer to generate periodic interrupts: Select the ‘TMR’ tab Click on ‘Unit 0’ and select ‘Mode: 16-bit timer mode’ Tick ‘Use this channel’ box Select ‘Count source: Internal clock (PCLK/8192)’ Select ‘Counter clearing source: Compare match B’ Click on ‘Timer operating period’ field and input 1000msec Choose a ‘Duty cycle’ of 50% The values to be used for the Compare match A and Compare match B register settings are automatically calculated and displayed © 2010 Renesas Electronics Europe. All rights reserved.

Configure the PDG project - TMR (2) Configure the TMR timer to generate interrupts at both Compare match events (A and B): Note: The ‘Interrupt notification function names’ can be changed to the users preference in this setting dialogue, if desired Check 'compare match A interrupt'. Notification function is 'Tmr0CmAIntFunc' Check 'compare match B interrupt'. 'Tmr0CmBIntFunc © 2010 Renesas Electronics Europe. All rights reserved.

Configure the PDG project – Generate files We have setup our system. Let’s now get the PDG to generate the peripheral driver code that we need to start coding. Click on Tool -> Generate Source Files or click on the icon in the toolbar When asked to Save, click OK And finally click OK © 2010 Renesas Electronics Europe. All rights reserved.

Finding the PDG files in e2studio Go back into e2studio, which you should still have open in the background Right-click on the project name in the Project Explorer view and select ‘Refresh’ (or hit F5) You will now see the folder ‘PDG_Files’ appear in your project with the source files generated by PDG © 2012 Renesas Electronics Europe. All rights reserved.

Modifying the e2studio project Copy the library file manually from PDG installation to your project: In the installation directory of PDG (e.g. C:\Renesas\PDG2), there is a folder 'lib' for library files and then sub-folders for each processor group. The library files have different versions for each package size and for little and big endian. Copy the library file for your configuration to the PDG_files folder in the e2 studio project: e.g. Copy ‘RX63N_library_176_little.lib’ to C:\WorkSpace\RSK63N\RX63N_LED_Flash\PDG_Files Exclude some files in the 'src' directory of the e2studio project from build: Select files in 'Project Explorer' window: interrupt_handlers.c vector_table.c Right mouse button click and select 'Exclude from Build' Select all configurations and click ‘OK ‘ Modify the project settings: Mark the project in 'Project Explorer' and go to 'Project' > 'Renesas Tool Settings' or click on the toolbar In ‘Settings’ , ‘Compiler’ > ‘Source’ add a new include file directory: In ‘Include file directories’ select the icon then click ‘Workspace’ Select your PDG file directory: The entry should be like this: ${workspace_loc:/${ProjName}/PDG_files} Repeat for the 'i_src' directory: ${workspace_loc:/${ProjName}/PDG_files/i_src} Change the precision for ‘double’ variables: PDG and RPDL require double variables set to 'Double precision' (64-bit). The default setting for CCRX is 'Single precision' change this in the compiler settings in group 'CPU' > 'Advanced'. © 2012 Renesas Electronics Europe. All rights reserved.

Modifying the e2studio project (2) In ‘Settings’ > 'Linker' > 'Input' add the PDG library file: Click the icon and click 'Workspace‘, select your PDG file directory then select the library file e.g. ${workspace_loc:/${ProjName}/PDG_Files/RX63N_library_176_little.lib} In ‘Settings’ > 'Linker' > 'Sections‘ modify the Linker settings: Delete section 'PIntPRG‘, select it under ‘Section Name’ and click ‘Remove section’. This is created by e2studio Project Generator and is not required as PDG has defined the interrupts Change the start address for section 'FIXEDVECT‘ from 0xFFFFFF80 to 0xFFFFFFD0. You can modify the address directly in the Section viewer window Modify file 'reset_program.c‘ in 'src' folder This file is created by e2studio and provides the start-up code and low level initialization after RESET. But the name of the reset function is different from the reset vector generated by PDG. Change the label ‘PowerON_Reset’ to ‘PowerON_Reset_PC’ each time it is used in this file, once for the function prototype at the beginning of the file, once for the #pragma entry definition, and once for the function definition. © 2012 Renesas Electronics Europe. All rights reserved.

Edit ‘main’ function Double click on ‘RX63N_LED_Flash.c’ file in the ‘src’ folder to open the file. Edit the ‘main’ function to include the PDG header files: #include "R_PG_PDG_Files.h" #include "R_PG_RPDL_headers.h“ Call the initialisation functions for the System Clocks, I/O Port pin and Timer – see image: Add in the interrupt functions for the TMR interrupts and add the calls to the functions to turn on and off the LED on Port P10 Now build the project by selecting ‘Project’ > ‘Build All’ © 2012 Renesas Electronics Europe. All rights reserved.

Debugging the project When we created the e2studio project, we automatically generated a Debug Configuration for the E1 debugger You can check this configuration by selecting ‘Run’ > ‘Debug configurations…’ Make sure your E1 is connected to a USB port on your PC and to the target hardware (e.g. RSK+) via the 16-way ribbon cable Start the E1 debugger by clicking ‘Debug’ The e2studio ‘console’ view will show the connection dialogue and if successful a window will appear prompting you to open the Debug Perspective Click on the icon. The Program Counter indicator will stop on ‘main’. Click on the icon again, and the code should run and LED2 should flash.. © 2012 Renesas Electronics Europe. All rights reserved.

Modifying the PDG configuration Now let’s modify the system configuration within PDG and observe the changes within our e2studio project Switch to PDG and in the TMR tab change the ‘Timer operating period’ to 200msec Click on the icon to generate the source files again Switch back into e2studio and rebuild the project by clicking on the icon When the project is reloaded on the target, run the code again and observe the increased LED2 flashing frequency. © 2012 Renesas Electronics Europe. All rights reserved.

© 2010 Renesas Electronics Europe. All rights reserved.