Getting Started with Open Source Software Using the Renesas RA Product Series

By Jacob Beningo

Contributed By DigiKey's North American Editors

Development teams are encountering several challenges such as development costs, increasing system complexity, shorter development cycles, and even software lock-in. This push to do more with less is becoming a common theme across the embedded industry: there just isn’t time anymore to start a design from scratch. While open source software can be extremely helpful, it can also be risky from an integration, bug, and project timeline perspective, but that is changing.

A unique solution that teams can leverage to solve these challenges is to use emerging open source software platforms. These platforms are often integrated and tested to remove risk and are designed to work with the microcontroller families upon which they are based.

This article will introduce the concept of open source software and describe how platforms lower risk. It will then show how to get started on an open source platform using the Renesas Flexible Software Package (FSP) on the RA series of microcontrollers.

The pros and cons of open source software

Open source software is software with source code that anyone can inspect, modify, and enhance1 within the limits that are set by the software licensing model. Open source software has become a critical asset to development teams because it encourages reuse and provides access to software modules that already exist, with little to no cost. For example, it would take a lot of time and budget to write an RTOS from scratch, and quite a bit more time and resource investment to maintain it over several years. Instead, developers can leverage several open source RTOSs. This allows them to focus more on their application code for differentiation, instead of spending time maintaining the underlying OS.

In development cycles where schedules and budgets are constantly being squeezed, open source software provides a mechanism to allow teams to leverage what already exists and focus on their application code. Open source software also has several benefits beyond saving time and money. These benefits include transparency into the code versus a compiled binary, and often there is access to a global community of like-minded developers.

That said, there is some risk associated with open source software so there are several important considerations that developers need to factor into their decision as to whether or not to work with open source software.

First, not all open source software is globally supported. There is a lot of software out there that was built by someone for fun in their basement or garage. They may support the code for a short time and then move on to some other project that is more interesting to them, leaving the users to fend for themselves.

Second, open source software can come with one of several different licensing models. Some licenses allow the software to be used commercially or for any purpose. Other licenses expect any related code or changes to be shared openly with the community. While this may at first seem quite fair, it is also a potential liability risk and may require the company to release their source code.

Finally, quality can be hit and miss when it comes to open source software. The developers often have a specific idea on what it is they want to build and often are building something that is functional. Functionality does not mean that it will be robust, without bugs, or easily integrated into other software packages or code bases. Quality can be a major stumbling block when using open source software, so the user needs to be careful.

De-risk open source with Renesas’ FSP

To minimize the risk of open source, while maximizing the benefits, developers can leverage software that has already been integrated, tested, and supported by a reputable provider. This is the purpose of the Renesas RA series FSP.

The Renesas RA series is interesting because beyond the hardware, the platform provides open source software in the form of its FSP (Figure 1). The FSP provides all the software required to get the microcontroller up and running, including board support package (BSP), hardware abstraction layer (HAL), and several middleware stacks. The FSP also includes FreeRTOS, an open source RTOS that is popular among developers. The software has also been integrated and tested so that developers can start writing their application code immediately and minimize the time spent worrying about low-level hardware.

Diagram of integrated software stacks that work immediately out of the boxFigure 1: The FSP provides integrated software stacks that work immediately out of the box and are easily configurable. (Image source: Renesas)

The FSP is designed to work only with the Renesas RA series of microcontrollers. Getting started with the platform is easy but requires developers to first select a development board.

Selecting a Renesas RA series development board

The Renesas RA series is divided into four main processor family groups that include the RA2, RA4, RA6 and RA8 series. Each processor family is tailored to a slightly different performance group and provides either an Arm® Cortex®-M23, Cortex-M33 or Cortex-M4 processor (Figure 2). The available flash and features scale upwards from the RA2 to the RA8 series, with the power consumption scaling upwards accordingly.

Diagram of Renesas RA series of microcontrollersFigure 2: The Renesas RA series of microcontrollers is broken up into four general families that provide various performance ranges through several different Arm Cortex-M processor cores. (Image source: Renesas)

When deciding which development board to use, it can be helpful to first identify the end application. For example, for a low-power control or interface application in healthcare, office or measuring equipment, the RTK7EKA2A1S00001BU (EK-RA2A1) would be a good match (Figure 3). This has a low-power RA2A1 48 megahertz (MHz) Arm Cortex-M23 processor supported by 256 kilobytes (Kbytes) of flash and 32 Kbytes of RAM. The development board is also mostly bare except for a few expansion connectors, which are perfect for external sensor or actuator interfacing. It includes an on-board debugger, pushbutton, potentiometer, and a capacitive touch button.

Image of Renesas EK-RA2A1 development boardFigure 3: The EK-RA2A1 contains a wide range of expansion connectors making it perfect for control applications and external sensor interfacing. (Image source: Renesas)

