Debugging and flashing Renesas RZ/T1

In following sections are information provided about how to setup Renesas RZ/T1 board for debugging and flashing the GOAL software.

General documents about the RZ/T1-Starter-Kit-Plus are provided by Renesas.

Software requirements

Please make sure that the following components are installed on the computer.

 

Table: Development Tools required by RZ/T1

Tool

Version

IAR Embedded Workbench for ARM

8.30.2

IAR C/C++ Compiler for ARM

8.30.2

 

Optional software is not urgently but recommended for facilitated development.

  • Terminal Emulator: Log messages will be printed to the UART of the CPU Board.

Hardware requirements

The board hardware is part of the RZ/T1 Starter Kit Plus distributed by Renesas.

GOAL software is developed and tested on hardware revision RTK7910022C00000BR.

Using another hardware revision is possible on own risk. Please note the changelog of the hardware in this case. The document is provided by the hardware manufacturer.

Additionally, an IAR Systems I-jet is required for downloading and debugging.

Board setup

The following figure shows the RZ/T1 board with labeled parts for setup.

 

Figure: RZ/T1 board setup

 

  • check the DC voltage of the power supply (5V)

  • set the JP2 jumper to pins 2-3 (5V input voltage).

  • set SW4 to boot mode to SPI boot mode according to the table below.

Table: SW4 configuration for boot mode

 

SW4:1

SW4:2

SW4:3

SW4:4

SW4:5

SW4:6

SPI boot mode

ON

ON

ON

ON

ON

OFF

NOR boot mode

ON

OFF

ON

ON

ON

OFF

RAM mode

any other

 

  • connect the IAR Systems I-jet to ARM JTAG 20

  • connect mini-USB cable to Serial interface (optional)

  • plug DC 5V power supply to power up the board

Running a sample project

The GOAL software for RZ/T1 device is either offered in full source or library version.

The IAR Embedded Workbench projects are placed in the GOAL project directories projects/**/iar/renesas/rzt1_r4f_iram1 for Cortex-R4F and in projects/**/iar/renesas/rzt1_m3_iram1 for Cortex-M3.

 

The RZ/T1 board system is initial setup by the loader function loader_init2() on Cortex-R4F. Among other things, this loader function copies the Cortex-M3 image from flash into RAM and releases the core from reset afterwards by init_cm3(). Starting Cortex-M3 without the Cortex-R4F loader_init2() is not supported.

But because some projects are designed to run on Cortex-M3 only, GOAL provides the rzt1_r4f_loader project. It is placed in projects/00000/rzt1_r4f_loader/iar/renesas/rzt1_r4f_iram and used to start Cortex-M3 single core projects by running loader_init2() only.

In single core projects of the Cortex-R4F the loader_init2() is used too, but with an excluded init_cm3(). Thus, the Cortex-M3 will not be initialized.

 

Previewing the sections of downloading GOAL software to RZ/T1 board, the following table summarizes all options.

 

Table: overview of single and multi-core project setup for RZ/T1

 

Cortex-M3

Cortex-R4F

Cortex-M3 single core project

Cortex-M3 binary image named rzt1_m3_boot.bin and placed in projects/00000/rzt1_r4f_loader/iar/renesas/rzt1_r4f_iram

projects/00000/rzt1_r4f_loader/iar/renesas/rzt1_r4f_iram with workspace option Boot Serial Flash - Dual Core

Cortex-R4F single core project

-

Cortex-R4F project with workspace option Boot Serial Flash

RZ/T1 multi-core project

Cortex-M3 binary image of CC project named rzt1_m3_boot.bin and placed into the IAR project directory of Cortex-R4F

AC project with workspace option Boot Serial Flash - Dual Core

Build and download Cortex-R4F image to RZ/T1

GOAL supports the SPI boot mode on RZ/T1. Please verify, that the DIP switch configuration of SW4 is set correctly.

  • Open the IAR Embedded Workspace of a Cortex-R4F project.

  • Select Boot Serial Flash - Dual Core or Boot Serial Flash from the Workspace dropdown menu.

 

Figure: choosing Cortex-R4F single or dual core project

By choosing option Boot Serial Flash - Dual Core, a Cortex-M3 binary image named rzt1_m3_boot.bin is required, which has to be placed in the Cortex-R4F IAR project directory. This file will be added into Cortex-R4F image when building the software. When booting RZ/T1, the Cortex-R4F loader function loader_init2() read the Cortex-M3 image by init_cm3() from flash and releases the core from reset afterwards.

By choosing option Boot Serial Flash no Cortex-M3 binary image is needed and no image will be loaded by RZ/T1 loader functionloader_init2().

  • Build the software by Project → Rebuild All

  • Download the software by Project → Download and Debug or use the symbol on the tool bar.

 

Figure: symbol for Download and Debug Cortex-R4F project to RZ/T1

  • The target will break at main(). If the project option Boot Serial Flash - Dual Core was selected, the Cortex-M3 software image has already been loaded and started.

  • press F5 to release the core from break

Downloading the software without starting a debug session is possible by choosing Project → Download → Download active application

Build and download Cortex-M3 image to RZ/T1

  • Open the IAR Embedded Workspace of a Cortex-M3 project.

  • Build the image by Project → Rebuild All

A post build script will copy the new rzt1_m3_boot.bin image to all IAR Workbench projects for Cortex-R4F in GOAL workspace if the build was successful.

Any existing rzt1_m3_boot.bin image in IAR Workbench projects for Cortex-R4F will be overwritten!

Download an existing Cortex-M3 image to RZ/T1

The Cortex-M3 is used as Communication Core (CC) in multi-core network protocol stacks.

Building the Cortex-M3 image of multi-core network protocol stacks is not possible in library version of a GOAL release. The software is provided as rzt1_m3_boot.bin binary instead.

Copy the file to the related IAR Workbench project directory of Cortex-R4F manual and follow description in https://portgmbh.atlassian.net/wiki/spaces/GOALR/pages/214007941#Build-and-download-Cortex-R4F-image-to-RZ%2FT1

 


1 The symbol ** is used as wildcard. It includes all projects and their subdirectories.