Overview
This summary below goes through how to create a GR-COTTON sketch using a web compiler with either Windows or Mac.
Preparation
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.
Protocol
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 in the image to the right, 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
On the Create Project page, double clicking on gr_sketch.cpp in the Explore area on the left side of the screen 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 shown here, the results of the build will be displayed on the screen. If the program is successful, the page will indicate that compilation 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.
KurumiWriter for Windows
(ZIP) (Windows)
KurumiWriter for Mac
(ZIP) (Mac)
7. Connect GR-COTTON to the Computer with a USB Cable
Connect GR-COTTON to your computer using 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.
Windows
Mac
9. Configuring KurumiWriter
Configure KurumiWriter as follows:
Serial Port: USB Serial Port (COM **) (for Windows) or /dev/cu.serial-*** (for Mac)
Baud Rate: 500,000bps (or 112,500bps)
File: Select cotton_sketch.bin, downloaded from the web compiler
Windows
Mac
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?
Windows
Mac
11. Congratulations!
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.