GR-COTTON Special Project
Sketch Using a Web Compiler
This article summarizes how to create a GR-COTTON sketch using a web compiler with either Windows or Mac.
You will need a GR-COTTON board and a USB cable (micro B type).
Make sure the white jumper on the reverse side of GR-COTTON is moved to the “3V3 USB” side. If it is set to the BATT side, remove and reinsert it into the USB side.
1. Logging into the web compiler
Log into the web compiler on the GADGET RENESAS top page.
Click on the page as shown below and the top page will be displayed in a new tab.
Enter your MyRenesas account information and click Sign In.
2. Creating the project
Use the button as shown here to create your new project. Those logging in for the first time should skip this step.
As shown on the screen here, select GR-COTTON_Sketch_xxx.zip (xxx indicates the version you are using), input a suitable project name, and click Create Project.
3. Sketch display
The Create Project page. Double clicking on gr_sketch.cpp on the Explorer area to the left will bring up a program.
This is the program used to operate GR-COTTON.
4. Building a sketch (creating files to compile and write)
This window is used for writing a program, but the sample program for lighting the LED on GR-COTTON is already completed.
Click Execute Build in the navigation area on the right side of the screen. You should see the phrase Compiling successfully completed.
Note that, after you have created the project, the first build will take a bit longer than normal, because all of the files are being compiled.
As show here, the results of the build will be displayed on the screen. If the program is successful, the page will indicate that Compile is complete. Click close to close the page.
5. Downloading the sketch (storing the file to be written to the computer)
If the build is successful, a cotton_sketch.bin file is created. Next, open the context menu located just above the file name and choose download to download to the computer.
6. Downloading KurumiWriter (saving software used for programming)
Save KurumiWriter, a program used to write sketches for GR-COTTON, to the computer. Download the appropriate program for Windows or Mac as listed below, and unzip the compressed file (Zip). If you are using a Mac, it will automatically be added to the unzipped application folder.
Clicking one of the links shown below will execute the download.
7. Connect GR-COTTON to the computer with a USB cable
Connect GR-COTTON to your computer with a USB cable.
If you see a message that the USB driver cannot be located, obtain a USB driver from the FTDI website and confirm that your computer acknowledges it.
8. KurumiWriter activation
Activate the KurumiWriter.
9. Configuring KurumiWriter
Configure KurumiWriter as follows:
Serial Port: USB Serial Port (COM **) (for Windows) or /dev/cu.serial-*** (for Mac)
Baud Rate: 500,000 bps (or 112,500 bps)
File: Select cotton_sketch.bin, downloaded from the web compiler
10. Writing the sketch
Click Write on KurumiWriter, which will start the write process.
If you get an error message, follow these steps:
・Click on Write button. Does anything change?
(A communication error message due to timing may appear if a sketch that implements serial communication has already be sent.)
・Does the write process start when the baud rate is set to 112,500bps?
(The transmission speed can be too slow even when using a data communications cable.)
・Is the white jumper on the reverse side of GR-COTTON properly set to the USB side?
・Is the USB cable firmly inserted?
The LED on the GR-COTTON should be illuminated when the write process is successfully completed. The lighting will vary when you push the button switch.
Congratulations for sticking with this rather lengthy procedure! Please check out the other sample sketches on the GR-COTTON website.