# R-Car D3 Custom Integrity BSP

# R-Car H3 Integrity BSP: Prerequisites

#### <a class="anchor" id="bkmrk-"></a>Hardware: Renesas RCarH3 Merload board

CGI Studio has been tested on Renesas RCarH3 Merload board.

#### <a class="anchor" id="bkmrk--0"></a>CMake

In order to build Candera, the Meta build system CMake needs to be installed with at least version mentioned <span style="color: rgb(230, 126, 35);">[here](https://doc316en.candera.eu/books/build-system-setup/page/prerequisites)</span>.  
CMake is able to create the cross compilation make files that can be used with Green Hills MULTI compiler.

#### <a class="anchor" id="bkmrk--1"></a>MinGW

To allow cross compilation with makefiles, MinGW 5.1.6 was used for this release.

#### <a class="anchor" id="bkmrk--2"></a>Green Hills Toolchain

The build tool chain is not part of the delivery. Green Hills MULTI compiler, Green Hills Integrity and the according Renesas BSP and RGL driver have to be obtained directly from Green Hills or Renesas and installed according to their installation guide.

CGI Studio was tested with **MULTI IDE 6.1.4, Compiler 2013.5.4** and **INTEGRITY for ARM v11.4.4**

The Green Hills Probe was setup with **Green Hills Probe Firmware prerelease Version 5.4.4**.

#### <a class="anchor" id="bkmrk--3"></a>Renesas Graphics Library

The graphics driver is not part of this release. CGI Studio was integrated and tested with the H3Hx RGL SGX540 driver Version V1.0

# Running the Player Demo Application on R-Car H3 Integrity

#### <a class="anchor" id="bkmrk-"></a>Asset

An asset (statically linked) has been pre-built and is located here:

<div class="contents" id="bkmrk-%5B...%5D%2Fcgi_studio_cou"><div class="contents"><div class="textblock">- \[...\]/cgi\_studio\_courier\_apps/src/CourierSampleApp/Assets/AssetLibCff\_RCarH3\_Integrity\_Target.bin

</div></div></div>#### <a class="anchor" id="bkmrk--0"></a>Asset loading from file system (if required)

<div class="contents" id="bkmrk-note%3A-application-si"><div class="contents"><div class="textblock"><dl class="note"><dt>**Note:**</dt><dd>Application side only, this is not part of the original port.</dd></dl></div></div></div>To enable set:

<div class="contents" id="bkmrk-%23define-__load_asset"><div class="contents"><div class="textblock">- ```
     #define __LOAD_ASSET_FROM_FILE 
    ```

</div></div></div>in:

<div class="contents" id="bkmrk-%5B...%5D%2Fcgi_studio_cou-0"><div class="contents"><div class="textblock">- \[...\]/cgi\_studio\_courier\_apps/src/CourierSampleApp/AppPlatform/Target\_RCarH3Integrity\_ARM/AppEnvironment.cpp

</div></div></div>and set this variable to the correct file system path:

<div class="contents" id="bkmrk-courier%3A%3Achar-%2A-cass"><div class="contents"><div class="textblock">- Courier::Char \* cAssetFileName = "...";

</div></div></div>also, remove:

<div class="contents" id="bkmrk--rawimport-%24%7Basset_t"><div class="contents"><div class="textblock">- -rawimport ${ASSET\_TARGET\_LOCATION}

</div></div></div>from 'LINK\_FLAGS' in:

<div class="contents" id="bkmrk-%5B...%5D%2Fcgi_studio_cou-1"><div class="contents"><div class="textblock">- \[...\]/cgi\_studio\_courier\_apps/src/CourierSampleApp/AppPlatform/Target\_RCarH3Integrity\_ARM/KernelTargets/KernelTargets.cmake

</div></div></div>#### <a class="anchor" id="bkmrk--1"></a>SceneComposer Solution

<div class="contents" id="bkmrk-%5B...%5D%2Fcgi_studio_cou-2"><div class="contents"><div class="textblock">- \[...\]/cgi\_studio\_courier\_apps/src/CourierSampleApp/SCSolution/RCarH3

</div></div></div>#### <a class="anchor" id="bkmrk--2"></a>Flash

<div class="contents" id="bkmrk-in-multi-%28v7.4.1%29-la"><div class="contents"><div class="textblock">- in MULTI (v7.4.1) Launcher choose 'Open Debugger' -&gt; C:/ghs/int1144/config/bin/multivisor\_vm0\_vm1\_mono
- (if not yet done) load 'CANDERA\_default.con' from 'Target' -&gt; 'Show Connection Organizer'
- press 'F5' (green arrow button) and select: 
    - \* '\[CANDERA\] Flash Kernel (mpserv) for Renesas R-Car H3'
    - \* select 'Download to RAM' when asked
- chose 'File' -&gt; 'Debug as new Entry' -&gt; \[...\]/CourierSampleApp\_RCarH3Platform\_Target\_RCarH3Integrity\_ARMIntDyn
- chose 'Debug' -&gt; 'Prepare Taget' and select: 
    - \* '\[CANDERA\] Load Dynamic Download (rtserv2) for Renesas R-Car H3'
- wait until application is loaded (~ half a minute)

</div></div></div>#### <a class="anchor" id="bkmrk--3"></a>Notes

<div class="contents" id="bkmrk-the-result-of-the-bu"><div class="textblock">- the result of the build will be a dynamic build file: 
    - "CourierSampleApp\_RCarH3Platform\_Target\_RCarH3Integrity\_ARMIntDyn"
- along with the sample app two additional VAS are loaded (but not started): 
    - -&gt; noload\_as\_1 (WM\_Server\_as0) and noload\_as\_2 (MMGR\_Server\_as0)
- this is a workaround to overcome a dynamic download issue not solved yet.

</div></div>

# Building Own Application for R-Car H3 Integrity

#### <a class="anchor" id="bkmrk-"></a>Integrity base folders

<div class="contents" id="bkmrk-integrity-os%3A-c%3A%2Fghs"><div class="contents"><div class="textblock">- Integrity OS: C:/ghs/int1144/multivisor
- MULIT + compiler: C:/ghs/comp\_201714

</div></div></div>#### <a class="anchor" id="bkmrk--0"></a>CMAKE source path

<div class="contents" id="bkmrk-%5B...%5D%2Fcgi_studio_cou"><div class="contents"><div class="textblock">- \[...\]/cmake/Apps/Courier/CourierSampleApp

</div></div></div>#### <a class="anchor" id="bkmrk--1"></a>CMAKE configuration &amp; generation

<div class="contents" id="bkmrk-use-generator-for-%22m"><div class="contents"><div class="textblock">- use generator for "MinGW Makefiles" (install MinGW for win32 if needed)
- use toolchain file: \[...\]/cgi\_studio\_devices/src/RCarH3/ToolchainFiles/MULTI-toolchain-RCarH3.txt

</div></div></div>#### <a class="anchor" id="bkmrk--2"></a>CMAKE variables to set

<div class="contents" id="bkmrk-courier_platform%3Drca"><div class="contents"><div class="textblock">- COURIER\_PLATFORM=RCarH3Platform
- COURIER\_PLATFORM\_CONFIG=Target\_RCarH3Integrity\_ARM

</div></div></div>#### <a class="anchor" id="bkmrk--3"></a>make command (win32 command console)

<div class="contents" id="bkmrk-mingw32-make"><div class="textblock">- mingw32-make

</div></div>