You are on page 1of 26

RL78 Project Configuration Tips

Renesas Electronics America Inc.


2012 Renesas Electronics America Inc. All rights reserved.

Renesas Technology & Solution Portfolio

2012 Renesas Electronics America Inc. All rights reserved.

Microcontroller and Microprocessor Line-up


2010
1200 DMIPS, Superscalar
Automotive & Industrial, 65nm 600A/MHz, 1.5A standby

2012
1200 DMIPS, Performance
Automotive, 40nm 500A/MHz, 35A deep standby

32-bit

500 DMIPS, Low Power


Automotive & Industrial, 90nm 600A/MHz, 1.5A standby

8/16-Bit True Low Power High Efficiency & Integration

165 DMIPS, FPU, DSC


Industrial, 40nm 200A/MHz, 0.3A deep standby

165 DMIPS, FPU, DSC


Industrial, 90nm 200A/MHz, 1.6A deep standby

Embedded Security, ASSP


Industrial, 90nm 1mA/MHz, 100A standby

25 DMIPS, Low Power


8/16-bit

Industrial & Automotive, 150nm 190A/MHz, 0.3A standby

44 DMIPS, True Low Power


Industrial & Automotive, 130nm 144A/MHz, 0.2A standby

10 DMIPS, Capacitive Touch


Industrial & Automotive, Wide Format LCDs 130nm 350A/MHz, 1A standby

2012 Renesas Electronics America Inc. All rights reserved.

Enabling The Smart Society


Challenge: MCUs continue to become more complex especially when creating applications to enable the Smart Society, and therefore the Software becomes more complex as well. As a result Project schedules do not always scale accordingly and requires tips and tricks from the MCU supplier to configure the MCU which works best with the application. Solution:
This class provides tips and tricks for how to configure the Renesas new IDE Eclipse with GNU compiler to quickly develop RL78 application.

2012 Renesas Electronics America Inc. All rights reserved.

Agenda
e2studio Project wizard Configuration Project Template configuration
Clock Interrupt Other Peripheral Initialization

Option Byte and Security ID configuration Section configuration Optimization Configuration

2012 Renesas Electronics America Inc. All rights reserved.

RL78/G14 RDKs User Features


TK Debug RS-232 Digital sensors Temp & Accel Gainspan Wi-fi RL78/G14 MCU Graphics LCD

Application header WiFi

Eink display

LED Ring

FET

TRIAC

2012 Renesas Electronics America Inc. All rights reserved.

Lab Platform
Hardware Platform
RL78/G14 RDK R5F104PJ device, 256KB Flash, 8KB Data Flash, 24KB SRAM. USB cable for power and debug communication OCD Debugger (TK debugger)

Software Platform
e2studio version 1.1
http://www.renesas.com/products/tools/ide/ide_e2studio/downloads.jsp

RL78 GNU compiler version 12.02


http://www.kpitgnutools.com

2012 Renesas Electronics America Inc. All rights reserved.

Definition of Terms
Software Elements
e2studio Eclipse based Integrated Development Environment for Renesas Microcontroller families RL78, RX, V850, SH.

Perspective A perspective is like a page in a book which contains set of views.

Debug Perspective

2012 Renesas Electronics America Inc. All rights reserved.

Definition of Terms (Cont.)


Software Elements (cont.)
View: A perspective consists of a number of sub-windows, called views.

Option Byte: Four bytes which configure the RL78 at boot-up. Security ID: A 10 bytes code provides on-chip debug security ID to prevent third parties from reading RL78 memory content.

Hardware Elements
TK interface On-chip debug emulator for RL78 device. RDK Renesas Demonstration Kit
9 2012 Renesas Electronics America Inc. All rights reserved.

RL78 Project Wizard


Enter new project name Select Sample Project type
New project will include startup code and skeleton main() Project builder will generate a fully linked application

Select toolchain
Toolchain architecture will influence subsequent wizard pages

10

2012 Renesas Electronics America Inc. All rights reserved.

