Sunteți pe pagina 1din 23
Hands-on 2: RL78 Development Tools Department Name : System Engineering Department 1 System Engineering Division

Hands-on 2: RL78 Development Tools

Department Name : System Engineering Department 1 System Engineering Division Renesas Electronics Singapore Pte Ltd

Presenter’s Name : CHING Chek Mong

Renesas Electronics Singapore Pte. Ltd. Renesas Distributor Training December 2011 – Mumbai & Bangalore

© 2011 RESG Pte. Ltd. All rights reserved.

Topics

Overview of RL78 Development Tools Software Installation Hands-on Session 2 Use CubeSuite+/CG to generate application codes for RL78/G13 TB

RL78 Family Development Tool Lineup

Useful tools at every development stage

Tool Lineup Useful tools at every development stage Coding Coding Debugging Debugging Programming Programming

CodingCoding

DebuggingDebugging

at every development stage Coding Coding Debugging Debugging Programming Programming RRLL7788//GG1133 Programming by
at every development stage Coding Coding Debugging Debugging Programming Programming RRLL7788//GG1133 Programming by

ProgrammingProgramming

RRLL7788//GG1133 Programming by Programmed Renesas Ele. In Renesas Electronics’s Factory In-line programming E1
RRLL7788//GG1133
Programming by
Programmed
Renesas Ele.
In Renesas Electronics’s Factory
In-line
programming
E1
by OCD
OCD with
programming function
In-line
programming
PG-FP5
w/o PC
Flash Memory Programmer
Debugging CubeSuite on PC CPU Simulator Coding/ Building/ CubeSuite Device Driver Debugging E1 by OCD
Debugging
CubeSuite
on PC
CPU Simulator
Coding/
Building/
CubeSuite
Device
Driver
Debugging
E1
by OCD
IDE
On-Chip-Debugger with
Programming function
OS
Itron
IECUBE
Compliance
Debugging
by High Function
Emulator
Real Time OS
In-circuit Emulator

The Flow of Basic Training

Let’s use CubeSuite E1.50e by reading following document.

In this training the target device is RL78/G13. (R5F100LE : 64-pin, 64KByte ROM)
In this training the target device is RL78/G13.
(R5F100LE : 64-pin, 64KByte ROM)

Overview Of The Program

Overview Of The Program Pg 5 © 2011 RESG Pte. Ltd. All rights reserved.

Overview Of The Target Board

QB-R5F100LE-TB

Connector for E1 (14-pin) RL78/G13 (R5F100LE) (64-pin, 64KB ROM) Evaluation LEDs
Connector for E1
(14-pin)
RL78/G13
(R5F100LE)
(64-pin, 64KB ROM)
Evaluation LEDs

Flow

Flow Pg 7 © 2011 RESG Pte. Ltd. All rights reserved.
Flow Pg 7 © 2011 RESG Pte. Ltd. All rights reserved.

Create Project

Create Project Pg 8 © 2011 RESG Pte. Ltd. All rights reserved.

Generate Code – Pin Assignment

The setting is for PIOR register (Peripheral I/O redirection register). Click here after setting PIOR
The setting is for PIOR
register (Peripheral I/O
redirection register).
Click here after
setting PIOR

Generating Code – Clock Setting

Default settings
Default settings

Generating Code – On Chip Debug Setting

Check here
Check here

Generate Cod - Port

Set Output level high (1) Set P62 and P63 as Output port P62 and P63
Set Output level high (1)
Set P62 and P63 as Output port
P62 and P63 are connected LEDs

Generate Code - Timer

Select channel0 “Interval timer”
Select channel0 “Interval timer”
Set Interval value “500ms”
Set Interval value “500ms”

Generate Code – Watchdog Timer

Check here
Check here
Generate Code – Watchdog Timer Check here Push this button Pg 14 © 2011 RESG Pte.
Push this button
Push this button

Edit Source File – r_main.c

Add Code
Add Code

R_TAU0_Channel0_Start();

Edit Source File – r_timer_user.c

Add Code uint8_t g_count; Add Code
Add Code
uint8_t g_count;
Add Code

uint8_t inreg = 0,outreg = 0; inreg = P6.2; outreg = inreg ^ 1; P6.2 = outreg; P6.3 = inreg; g_count++;

Build Project

Build Project Pg 17 © 2011 RESG Pte. Ltd. All rights reserved.

Debug Tool (E1) Setting 1

Right-click here Click here
Right-click here
Click here
Right-click here again Click here
Right-click here again
Click here

Debug Tool (E1) Setting 2

Debug Tool (E1) Setting 2 Pg 19 © 2011 RESG Pte. Ltd. All rights reserved.

Connect E1 to PC

At the first time, the following dialog are upped.

Click here
Click here

The Basic Operation of Debug Tool

Download the program

Go, Stop, Reset

Set breakpoint

Use watch panel

Setting an access break

Display SFR, memory

Disconnect debug tool

Setting an access break Display SFR, memory Disconnect debug tool Pg 21 © 2011 RESG Pte.

Manipulating Panels

CubeSuite has a lot of panels, so it is important to manipulate Panels as following.

Hiding the panel automatically

Displaying the hidden panel

Making the panel float

Moving the panel and docking

the hidden panel Making the panel float Moving the panel and docking Pg 22 © 2011
Renesas Electronics Singapore Pte. Ltd. © 2011 RESG Pte. Ltd. All rights reserved.
Renesas Electronics Singapore Pte. Ltd. © 2011 RESG Pte. Ltd. All rights reserved.

Renesas Electronics Singapore Pte. Ltd.

© 2011 RESG Pte. Ltd. All rights reserved.