Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.

Similar presentations


Presentation on theme: "Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development."— Presentation transcript:

1 Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development environment using the KPIT GNU toolchain and HMON monitor. Objectives Learn how to create a new project and configure the debug platform and the Flash Development Toolkit (FDT). Understand how to download the application to the target. Learn the process of debugging an application using the HMON monitor. Content 41 pages 3 questions Learning Time 50 minutes

2 Prerequisites for Debugging KPIT GNUSH v0601 Toolchain is installed HMON for SH target has been downloaded and installed Renesas FDT3.05 is installed Renesas HEW 4 IDE is installed Click each oval for more information. Download free evaluation version of HEW IDE Download FDT installer Download KPIT GNU Toolchain (select GNUSHv0601) Download FDT and HMON support installer

3 About the HEW IDE A powerful, yet easy-to-use software development solution that shortens system development time - Offers a familiar Graphical User Interface (GUI) that simplifies operations - Eliminates the need to switch environments between coding and debugging operations, or between target devices - Allows users to select right tool for each process and fully exploit the tool’s capabilities - Provides many essential functions, including: Project manager Setup “Wizard” Compiler interface Configurable build engine Editor Debugger and more Free HEW courses are available at Renesas Interactive KPIT GNU toolchain HMON FDT HEW Click each oval for more information.

4 About the FDT KPIT GNU toolchain HMON FDT HEW An easy-to-use utility for programming code, including the HMON monitor software, into a microcontroller's on-chip flash memory - Enables creation of workspaces to combine several s-record files into one download image and save connection settings to easily manage device programming - Includes direct USB connection for USB boot-mode devices and serial communication at up to 115,200 baud - Provides hex image editor, extensive messaging, and debugger support. Click each oval for more information.

5 About the HMON Software KPIT GNU toolchain HMON FDT HEW Allows easy application debugging and development. - After it is downloaded into target device’s on-chip Flash memory, executes concurrently with the application program being debugged - Provides detailed information about the execution of that program Click each oval for more information.

6 About the GNU Toolchain Proven, pre-built, proven binary tools that allow more time for application development - Compiler source code, Binutils, Newlib, and a GDB source-level debugger that shows what is happening inside program as it executes Tested and optimized for Renesas targets Free and easy to use Available for Windows and Linux platforms Easy download and installation Integrated with Renesas’ proprietary tools Free technical support at dedicated web portal - GDB stubs, monitor programs, tutorials, documentation, FAQs, and discussion forum KPIT GNU toolchain HMON FDT HEW Click each oval for more information.

7 Getting Started Launching HEW: Click on HEW icon on desktop Navigate from Start menu Click to launch HEW 1 3 4 5 2

8 Creating a Workspace Create a new project workspaceClick OK

9 Creating a New Project (1/7) Enter Workspace nameEnter Project name Select CPU family Select toolchain Select application type Click OK EDK = Evaluation & Development Kit 1 5 2 64 3

10 Creating a New Project (2/7) Click TutorialClick Next

11 Creating a New Project (3/7) Files added to the project Click Finish Click the file list for more information

12 List of Project Files debug_with_hmon.hdp : HEW file gnuconfig.ini : GNU toolchain configuration file edk7145def.h : I/O definition file fdtinit.o : FDT Init file hmonconfiguser.c : Configuration options for HMON monitor hmonconfiguser.h : User modifiable configuration options for HMON monitor hmonconfiguserstruct.h : Structure(s) and enumeration(s) shared between library and user configuration application hmonserialconfiguser.c : Configuration for HMON Monitor Serial Library (source file) hmonserialconfiguser.h : Configuration for HMON Monitor Serial Library hmonserialstruct.h : Structures for HMON Serial Library hwsetup.c : Hardware Setup file inlines.h : Inline function file intprg.c : Interrupt routines file iodefine.h : Definition of I/O Register liblibrary_7145.a : HMON Library file main.c : Main function file gnuconfig.ini : GNU toolchain configuration file release.hdp : HEW file release session.hsf : Session file resetprg.c : Power-on-reset file sbrk.h : SBRK Header file sci.c : Initialize the SCI serial channel sci.h : Release Mode serial setup file sessionsh2_hmon.hsf : Session file start.asm : Startup file syscalls.c : File overriding system calls tutorial_edk7145.tps : Textpad workspace file ugenu.o : User Mode Micro Kernel file vect.h : Vector header file vecttbl.c : Vector file

