Working with the Renesas EK-RA6M1 Eval Kit and e² studio IDE

Introduction

This details installing the Renesas e² studio IDE and SEGGER RTT Viewer, connecting to the EK-RA6M1 evaluation kit and implementing a couple of the Renesas example projects. The first example walks through downloading and running the Quick Start project that features a user button and LED on the eval board. The second example walks through the IIC master project which connects an Analog Devices based Digilent PMOD board to the eval board to read XYZ acceleration data and print to a Segger RTT Viewer terminal window.

Hardware Requirements

Supplier Documentation

e² studio IDE

The e² studio is a free Eclipse-based integrated development environment (IDE) for Renesas MCUs that covers all development processes, from the downloading of sample code to compiling and debugging.Projects can be generated through simple operations within e² studio by selecting the MCU and compiler in the wizard function and generate a project which includes basic sample code. Users can immediately start building or debugging a project. The Eclipse CDT (C/C++ Development Tooling) editor built into e² studio provides powerful functionality specifically designed for C/C++ developers.The Renesas RA Flexible Software Package (FSP) provides a quick and versatile way to build secure connected IoT devices using the Renesas RA Family of Arm microcontrollers . FSP provides production ready peripheral drivers, Amazon FreeRTOS and middleware stacks to take advantage of the FSP ecosystem.

Installation

The FSP, J-Link® USB drivers, and e2 studio are bundled in a downloadable platform installer available on the FSP webpage at renesas.com/ra/fsp. Renesas recommends new users use the Quick Install option provided in the installation wizard, to minimize the amount of manual configuration needed.

SEGGER RTT Viewer

SEGGER’s Real Time Transfer (RTT) is a technology for interactive user I/O in embedded applications. J-Link RTT Viewer is a GUI application to use all features of RTT in one application. With RTT it is possible to output information from the target microcontroller as well as sending input to the application at a very high speed without affecting the target’s real time behavior. SEGGER RTT can be used with any J-Link model and any supported target processor which allows background memory access, RTT supports multiple channels in both directions, up to the host and down to the target, which can be used for different purposes and provide the most possible freedom to the user. The default implementation uses one channel per direction, which are meant for printable terminal input and output. With the J-Link RTT Viewer this channel can be used for multiple “virtual” terminals, allowing to print to multiple windows (e.g. one for standard output, one for error output, one for debugging output) with just one target buffer. RTT Viewer is free with any model J-Link or J-Trace.

Installation

The J-Link RTT Viewer is part of the J-Link Software and Documentation Pack, which is available for free download. It is available for Windows, macOS and Linux and included in the J-Link Software and documentation package download link.

Quick Start Project

Below goes through the basic steps of downloading, importing and running the latest version of the Quick Start project. Renesas provides a well documented Quick Start Guide that goes through all steps in detail.

  1. Connect EK-RA6M1 USB connector J11 (DEBUG USB) to a USB port of the host PC (or a 5 V power source) and USB connector J9 (DEVICE USB) to a USB port of the host PC.
  2. Open Tera Term, select Serial and COMxx: USB Serial Device (COMxx) for the host PC com port connected to J9.
  3. Download and extract the Quick Start example project to a local directory on the host PC. The Quick Start example project (source code and project files) is available in the EK-RA6M1-
    Example Projects Bundle that is available in the Downloads tab of EK-RA6M1 webpage at
    renesas.com/ra/ek-ra6m1. .
  4. Launch e2 studio and browse to the workspace you want to import project into.
  5. In e2 studio select Import from the File drop-down menu.
  6. In the Import dialog box, select General , and then select Existing Projects into Workspace .
  7. Click Select root directory and browse to the location of the Quick Start example project folder. Select the Quick Start example project and click Finish .
  8. In e2 studio run Build and Debug As " Renesas GDB Hardware Debugging" icons, then step Resume icon until main program loop.

When the board running the Quick Start example project is connected to the PC via Device USB port, the kit information, MCU die temperature, user LED blinking frequency, and so forth, can be displayed on a terminal console. The user button is used to toggle the blinking frequency of a LED on the evaluation board.

IIC Master Project

Below goes through the basic steps of downloading,importing and running the latest version of the iic_master project.The EK-RA6M1 acts as the master and interfaces to an external PMODACL accelerometer board over I2C and prints out XYZ axis acceleration data on the RTT Viewer terminal window.

  1. Connect EK-RA6M1 USB connector J11 (DEBUG USB) to a USB port of the host PC (or a 5 V power source) and USB connector J9 (DEVICE USB) to a USB port of the host PC. Make connections between eval board and PMODACL board as shown below.
  2. Launch e2 studio and browse to the workspace you want to import project into.
  3. In e2 studio select Import from the File drop-down menu.
  4. In the Import dialog box, select General , and then select Existing Projects into Workspace .
  5. Click Select root directory and browse to the location of the Quick Start example project folder. Select the iic_master example project and click Finish .
  6. In e2 studio run Build and Debug icons, then step Resume icon until main program loop.
  7. Run SEGGER “J-Link RTT Viewer V6.xx” tool on host PC
  8. Check “Serial No.” checkbox and select OK

Upon successful initialization, RTT Viewer displays PMODACL sensor XYZ axis acceleration data

The iic_master example project can be downloaded from github at https://github.com/renesas/ra-fsp-examples/tree/master/example_projects/ek_ra6m1/downloadable/iic_master

Renesas Example Project Code

Renesas provides a number of example projects compiled and tested for the RA microcontroller family. The projects range from ADC and CRC examples to FreeRTOS projects. All of the projects are located on github at link.