For a more advanced application such as an IoT, industrial, home appliance or meter product, a developer may look slightly higher to the EK-RA4M1 (RTK7EKA4M1S00001BU) development board. The EK-RA4M1 is powered by an RA4M1 Arm Cortex-M4 processor, also running at 48 MHz, and also supported by 256 Kbytes of flash and 32 Kbytes of RAM. This board is also designed for low-power applications.

For applications that require higher performance, an LCD, Internet connectivity, advanced security, and other high-end features, developers may want to look at the RTK7EKA6M2S00001BU (EK-A6M2) or the RTK7EKA6M3S00001BU (EK-A6M3) development board. The EK-A6M2 is based on the RA6M2, an Arm Cortex-M4 processor running at 120 MHz and supported by up to 1024 Kbytes of flash and 384 Kbytes of RAM.

The EK-A6M2 development board again just provides the base features such as headers, potentiometer, and button. This is a great low-cost board that allows a developer to get in and start using the development environment, software, and understand the hardware.

The EK-A6M3 development board is more fun to play with (Figure 4). This board is based on an RA6M3 Arm Cortex-M4 processor, also running at 120 MHz, but supported by up to 2048 Kbytes of flash and 640 Kbytes of RAM.

Image of Renesas EK-A6M3 development board for the RA6M3 processorFigure 4: The EK-A6M3 development board for the RA6M3 processor has 32 Mbytes of external QSPI flash for graphics application data to support a graphics expansion board to work with a graphics accelerator and touch features. (Image source: Renesas)

The EK-A6M3 comes with a graphics expansion board that allows a developer to work with the graphics accelerator and touch features. The board comes with an Ethernet jack, PMOD expansions and microbus connectors. The development board also comes with 32 megabytes (Mbytes) of external QSPI flash for graphics application data. Developers will find that they also have access to a 4.3 inch (in.) TFT color LCD with a resolution of 480 x 272 with a capacitive touch overlay.

Writing a first application with the FSP

There are several steps that a developer will need to follow in order to get started with their first FSP application.

  1. Select one of the development boards from the last section that best fits an application need.
  2. Download and install the e2 Studio IDE. e2 Studio allows a developer to create projects, manage software components and write their application code. Developers can also run debug sessions and interact with their development board.
  3. Download and install the FSP.

Once these steps have been followed, a developer can open e2 Studio and create a new project using the following steps:

  1. File -> New -> RA C/C++ Project.
  2. Select Renesas RA C Executable Project and then next (Figure 5).

    Image of FSP project is created by leveraging the Renesas RA C Executable Project templateFigure 5: An FSP project is created by leveraging the Renesas RA C Executable Project template. (Image source: Beningo Embedded Group)

  3. A developer then provides their project name and selects important project parameters such as (Figure 6):
    1. The FSP version that will be used
    2. The development board model
    3. The microcontroller device
    4. The RTOS that will be used (if one will be used at all)

Image of device and software parametersFigure 6: Developers select the important device and software parameters when creating their project. (Image source: Beningo Embedded Group)

Once the project has been created, developers can then use the IDE to develop their application code and use the e2 Studio Stacks Configuration tool to configure integrated drivers, frameworks and open source software within their project.

Tips and tricks for working with open source software

Leveraging open source software has become critical to allowing development teams to accelerate development and keep costs under control. In order to leverage open source software successfully, there are several “tips and tricks” teams should keep in mind such as:

  • Select software that has an active community, not a one-off example from GitHub or a similar service.
  • Perform a software audit and quality analysis of the open source software code base.
  • Have the software license reviewed by an attorney to ensure that it is properly understood.
  • Use an abstraction layer to remove dependencies. This will allow that software package to be easily removed later if needed.
  • Leverage integrated software when possible to minimize issues.

Developers that follow these “tips and tricks” will find that they save quite a bit of time and grief when working towards securing their IoT device.

Conclusion

With embedded system complexity increasing, open source software helps development teams better manage timelines and budgets. However, teams do need to carefully select the open source software they use. There are many unsupported open source software options on the web which can cause unending integration and maintenance issues.

As shown in this article, platforms like the Renesas RA series of microcontrollers, have taken the grunt work out of the equation and provided teams with a solid foundation from which they can start to develop their own applications, preserving both schedules and budgets.

References

  1. https://opensource.com/resources/what-open-source
DigiKey logo

Disclaimer: The opinions, beliefs, and viewpoints expressed by the various authors and/or forum participants on this website do not necessarily reflect the opinions, beliefs, and viewpoints of DigiKey or official policies of DigiKey.

About this author

Image of Jacob Beningo

Jacob Beningo

Jacob Beningo is an embedded software consultant. He has published more than 200 articles on embedded software development techniques, is a sought-after speaker and technical trainer, and holds three degrees, including a Masters of Engineering from the University of Michigan.

About this publisher

DigiKey's North American Editors