RL78 Project Configuration Tips Renesas Electronics America Inc.
Renesas Technology & Solution Portfolio 2
Microcontroller and Microprocessor Line-up 2010 2012 32-bit 8/16-bit 1200 DMIPS, Superscalar Automotive & Industrial, 65nm 600µA/MHz, 1.5µA standby 500 DMIPS, Low Power 8/16-Bit True Low Power High Efficiency & Integration Automotive & Industrial, 90nm 600µA/MHz, 1.5µA standby 165 DMIPS, FPU, DSC Industrial, 90nm 200µA/MHz, 1.6µA deep standby 25 DMIPS, Low Power Industrial & Automotive, 150nm 190µA/MHz, 0.3µA standby 10 DMIPS, Capacitive Touch Wide Industrial Format & Automotive, LCDs 130nm 350µA/MHz, 1µA standby 1200 DMIPS, Performance Automotive, 40nm 500µA/MHz, 35µA deep standby 165 DMIPS, FPU, DSC Industrial, 40nm 200µA/MHz, 0.3µA deep standby Embedded Security, ASSP Industrial, 90nm 1mA/MHz, 100µA standby 44 DMIPS, True Low Power Industrial & Automotive, 130nm 144µA/MHz, 0.2µA standby 3
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. 4
Agenda e 2 studio Project wizard Configuration Project Template configuration Clock Interrupt Other Peripheral Initialization Option Byte and Security ID configuration Section configuration Optimization Configuration 5
RL78/G14 RDK s User Features RS-232 TK Debug Digital sensors Temp & Accel Graphics LCD Gainspan Wi-fi RL78/G14 MCU Application header WiFi Eink display LED Ring FET TRIAC 6
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 e 2 studio version 1.1 http://www.renesas.com/products/tools/ide/ide_e2studio/downloads.jsp RL78 GNU compiler version 12.02 http://www.kpitgnutools.com 7
Definition of Terms Software Elements e 2 studio 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 8
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
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
Target-specific Settings Select toolchain version if multiple versions installed Select Debug hardware Select Target 11
Project Configuration Select configuration Hardware Debug Simulator Debug Custom Debug Release Selection determines initially active build configuration 12
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
e 2 Studio 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
Hardware Configuration Add the clock initialization Add peripheral initialization 15
Interrupt Handler Configuration Modify the default interrupt handler 16
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
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
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
Common Issues Can t find the TK interface under hardware debug configuration in e2studio? -> There is no TK interface options available in the e 2 studio. E1 debug option serves for both TK interface and E1 emulator connection. I started the debugger but can t see the code on the debug window? -> Check if you have switch to the debug perspective from the C/C++ perspective. Can t connect e 2 studio 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
Lab Time! Please refer to the Lab Handout and let s get started! 21
Questions? 22
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
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 e 2 studio project template?? a) size b) speed c) No optimization d) Size and speed 24
Pop Quiz Q: Name the perspectives available in the e 2 studio? 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) Code will compile fast b) Library Code will be optimized c) A and B d) Library code can be debug along with other source code 25
Renesas Electronics America Inc.