Application Note
R20AN0650EJ0101 Rev.1.01 Page 1 of 21
Dec.01.21
RL78/G23
Connecting to Amazon Web Services Using FreeRTOS
with RL78/G23-128p Fast Prototyping Board
Introduction
Amazon FreeRTOS is a real-time operating system that augments the FreeRTOS kernel with libraries for
connectivity, security, and over-the-air (OTA) updates. Amazon FreeRTOS also includes some demo
applications that demonstrate Amazon FreeRTOS features on qualified boards.
Renesas e
2
studio is a development environment based on the popular Eclipse CDT (C/C++ Development
Tooling), covers build (editor, compiler, and linker control) as well as debug interface. It also supports to
integrate the Amazon FreeRTOS demo applications and run them on Renesas boards.
This document describes a system combining the Renesas board RL78/G23-128p Fast Prototyping Board
and a Wi-Fi module (SX-ULPGN (from Silex Technology)). This system implements Amazon FreeRTOS in
the RL78/G23-128p to enable communication with Amazon Web Services (AWS) using the MQTT protocol
via Wi-Fi.
In addition, the general-purpose API for TCP/IP is provided in Amazon FreeRTOS. Communication with a
general-purpose Wi-Fi is also facilitated by using this API.
Objectives
This document helps users to be familiar with the procedures to run the Amazon FreeRTOS demo
applications using e
2
studio (from downloading the Renesas GitHub Amazon FreeRTOS projects to running
the demos).
Operating Environment
Operation was confirmed in the following environments.
IDE
e
2
studio 2021-07 (21.07.0)
https://www.renesas.com/software-tool/e-studio
Board
RL78/G23-128p Fast Prototyping Board
https://www.renesas.com/rl78g23-128p_fpb
Wi-Fi Pmod Expansion Board
https://www.renesas.com/products/microcontrollers-microprocessors/ra-
cortex-m-mcus/wi-fi-pmod-expansion-board-80211bgn-24g-wi-fi-pmod-
expansion-board
Toolchains
CCRL Compiler v1.10.00
https://www.renesas.com/products/software-tools/tools/compiler-
assembler/compiler-package-for-rl78-family.html
Emulators
E2 Emulator Lite
https://www.renesas.com/products/software-tools/tools/emulator/e2-emulator-
lite.html
RL78/G23 Connecting to Amazon Web Services Using FreeRTOS with RL78/G23-128p
Fast Prototyping Board
R20AN0650EJ0101 Rev.1.01 Page 2 of 21
Dec.01.21
Contents
1. Outline ..................................................................................................................................... 3
2. Preparing Amazon FreeRTOS projects .................................................................................... 3
2.1 Downloading FreeRTOS and importing demo ........................................................................................ 3
3. Preparing AWS ........................................................................................................................ 5
4. Preparing the hardware ........................................................................................................... 6
4.1 RL78/G23-128p Fast Prototyping Board ................................................................................................. 6
4.2 SX-ULPGN .............................................................................................................................................. 6
4.3 DIGILENT Pmod usbuart ........................................................................................................................ 7
4.4 Writing the certificate ............................................................................................................................... 7
4.4.1 Downloading SharkSSL ........................................................................................................................ 7
4.4.2 Obtaining the certificate data ................................................................................................................. 7
4.4.3 Obtaining the CA list (Class 2 Root CA) ............................................................................................... 8
4.4.4 Converting the certificate and private key to SharkSSL binary format ................................................ 11
4.4.5 Converting the CA list to SharkSSLPerseCAList binary format .......................................................... 11
4.4.6 Writing the certificate to SX-ULPGN ................................................................................................... 11
4.4.7 Connecting the SX-ULPGN ................................................................................................................. 14
4.5 Preparing to receive the debug log ....................................................................................................... 15
5. Building and running .............................................................................................................. 16
6. Demo operations confirm in AWS IoT console ....................................................................... 18
7. Appendix ............................................................................................................................... 19
7.1 How to upgrade drivers ......................................................................................................................... 19
Revision History ............................................................................................................................ 21
Note:
AWS is a trademark of Amazon Web Services, Inc. (https://aws.amazon.com/trademark-guidelines/)
FreeRTOS is a trademark of Amazon Web Services, Inc. (https://freertos.org/copyright.html)
GitHub
®
is a trademark of GitHub, Inc. (https://github.com/logos)