Target-specific Settings
Select toolchain version if multiple versions installed Select Debug hardware Select Target

11

2012 Renesas Electronics America Inc. All rights reserved.

Project Configuration
Select configuration
Hardware Debug Simulator Debug Custom Debug Release

Selection determines initially active build configuration

12

2012 Renesas Electronics America Inc. All rights reserved.

Library Configuration
Select library source
Newlib library complete ISO C library supporting C/C++ code Optimized library subset of ISO C library supporting C code

Select required library header files Select library Type


Pre-built for convenience Project-built for sourcelevel debugging

13

2012 Renesas Electronics America Inc. All rights reserved.

e2Studio Project Layout


Project source files typically located within src folder Multiple build configurations per project
Release Hardware Debug Debug (simulator)

Build output located in corresponding build configuration folders

14

2012 Renesas Electronics America Inc. All rights reserved.

Hardware Configuration
Add the clock initialization Add peripheral initialization

15

2012 Renesas Electronics America Inc. All rights reserved.

Interrupt Handler Configuration


Modify the default interrupt handler

16

2012 Renesas Electronics America Inc. All rights reserved.

Option Byte and Security ID Configuration


Security ID
allows authentication before debug

Option byte

Location0xC0H to 0xC3H 0xC0H: WDT setting 0xC1H: LVD voltage setting 0xC2H: Oscillator speed selection 0xC3H: Enable/Disable on-chip debug function

17

2012 Renesas Electronics America Inc. All rights reserved.

Section Configuration
List all the sections in the project in the sections Viewer Easy to add a new section
Add expression/label Defines the start addess Follow from the previous section

18

2012 Renesas Electronics America Inc. All rights reserved.

Optimization Configuration
Limited set of options available via quick settings dialog
Optimisation for speed, size or both Debug information no effect on generated code Warnings simplified control of warning groups List files compiler, assembler, linker listings

19

2012 Renesas Electronics America Inc. All rights reserved.

Common Issues
Can t find the TK interface under hardware debug configuration in e2studio? -> There is no TK interface options available in the e2studio . E1 debug option serves for both TK interface and E1 emulator connection. I started the debugger but cant see the code on the debug window? -> Check if you have switch to the debug perspective from the C/C++ perspective. Cant connect e2studio to RDK board for the debug session? -> Check the SW5 DIP-switch setting on the board as: 1:OFF; 2:ON; 3:OFF ; 4:OFF
20 2012 Renesas Electronics America Inc. All rights reserved.

Lab Time!
Please refer to the Lab Handout and lets get started!

21

2012 Renesas Electronics America Inc. All rights reserved.

Questions?

22

2012 Renesas Electronics America Inc. All rights reserved.

Enabling The Smart Society in Review


Challenge: MCUs continue to become more complex especially when creating applications to enable the Smart Society, and therefore the Software becomes more complex as well. As a result Project schedules do not always scale accordingly and requires tips and tricks from the MCU supplier to configure the MCU which works best with the application.
This class provides tips and tricks for how to configure the Renesas new IDE Eclipse with GNU compiler to quickly develop RL78 application.

Do you agree that we accomplished the above statement?

23

2012 Renesas Electronics America Inc. All rights reserved.

Pop Quiz
Q: what configuration can be done using Renesas quick setting dialogue?
a) optimization b) Warning level setting c) Linker output files d) None of the above

Q: What is the default optimization setting in the e2studio project template??


a) b) c) d) size speed No optimization Size and speed

24

2012 Renesas Electronics America Inc. All rights reserved.

Pop Quiz
Q: Name the perspectives available in the e2studio ?
a) C/C++ Perspective b) Renesas Debug Perspective c) None of the above d) Linker file setting

Q: What is the advantage of using the project built library??


a) b) c) d) Code will compile fast Library Code will be optimized A and B Library code can be debug along with other source code

25

2012 Renesas Electronics America Inc. All rights reserved.

Renesas Electronics America Inc.


2012 Renesas Electronics America Inc. All rights reserved.

You might also like