Getting started with the Renesas Starter Kit+ for RX65N-2MB
Important
This reference integration is hosted on the Amazon-FreeRTOS repository which is deprecated. We recommend that you start here when you create a new project. If you already have an existing FreeRTOS project based on the now deprecated Amazon-FreeRTOS repository, see the Amazon-FreeRTOS Github Repository Migration Guide.
This tutorial provides instructions for getting started with the Renesas Starter Kit+ for RX65N-2MB.
If you do not have the Renesas RSK+ for RX65N-2MB, visit the Amazon Partner Device Catalog, and purchase
one from our
partners
Before you begin, you must configure Amazon IoT and your FreeRTOS download to connect your device to the Amazon
Cloud. See First steps for instructions. In this
tutorial, the path to the FreeRTOS download directory is referred to as
.freertos
Overview
This tutorial contains instructions for the following getting started steps:
-
Connecting your board to a host machine.
-
Installing software on the host machine for developing and debugging embedded applications for your microcontroller board.
-
Cross compiling a FreeRTOS demo application to a binary image.
-
Loading the application binary image to your board, and then running the application.
Set up the Renesas hardware
To set up the RSK+ for RX65N-2MB
-
Connect the positive +5V power adapter to the PWR connector on the RSK+ for RX65N-2MB.
-
Connect your computer to the USB2.0 FS port on the RSK+ for RX65N-2MB.
-
Connect your computer to the USB-to-serial port on the RSK+ for RX65N-2MB.
-
Connect a router or internet-connected Ethernet port to the Ethernet port on the RSK+ for RX65N-2MB.
To set up the E2 Lite Debugger module
-
Use the 14-pin ribbon cable to connect the E2 Lite Debugger module to the ‘E1/E2 Lite’ port on the RSK+ for RX65N-2MB.
-
Use a USB cable to connect the E2 Lite debugger module to your host machine. When the E2 Lite debugger is connected to both the board and your computer, a green ‘ACT’ LED on the debugger flashes.
-
After the debugger is connected to your host machine and RSK+ for RX65N-2MB, the E2 Lite debugger drivers begin installing.
Note that administrator privileges are required to install the drivers.
Set up your development environment
To set up FreeRTOS configurations for the RSK+ for RX65N-2MB, use the Renesas e2studio IDE and CC-RX compiler.
Note
The Renesas e2studio IDE and CC-RX compiler are only supported on Windows 7, 8, and 10 operating systems.
To download and install e2studio
-
Go to the Renesas e2studio installer
download page, and download the offline installer. -
You are directed to a Renesas Login page.
If you have an account with Renesas, enter your sign-in credentials and then choose Login.
If you do not have an account, choose Register now, and follow the first registration steps. You should receive an email with a link to activate your Renesas account. Follow this link to complete your registration with Renesas, and then log in to Renesas.
-
After you log in, download the e2studio installer to your computer.
-
Open the installer and follow the steps to completion.
For more information, see the
e2studio
To download and install the RX Family C/C++ Compiler Package
-
Go to the RX Family C/C++ Compiler Package
download page, and download the V3.00.00 package. -
Open the executable and install the compiler.
For more information, see the C/C++ Compiler Package for RX Family
Note
The compiler is available free for evaluation version only and valid for 60 days. On the
61st day, you need to get a License Key. For more information, see
Evaluation Software Tools
Build and run FreeRTOS samples
Now that you have configured the demo project, you are ready to build and run the project on your board.
Build the FreeRTOS Demo in e2studio
To import and build the demo in e2studio
-
Launch e2studio from the Start menu.
-
On the Select a directory as a workspace window, browse to the folder that you want to work in, and choose Launch.
-
The first time you open e2studio, the Toolchain Registry window opens. Choose Renesas Toolchains, and confirm that
CC-RX v3.00.00
is selected. Choose Register, and then choose OK. -
If you are opening e2studio for the first time, the Code Generator Registration window appears. Choose OK.
-
The Code Generator COM component register window appears. Under Please restart e2studio to use Code Generator, choose OK.
-
The Restart e2studio window appears. Choose OK.
-
e2studio restarts. On the Select a directory as a workspace window, choose Launch.
-
On the e2studio welcome screen, choose the Go to the e2studio workbench arrow icon.
-
Right-click the Project Explorer window, and choose Import.
-
In the import wizard, choose General, Existing Projects into Workspace, and then choose Next.
-
Choose Browse, locate the directory
projects/renesas/rx65n-rsk/e2studio/aws_demos
, and then choose Finish. -
From Project menu, choose Project, Build All.
The build console issues a warning message that the License Manager is not installed. You can ignore this message unless you have a license key for the CC-RX compiler. To install the License Manager, see the License Manager
download page.
Monitoring MQTT messages on the cloud
Before you run the FreeRTOS demo project, you can set up the MQTT client in the Amazon IoT console to monitor the messages that your device sends to the Amazon Cloud.
To subscribe to the MQTT topic with the Amazon IoT MQTT client
-
Sign in to the Amazon IoT console
. -
In the navigation pane, choose Test, then choose MQTT test client to open the MQTT client.
-
In Subscription topic, enter
, and then choose Subscribe to topic.your-thing-name
/example/topic
When the demo project successfully runs on your device you see "Hello World!" sent multiple times to the topic that you subscribed to.
Run the FreeRTOS project
To run the project in e2studio
-
Confirm that you have connected the E2 Lite Debugger module to your RSK+ for RX65N-2MB
-
From the top menu, choose Run, Debug Configuration.
-
Expand Renesas GDB Hardware Debugging, and choose aws_demos HardwareDebug.
-
Choose the Debugger tab, and then choose the Connection Settings tab. Confirm that your connection settings are correct.
-
Choose Debug to download the code to your board and begin debugging.
You might be prompted by a firewall warning for
e2-server-gdb.exe
. Check Private networks, such as my home or work network, and then choose Allow access. -
e2studio might ask to change to Renesas Debug Perspective. Choose Yes.
The green 'ACT' LED on the E2 Lite Debugger illuminates.
-
After the code is downloaded to the board, choose Resume to run the code up to the first line of the main function. Choose Resume again to run the rest of the code.
For the latest projects released by Renesas, see the renesas-rx
fork of the
amazon-freertos
repository on GitHub
Troubleshooting
For general troubleshooting information about Getting Started with FreeRTOS, see Troubleshooting getting started.