Renesas


Renesas Electronics Corporation (TSE: 6723), the world's number one supplier of microcontrollers, is a premier supplier of advanced semiconductor solutions including microcontrollers, SoC solutions and a broad range of analog and power devices.

You are viewing an older revision! See the latest version

Exporting to e2studio with CMSIS_DAP DBG

Environment

/media/uploads/RyoheiHagimoto/e2studio-cmsisdap-component.png
If you use J-Link for debugging, goto Exporting to e2studio (J-Link debug).

Setup

Install Windows serial driver

Install latest Windows Serial Port Driver to setup CMSIS-DAP from the link below:
https://mbed.org/handbook/Windows-serial-configuration

Install e2studio

Download e2studio 5.0.0 or lator, and install

Install OpenOCD

Download exe file of OpenOCD v0.10.0-201601101000-dev, and install.
If you have e2studio version 5.2 or later, you don't need to excute this section.
Because OpenOCD is installed with e2studio.

Put Setting file of OpenOCD

Copy renesas_gr-peach.cfg to scripts\board directory of OpenOCD.

  • default: C:\Program Files\GNU ARM Eclipse\OpenOCD\0.10.0-201601101000-dev\scripts\board

Install OpenOCD add-in to e2studio

  1. Launch e2studio.
  2. Select[Help]menu→[Install new software...]
  3. Input http://gnuarmeclipse.sourceforge.net/updates to [work with] box, and push [Add] button.
    /media/uploads/RyoheiHagimoto/e2studio-add-soft.png
  4. Check [GNU ARM C/C++ OpenOCD Debugging] and push [Next >] button.
    /media/uploads/RyoheiHagimoto/e2studio-add-soft02.png
  5. Install and restart e2studio.
  6. Select [Window]menu -> [Preferences].
  7. Select [Run/Debug] - [OpenOCD].
  8. Input the folder of openocd.exe to [Folder] box, and push [OK].

Build of e2studio environment

Exporting to e2studio

  1. Go to mbed compiler.
  2. Right click at the program you want to export.
  3. Select "Export Program"
    /media/uploads/RyoheiHagimoto/export1.png
  4. Select "Renesas GR-PEACH" for Export Target
    Select "e2studio" for Export Toolchain
    Push "Export"
    /media/uploads/1050186/export_e2stutio_select_e2studio.png
  5. Expand zip file.

import project to e2studio

  1. Launch e2studio.
  2. Specify workspace directory. Workspace directory must be placed in the upper directory of the directory that includes .project file.
    In this document, project file is placed in C:\WorkSpace\GR-PEACH_blinky_e2studio_rz_a1h\GR-PEACH_blinky, and the workspace is placed in C:\WorkSpace\GR-PEACH_blinky_e2studio_rz_a1h.
    /media/uploads/RyoheiHagimoto/e2studio-workspace.png
  3. If Toolchain Integration dialog appared, select [GCC ARM embedded] and click [Register].
    /media/uploads/RyoheiHagimoto/e2studio-toolchain.png
  4. After e2studio window opens, click [go to workbench].
    /media/uploads/RyoheiHagimoto/e2studio-top.png
  5. Select [File]menu-[import].
    /media/uploads/RyoheiHagimoto/e2studio-import01.png
  6. Select [General]-[Existing Projects into Workspace], and click [Next>]
    /media/uploads/RyoheiHagimoto/e2studio-import02.png
  7. Click [Browse].
    /media/uploads/RyoheiHagimoto/e2studio-import03.png
  8. Click [OK].
    /media/uploads/RyoheiHagimoto/e2studio-import04.png
  9. Click [Finish].
    /media/uploads/RyoheiHagimoto/e2studio-import05.png

Build Process

  1. Launch e2studio.
  2. Select the [Window] menu -> [Show View] -> [Project Explorer].
  3. Select the project to build.
  4. Click build icon. /media/uploads/RyoheiHagimoto/e2studio-build.png

  e.g.) The folder structure when making the work folder "C:\Workspase". Export project is GR-PEACH_blinky.
    C:
    +-- Workspace
        +-- GR-PEACH_blinky_e2studio_rz_a1h
            +-- .metadata
            +-- GR-PEACH_blinky
                |   .cproject
                |   .gdbinit
                |   .hgignore
                |   .project
                |   exporter.yaml
                |   GettingStarted.htm
                |   GR-PEACH_blinky OpenOCD.launch
                |   main.cpp
                |   mbed.bld
                |   SoftPWM.lib
                +-- .hg
                +-- .settings
                +-- Debug <- When clicking [Build Project], ".bin" and ".elf" file will be created here.
                +-- mbed
                +-- SoftPWM


Troubleshooting!

There is a problem with Exporter currently, the compile can not success if you export with e2 studio. However, you can avoid build errors by doing the following procedure.

  1. Right-click on the project name and select "Property".
  2. Select "C / C ++ Build" - "Settings".
  3. Select "Tool Settings" tab.
  4. Select "ARM C++ Compiler" - "Includes".
  5. Add ""${workspace_loc:/${ProjName}/mbed_config.h}"" to the "Pre-include" column.
  6. Press "OK" button at the bottom of "Property".


The way to debug

Debug

  1. Connect USB cable
  2. Copy ".bin" file to mbed drive
  3. Reconnect USB cable
  4. Select project to debug.
  5. From menu in C/C++ perspective or debug perspective , select [Run] [Debug Configurations...]
  6. Select [<project-name> OpenOCD] in [GDB OpenOCD Debugging]
    /media/uploads/RyoheiHagimoto/e2studio-debug.png
  7. Click "Debug".
  • If you want to reset :
    please enter the following command to "arm-none-eabi-gdb.exe" screen in "console" view.
    When you drop down from the console view toolbar buttons, you can switch the screen.
monitor reset init

/media/uploads/1050186/e2studio-thewaytoreset1.png /media/uploads/1050186/e2studio-thewaytoreset2.png

Support features

These features are supported. Generic views which uses the features below would be useable.

Debugging featureResumeSuspendStep inStep overStep returnResetMemory R/WDownloadCPU register R/WSoftware breakpointHardware breakpointWatchpoint
CMSIS-DAP4.4.4.5.3.2.1.1.-
J-Link
  1. Software breakpoint will be replaced with Hardware breakpoint. 6 points are available in total.
  2. Downloading from e2 studio to serial flash memory is not supported. But you can download the program by copying the bin file to the drive which is generated when you connect the board to PC, because GR-PEACH is mbed device. Before you download the program by the manner of mbed, please disconnect the debugger from the board.
  3. Reading or writing memory while program is running are not supported. And writing is supported only for RAM.
  4. .gdbinit is required to stepping the program which uses interrupt.
  5. The button for reset in Debug View doesn't work, but the command to reset is available. Please enter "monitor reset init" to reset the program in the console for GDB (arm-none-eabi-gdb).
    Although the display is not changed, but the program would be reset. The button for restart will work once. Please don't use it.

e2 studio has the special views for Renesas. The supported status are below.

Renesas debug viewI/O registersEvent pointTracePerformance AnalysisProfileCoverageRealtime memoryRealtime ExpressionRealtime chartVirtual consoleWave/ImageViaual ExpressionConsumption currentMemory usage
OpenOCD-------------
J-Link------

All wikipages