13 Creating a New Project (4/7) Click OK If Toolchain Missing dialog box appears: Toolchain version installed on your PC doesn’t match toolchain version on which HMON was built. Mismatch will not affect debugging performance. To continue, click “OK” and select “0601 Toolchain.”

14 Creating a New Project (5/7) Workspace Window Editor Window Output Window

15 Creating a New Project (6/7) Ensure these settings

16 Creating a New Project (7/7) Click Build All Build completed Make sure that there are no errors

17 Question Which of these statements correctly describe the process of creating a new project in HEW using the KPIT GNU toolchain? Select all that apply and then click Done. A.When you install a KPIT GNU toolchain for a particular SH device, you can select that MCU when you create a new project in HEW. B.When you select a KPIT GNU toolchain option in the New Project Workspace, you have the flexibility to make changes later in the debug process. C.The EDK7145 (KPIT GNU) provides sample code that can be used to create an application for an HMON debug project. D.The Project Editor window shows a summary of the selected options and generated files used to create a new project. Done

18 Configuring the FDT (1/6) Right-click on toolbar spaceClick FDTFDT Toolbar appears

19 Configuring the FDT (2/6) Click the magic wand Select the kernelClick Next Select SH7145F as the device

20 Select COM port Click Next Configuring the FDT (3/6)

21 Configuring the FDT (4/6) Click Next

22 Configuring the FDT (5/6)

23 Configuring the FDT (6/6) Click Finish

24 Is the following statement true or false? Click Done when you are finished. “Selecting ‘Boot Mode’ connection instructs the FDT to erase the entire FLASH memory and load a kernel if it does not find a kernel already running on the target device.” True False Question Done

25 Click here Downloading an Application (1/5) Click HMON FDT Select Boot mode Click Comms settings Click OKSelect serialdrv.dll if using serial interface

26 Click Connect Downloading an Application (2/5)

27 Right-click on the downloadable.x file Click Download Module Press Boot Mode switch on target board, then click OK. Downloading an Application (3/5)

28 Downloading an Application (4/5) Download operation is complete

29 Press Reset switch on target board, then click OK. Downloading an Application (5/5)

30 Is the following statement true or false? Click Done when you are finished. “Before the application can be downloaded to the target microcontroller’s Flash memory, you must press the Reset switch on the target board, then click “OK” in the HMON prompt window. True False Question Done

31 Debug Toolbar Reset CPU Go to cursor Step In Step Out Set PC to cursor Display PC Halt Step Over Reset Go Go Debugging an Application (1/14) Function Keys Press F5 key to execute user program from “reset vector” address Press F11 to step through the lines of the code Press F10 to step over a function Etc.

32 Double-click to insert breakpoint Debugging an Application (2/14)

33 Click View Select CPUSelect desired option Debugging an Application (3/14)

34 Register Window Memory Window Debugging an Application (4/14)

35 Select SymbolSelect desired option Debugging an Application (5/14) Click View

36 Watch window Debugging an Application (6/14)

37 Click Reset CPU Debugging an Application (7/14)

38 Program counter jumps to start-up routine Debugging an Application (8/14)

39 Click Go Debugging an Application (9/14)

40 Program halts at Breakpoint Debugging an Application (10/14)

41 Click Step In Debugging an Application (11/14)

42 Variable in Watch window Click Go Debugging an Application (12/14)

43 Click Stop Debugging an Application (13/14) You must halt program execution before the debugger can be disconnected.

44 Click Disconnect Debugging an Application (14/14)

45 Match each item to the most appropriate explanation by dragging the letters on the left to the correct locations on the right. Click Done when you are finished. Breakpoint Register window B C Done Reset Show Solution A Displays the modified values of the CPU registers after an instruction is executed. B C Watch window Shows the status of variables during execution of the application. A Stops program execution at a specific location so that you can step through and debug your code. D Reset CPU D Starts debugging of the application. Question

46 Course Summary Creating a new project Configuring the FDT Downloading the application to the SH target Debugging an application using HEW, the KPIT GNU toolchain, and the HMON monitor For more information, please visit our Web site: http://america.renesas.com


Download ppt "Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development."

Similar presentations


Ads by Google