export to e2studio
.
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.
note: install 32-bit driver
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
This section is required before e2studio 5.2.0.
- Launch e2studio.
- Select[Help]menu→[Install new software...]
- Input
http://gnuarmeclipse.sourceforge.net/updates
to [work with] box, and push [Add] button.
- Check [GNU ARM C/C++ OpenOCD Debugging] and push [Next >] button.
- Install and restart e2studio.
Specify OpenOCD directory
- Select [Window]menu -> [Preferences].
- Select [Run/Debug] - [OpenOCD].
- Input the folder of openocd.exe to [Folder] box, and push [OK].
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
Push "Export"
- 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] 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].
Build Process
- 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
The way to debug
Debugging with CMSIS-DAP
- Connect USB cable
- Copy ".bin" file to mbed drive
- Reconnect USB cable
- Select project to debug.
- From menu in C/C++ perspective or DS-5 debug perspective , select [Run] [Debug Configurations...]
- Select [<project-name> OpenOCD] in [GDB OpenOCD Debugging]
- 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
Debugging with J-Link
- 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 [Apply] button. <vii>
- Click [Debug] button <viii>.
Please log in to post comments.