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.
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
Build the project by clicking on the Build icon.
On successful build, the following output are available:
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.
Load the config file
Path : eFLASHLOAD_V307\examples\
File : FLM_D1LM_R7F7014xx_4bit_SerialFLASH.xml
Click and select the monitor file.
Path : eFLASHLOAD_V307\examples\
File : FLM_D1LM_R7F7014xx_SerialFLASH.rec
Click 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.
After above steps, main screen would be as shown below:
Now, you can click 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.
This completes the environment setup. Now click on to start the process of Erase -> Program -> Verify.
On successful completion, the screen should be as shown below.
Now you can disconnect by clicking . 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”
In Create New Project Pop-up Window, Select Micro Controller as “RH850” and Provide Project Name (User Defined), then click the “Connect” option
Step 2 : Set clock frequency as 8MHz, then provide “Connect”
Step 3 : Select Software run file by clicking the Browse option
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),
Step 5 : Select “Operation” window and click “Start” button.
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.
Step 7 : Go to “Operation Settings” window, Select the operation “Program Flash Options” from check list (Refer the below image)
Step 8 : Again, go to the “Operation” window and click “Start” button to complete the operation
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 icon on either project file page or build details page.
Click on Connect icon to connect to the target.
In the connection chooser popup, configure the connection details for RH850
On successful connection, program the target by clicking on Download icon.
Reset the board once using Reset icon and run the project using Go icon.
The board may be disconnected using Disconnect icon.