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
Table of Contents
You need following components:
- USB micro-B cable
- J-Link series
- J-Link 9-pin Cortex-M Adapter or equivalent
- Cortex 9-pin header (1.25mm pitch 2x5)
If you do not have them, goto Exporting to e2studio (CMSIS-DAP debug).
Mount Cortex 9-pin header to GR-PEACH¶
Mount Cortex 9-pin header to "JTAG" of GR-PEACH.
Note: 7th pin is not used (without header).
Install Windows serial driver¶
Install latest Windows Serial Port Driver to setup CMSIS-DAP from the link below:
Download e2studio 5.0.0 or lator, and install
Build of e2studio environment¶
Exporting to e2studio¶
- Go to Mbed compiler.
- Right click at the program you want to export.
- Select "Export Program"
- Select "Renesas GR-PEACH" for Export Target
Select "e2studio" for Export Toolchain
- Expand zip file.
import project to e2studio¶
- Launch e2studio.
- 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.
- If Toolchain Integration dialog appared, select [GCC Arm embedded version 126.96.36.19950529] and click [Register].
- After e2studio window opens, click [go to workbench].
- Select [File]menu-[import].
- Select [General]-[Existing Projects into Workspace], and click [Next>]
- Click [Browse].
- Click [OK].
- Click [Finish].
- Launch e2studio.
- Select the [Window] menu -> [Show View] -> [Project Explorer].
- Select the project to build.
- Click build icon.
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
You may face the build error related include path in exported program. It seems that a part of unnecessary path is incorrect setting. Please try one of the two workarounds until the online exporter is updated.
1. Remove the directory that includes the error file from the build target on e2 studio.
Right-click on each of those directories and select "Release Configuration" -> "Exclude from Build" -> "Select All" -> "OK"
If there are other functions that are caught by errors and is unused, please do the same.
2. Fix the the incorrect unnecessary paths manually in the project file.
Open the ". cproject" file with an editor and replace it as shown below.
"/filer/web_data/repo_dicts/github.com/armmbed/mbed-os/2fd0c5cfbd83fce62da6308f9d64c0ab64e1f0d6/" -> "./mbed-os/"
Please be careful the hash number. The above number indicates Mbed OS 5.10.4.
The way to debug¶
- Connect your PC and GR-PEACH via J-Link.
- Turn on GR-PEACH (by connecting USB cable).
- Select project to debug.
- From menu in C/C++ perspective or DS-5 debug perspective , select [Run] [Debug Configurations...]
- Select [Renesas GDB Hardware Debugging]<i>
- Click <New> icon <ii>
- Confirm a new configuration of your project has been generated.<iii>
- Click Debugger tab.<iv>
- Select [J-Link ARM] of [Debug hardware]. <v>
- Select [...] - [RZ] - [RZ/A1] - [R7S721001] of [Target Device]. <vi>
- Click [Startup] tab. <vii>
- Check [Resume] box <viii>.
- Click [Apply] button. <ix>
- Click [Debug] button <x>.