Overview

This project shows you how to create a Gadget Renesas GR-LYCHEE sketch (program) using the web compiler. It is available on Windows and Mac.

Preparation

You will need a GR-LYCHEE board and a USB cable (Micro B type).

gr-lychee-board
usb-cable

Procedure

1. Logging Into the Web Compiler

Log into the web compiler from the Gadget Renesas top page.

Then click [Log In] or [Guest Log In]. If you choose the guest login, your sketch is removed upon log out.

Then click [Log In] or [Guest Log In]. If you choose the guest login, your sketch is removed upon log out.

 

gr-sp-login

Enter your MyRenesas account information and click Sign In.

my-renesas-login

2. Creating a New Project

To create a project, click the "+" button as shown here. Those logging in for the first time should skip this procedure.

sp-webc-prj

Select an appropriate template, such as GR-LYCHEE_Sketch_Vxxx.zip, where xxx indicates the version. Since there are many templates, entering "lychee" in the filter makes it easier to find. After selecting the template, give the project an appropriate name and click "Create Project".

sp-webc-prj-display

3. Displaying Your Sketch

Clicking "Create Project" brings you to the Web Compiler IDE window. Click the "gr_sketch.cpp" file under the explore menu. The source code of the file will appear in the right window. This is the sample code that will drive the LED on GR-LYCHEE.

sp-webc-sketch

4. Build the Code

Since the code shown on the screen is a working sample, you don't need to debug the code. To build the code, click the "Execute Build" icon on the right navigation menu shown here. This should show you "The Compilation Is Complete" pop-up.

Note that it takes a little time to build the first time due to compilation of all of the source files.

lychee-sp-webc-build

When the build is OK, the pop-up screen shows "Make process completed" at the bottom of screen. Click the "Close" button.

sp-webc-build-ok

5. Download the Sketch

When the build is successfully completed, the Web Compiler creates a binary file "lychee_sketch.bin" under the .CPP file. Move the mouse over the bin file and right click - this will bring up the pop-up menu. Then, click the "Download" menu.

lychee-sp-webc-bin

6. Connect GR-LYCHEE

Connect GR-LYCHEE to a PC with the USB cable.

GR-LYCHEE is displayed as a USB storage named "MBED".

sp-connect-usbsp-connect-display-usb

7. Flashing (Copy Program to GR-LYCHEE)

Copy and paste the lychee_sketch.bin to the storage.

lychee-sp-flash

8. Execute Your Sketch

Push the RESET button on the GR-LYCHEE board. Now, the LED on GR-LYCHEE will be flashing.

sp-button-reset

Serial Monitor

In the sample program, pressing "UB0" of GR-LYCHEE sends a message to the USB. This is an example using "Tera Term". Serial monitor is useful for viewing program execution status.

lychee-sp-serial-monitor

The position of "UB0" is shown here.

sp-button-usb