# R-Car D3 Draak Integrity BSP

# R-Car D3 Draak Integrity BSP: Prerequisites

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

CGI Studio has been tested on Renesas RCarD3 Draak 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 7.1.6, Compiler 2018.1.4** and **INTEGRITY for ARM v11.7.8**

The Green Hills Probe was setup with **Green Hills Probe Firmware Version 5.6.4**, configuration rcar-d3.ghpcfg (included in BSP).

#### <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 D3Hx RGL SGX540 driver Version V1.0

# Running the Player Demo Application on R-Car D3 Draak Integrity

#### <a class="anchor" id="bkmrk-"></a>Logging Output and Key Input

Use any terminal software to connect to the target via COM to receive logging output and use key input. BaudRate needs to be set to 115200.

#### <a class="anchor" id="bkmrk--0"></a>Download the Application

To download and debug the application you need a Green Hills probe according to the Prerequisites. In the Connection Organizer open the default.con from your BSP (devtree-arm64).

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

In the MULTI launcher select “Open debugger” and direct to your build folder. There choose the Monolith (this is the file without file extension and the application name and the word Monolith in it). Then hit F5 and connect to target via “Green Hills Probe Connection (mpserv) for Renesas R-Car Gen3”. Choose “Download to RAM”. After the application is downloaded, the Player application starts. In the terminal press “h” to get the menu.

#### <a class="anchor" id="bkmrk--2"></a>Loading the asset

The Player demo application has the asset file added by the linker. It will be loaded to RAM together with the application. You have to select the asset file in CMake via the variable ASSET\_TARGET\_LOCATION before you build the application.

# Building Own Application for R-Car D3 Draak Integrity

#### <a class="anchor" id="bkmrk-"></a>Generate Makefiles with CMake

For general information about CGI Studio Build System and CMake properties available to configure Candera applications refer to <span style="color: rgb(230, 126, 35);">[CGI Studio Build System](https://doc316en.candera.eu/books/build-system-setup)</span>.

To configure and generate makefiles for compiling the Player, follow below steps:

<div class="contents" id="bkmrk-point-cmake-to-sourc"><div class="contents"><div class="textblock">1. Point CMake to source directory 
    - Folder containing top-level "CMakeLists.txt", e.g. \\cmake\\Candera\\Player
2. Point CMake to binary directory 
    - May not exist, create folder with CMake if necessary
    - Root directory for generated makefiles / solutions
    - Root directory for build artifacts
3. Configure 
    - Specify MinGW Makefiles as generator for the project
    - Specify tool-chain file for cross-compiling
4. Select the toolchain-file from the delivery (adapt for your toolchain installation and application specific needs) 
    - \\cgi\_studio\_devices\\src\\RCarD3\\ToolchainFiles\\MULTI-toolchain-RCarD3\_draak\_custom\_1.txt
5. Adapt the CMake settings if necessary, e.g.: 
    - CMAKE\_BUILD\_TYPE-&gt; Debug or Release
    - Press Configure
6. Press Generate

</div></div></div>#### <a class="anchor" id="bkmrk--0"></a>Building Application

Via the CMake variable CGIDEVICE\_BSP\_CFG\_NAME, it is possible to choose the BSP library configuration. By default this is set to release (rel), however, it is also possible to choose debug (dbg), checked (chk) resp. coverage (cov).