Sparklet on eStorm-C2

Running Sparklet on Renesas RH850 based eStorm-C2

This comprehensive guide outlines the essential steps for running Sparklet powered UI application on the Renesas RH850 based eStorm-C2 board. eStorm-C2, from Embien, is an automotive instrument cluster reference kit that can be quickly used to develop cluster software. While this tutorial is specific to running Sparklet on the eStorm-C2, the concept is same for any other RH850 based board.

It’s crucial to follow these instructions meticulously and sequentially to guarantee a smooth setup on your target device. If you’re new to Sparklet, it’s advisable to begin by familiarizing yourself with the basic concepts and completing the quick tour tutorial in the following order.

Also get to know about the board more via its Quick Start Guide.

These will help you grasp the fundamentals of Sparklet, and the workflow involved in GUI development.

Prerequisites

This section contains the pre-requisites for running Sparklet on any RH850 platform.

Hardware components

  • Renesas RH850 based eStorm-C2 board or your custom board.

  • E1 Emulator to connect to your board.

  • A serial cable to connect the emulator to your PC and power supply adapter for your board. (12V for eStorm-C2).

Software components

  • Multi IDE from Green Hills Software

  • Renesas Flash Programmer

  • Renesas eFlashloader

If any of these are not available, kindly install them as per the vendor instructions.

Sparklet Example Code Organization

Uncompress the example project, estorm_c2_galactus.zip in this case, on to your working directory. (e.g. E:RenesasRH850estorm_c2_galactus).

The provided Green Hills Multi Build project for eStorm C2 contains everything you need to create, compile, link and flash a Flint UI application for the Renesas RH850 target. This example is running on top of FreeRTOS with screen elements dynamically modified for demo and the screen looks like.

Galactus - Instrument Cluster Main screen

Galactus - Instrument Cluster Main screen

The Flint project for the same can be downloaded from Downloads Section.

After unpacking, you will find the following subdirectories:

Directory

Description

\src

This folder contains a demo application prepared for the 7” Touch version of eStorm-C2 a dedicated screen size (1280x480 pixel). This project contains the necessary profile settings for the Renesas RH850 target. This folder contains the file main.c. There you will find the initialization of the system and the FreeRTOS task to drive a Flint application.

\src\device

This folder contains the necessary Renesas RH850 device files.

\src\driver

This folder contains the necessary Renesas RH850 drivers.

\middleware\rglxxx

This folder contains Sparklet library and Renesas Graphic Library (RGL) files.

\middleware\rglxxx

This folder contains Sparklet library (RGL) files.

\src\ui_app

This folder contains the prepared application files specific to the example vehicle instrument cluster built using Flint.

Of these some files of interest are:

File

Description

flint_ids.h

This file contains all IDs of the Flint project.

flint_data_def.h

This file contains all Data IDs of the Flint project.

model_galactus.c

This file contains all application APIs.

main.c

This file contains basic board support initialization and FreeRTOS task creation.

display_task.c

This file contains basic Sparklet initialization and runs Sparklet engine.

Int_flash_block.srec

Image file output exported from Flint.

Building the Sparklet Example

The following steps capture the procedure to build and flash the application using the Multi toolchain.

Building the Project

  • Open the top project file estorm_c2->default.gpj

    Application software project file

    Application software project file

  • Build the project by clicking on the Build icon icon.

    Build details page

    Build details page

  • On successful build, the following output are available:

    Output run files

    Output file

While this file contains the code, the assets are to be loaded separately on to the external flash.

Loading the external flash with Flint image

The eFlashloader module is used to image srec file into the external flash.

  • Run eFLASHLOAD.exe in path -> eFLASHLOAD_V307, the screen below will appear.

    eFLASHLOAD module

    eFLASHLOAD module

  • Load the config file

Path : eFLASHLOAD_V307\examples\

File : FLM_D1LM_R7F7014xx_4bit_SerialFLASH.xml

Config file setup

Config file setup

  • Click icon1 and select the monitor file.

Path : eFLASHLOAD_V307\examples\

File : FLM_D1LM_R7F7014xx_SerialFLASH.rec

Flash monitor setup details

Flash monitor setup details

  • Click icon2 and select the srec file.

Path : Go to the directory where you have your srec file.

File : flash_data.srec

For image, set the address offset to 85000000/00000000.

Flash Image settings

Flash Image settings

  • After above steps, main screen would be as shown below:

    eFLASHLOAD main page reference

    eFLASHLOAD main page reference

  • Now, you can click icon3 to connect the tool with target board through E1.

Once connected, the screen below will appear. Note the status to be Ready and Monitor running in the window.

Monitor running

Monitor running

  • This completes the environment setup. Now click on icon4 to start the process of Erase -> Program -> Verify.

On successful completion, the screen should be as shown below.

Flash complete

Flash complete

  • Now you can disconnect by clicking icon3. You may close the eFLASHLOAD.

Loading the internal flash with Renesas Flash Programmer

The firmware can be flashed on the target via Renesas Flash Programmer (RFP) as given in the below steps.

Step 1 : Create new Renesas flash programmer project by selecting “File-> New Project”

Renesas Flash Programmer

Renesas Flash Programmer

In Create New Project Pop-up Window, Select Micro Controller as “RH850” and Provide Project Name (User Defined), then click the “Connect” option

Creating New Project

Creating New Project

Step 2 : Set clock frequency as 8MHz, then provide “Connect”

Set clock

Set clock

Step 3 : Select Software run file by clicking the Browse option

Loading run file

Loading run file

Load the provided run file at eStorm_c2->bin->src.run in debug Flash programmer

Step 4 : Go to “Operation Settings” window, Select the Command check list Erase, Program, Verify (as shown below),

Operation settings

Operation settings

Step 5 : Select “Operation” window and click “Start” button.

Operation settings1

Run Operation

After flashing the output file, the output will be displayed as shown in the below figure .

Step 6 : Now the option byte “0” to be changed as “FFFD87B7” in the Flash Options window, to disable the hardware watchdog timers.

Flash options

Flash options

Step 7 : Go to “Operation Settings” window, Select the operation “Program Flash Options” from check list (Refer the below image)

Program Flash Options

Program Flash Options

Step 8 : Again, go to the “Operation” window and click “Start” button to complete the operation

Operation Completed

Operation Completed

Debugging the Project with GHS Multi-IDE

While the above steps are suitable for deployment, generally to develop and debug the GHS Multi-IDE can be used as given in the below steps.

  • Open debug page by clicking on Debug icon5 icon on either project file page or build details page.


Debug page

Debug page

  • Click on Connect icon6 icon to connect to the target.

  • In the connection chooser popup, configure the connection details for RH850

    Connection details popup

    Connection details popup

  • On successful connection, program the target by clicking on Download icon7 icon.

  • Reset the board once using Reset icon8 icon and run the project using Go icon9 icon.

  • The board may be disconnected using Disconnect icon10 icon.


Galactus - Instrument Cluster Main screen

Galactus - Instrument Cluster Main screen on target