rl78 project configuration tips

Upload: fd-hero

Post on 04-Jun-2018

260 views

Category:

Documents


2 download

TRANSCRIPT

  • 8/13/2019 RL78 Project Configuration Tips

    1/26

    Renesas Electronics America Inc.

    2012 Renesas Electronics America Inc. All rights reserved.

    RL78 Project Configuration Tips

  • 8/13/2019 RL78 Project Configuration Tips

    2/26

    2012 Renesas Electronics America Inc. All rights reserved.2

    Renesas Technology & Solution Portfolio

  • 8/13/2019 RL78 Project Configuration Tips

    3/26

    2012 Renesas Electronics America Inc. All rights reserved.3

    Microcontroller and Microprocessor Line-up

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

    44 DMIPS, True Low Power

    Embedded Secur ity, ASSP

    165 DMIPS, FPU, DSC

    1200 DMIPS, Performance1200 DMIPS, Superscalar

    500 DMIPS, Low Power

    165 DMIPS, FPU, DSC

    25 DMIPS, Low Power

    10 DMIPS, Capacit ive Touch

    Industrial & Automotive, 150nm

    190A/MHz, 0.3A standby

    Industrial, 90nm

    200A/MHz, 1.6A deep standby

    Automotive & Industrial, 90nm

    600A/MHz, 1.5A standby

    Automotive & Industrial, 65nm

    600A/MHz, 1.5A standby Automotive, 40nm

    500A/MHz, 35A deep standby

    Industrial, 40nm

    200A/MHz, 0.3A deep standby

    Industrial, 90nm

    1mA/MHz, 100A standby

    Industrial & Automotive, 130nm

    144A/MHz, 0.2A standby

    2010 2012

    32-

    bit

    8/16-

    bit

    8/16-Bit True Low PowerHigh Efficiency & Integration

  • 8/13/2019 RL78 Project Configuration Tips

    4/26

    2012 Renesas Electronics America Inc. All rights reserved.4

    Challenge:

    MCUs continue to become more complex especially whencreating applications to enable the Smart Society, andtherefore the Software becomes more complex as well. As aresult Project schedules do not always scale accordingly andrequires 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 theRenesas new IDE Eclipse with GNU compiler to quickly develop

    RL78 application.

    Enabling The Smart Society

  • 8/13/2019 RL78 Project Configuration Tips

    5/26

    2012 Renesas Electronics America Inc. All rights reserved.5

    Agenda

    e2studio Project wizard Configuration

    Project Template configuration

    Clock

    Interrupt

    Other Peripheral Initialization

    Option Byte and Security ID configuration

    Section configuration

    Optimization Configuration

  • 8/13/2019 RL78 Project Configuration Tips

    6/26

    2012 Renesas Electronics America Inc. All rights reserved.6

    RL78/G14 RDKs User Features

    Eink

    display

    LED

    Ring

    Graphics

    LCD

    Gainspan Wi-fi

    Application header

    WiFi

    RS-232

    Digital sensors

    Temp & Accel

    FET TRIAC

    RL78/G14 MCU

    TK Debug

  • 8/13/2019 RL78 Project Configuration Tips

    7/26 2012 Renesas Electronics America Inc. All rights reserved.7

    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.02http://www.kpitgnutools.com

    http://www.renesas.com/products/tools/ide/ide_e2studio/downloads.jsphttp://www.kpitgnutools.com/http://www.kpitgnutools.com/http://www.renesas.com/products/tools/ide/ide_e2studio/downloads.jsp
  • 8/13/2019 RL78 Project Configuration Tips

    8/26 2012 Renesas Electronics America Inc. All rights reserved.8

    Definition of Terms

    Software Elements

    e2studio Eclipse based Integrated Development Environment forRenesas Microcontroller families RL78, RX, V850, SH.

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

    DebugPerspective

  • 8/13/2019 RL78 Project Configuration Tips

    9/26 2012 Renesas Electronics America Inc. All rights reserved.9

    Definition of Terms (Cont.)

    Software Elements (cont.)

    View: A perspective consists of a number of sub-windows, calledviews.

    Option Byte: Four bytes which configure the RL78 at boot-up.

    Security ID: A 10 bytes code provides on-chip debug security IDto prevent third parties from reading RL78 memory content.

    Hardware Elements

    TK interface On-chip debug emulator for RL78 device.

    RDK Renesas Demonstration Kit

  • 8/13/2019 RL78 Project Configuration Tips

    10/26 2012 Renesas Electronics America Inc. All rights reserved.10

    RL78 Project Wizard

    Enter new project name

    Select Sample Projecttype New project will include

    startup code and skeletonmain()

    Project builder willgenerate a fully linkedapplication

    Select toolchain

    Toolchain architecture willinfluence subsequentwizard pages

  • 8/13/2019 RL78 Project Configuration Tips

    11/26 2012 Renesas Electronics America Inc. All rights reserved.11

    Target-specific Settings

    Select toolchain version if

    multiple versions installed

    Select Debug hardware

    Select Target

  • 8/13/2019 RL78 Project Configuration Tips

    12/26 2012 Renesas Electronics America Inc. All rights reserved.12

    Project Configuration

    Select configuration

    Hardware Debug

    Simulator Debug

    Custom Debug

    Release

    Selection determines

    initially active buildconfiguration

  • 8/13/2019 RL78 Project Configuration Tips

    13/26 2012 Renesas Electronics America Inc. All rights reserved.13

    Library Configuration

    Select library source

    Newlib library completeISO C library supportingC/C++ code

    Optimized library subsetof ISO C library supportingC code

    Select required libraryheader files

    Select library Type

    Pre-built for convenience

    Project-built for source-

    level debugging

  • 8/13/2019 RL78 Project Configuration Tips

    14/26

    2012 Renesas Electronics America Inc. All rights reserved.14

    e2Studio Project Layout

    Project source files typically located

    within srcfolder

    Multiple build configurations per project

    Release

    Hardware Debug

    Debug (simulator)

    Build output located in correspondingbuild configuration folders

  • 8/13/2019 RL78 Project Configuration Tips

    15/26

    2012 Renesas Electronics America Inc. All rights reserved.15

    Hardware Configuration

    Add the clock initialization

    Add peripheral initialization

  • 8/13/2019 RL78 Project Configuration Tips

    16/26

    2012 Renesas Electronics America Inc. All rights reserved.16

    Interrupt Handler Configuration

    Modify the default interrupt handler

  • 8/13/2019 RL78 Project Configuration Tips

    17/26

    2012 Renesas Electronics America Inc. All rights reserved.17

    Option Byte and Security ID Configuration

    Security ID

    allows authenticationbefore debug

    Option byte Location0xC0H to 0xC3H

    0xC0H: WDT setting

    0xC1H: LVD voltage setting

    0xC2H: Oscillator speed

    selection 0xC3H:

    Enable/Disableon-chip debugfunction

  • 8/13/2019 RL78 Project Configuration Tips

    18/26

    2012 Renesas Electronics America Inc. All rights reserved.18

    Section Configuration

    List all the sections in theproject in the sectionsViewer

    Easy to add a newsection

    Add expression/label

    Defines the start addess

    Follow from the previoussection

  • 8/13/2019 RL78 Project Configuration Tips

    19/26

    2012 Renesas Electronics America Inc. All rights reserved.19

    Optimization Configuration

    Limited set of optionsavailable via quick settingsdialog

    Optimisation for speed,size or both

    Debug information noeffect on generated code

    Warnings simplifiedcontrol of warning groups

    List files compiler,assembler, linker listings

  • 8/13/2019 RL78 Project Configuration Tips

    20/26

    2012 Renesas Electronics America Inc. All rights reserved.20

    Common Issues

    Can t find the TK interface under hardware debugconfiguration in e2studio?

    -> There is no TK interface options available in the e2studio .E1 debug option serves for both TK interface and E1emulator connection.

    I started the debugger but cant see the code on the debugwindow?

    -> Check if you have switch to the debug perspective from theC/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

  • 8/13/2019 RL78 Project Configuration Tips

    21/26

    2012 Renesas Electronics America Inc. All rights reserved.21

    Lab Time!

    Please refer to the Lab Handout and lets get started!

  • 8/13/2019 RL78 Project Configuration Tips

    22/26

    2012 Renesas Electronics America Inc. All rights reserved.22

    Questions?

  • 8/13/2019 RL78 Project Configuration Tips

    23/26

    2012 Renesas Electronics America Inc. All rights reserved.23

    Challenge:MCUs continue to become more complex especially whencreating applications to enable the Smart Society, andtherefore the Software becomes more complex as well. As aresult Project schedules do not always scale accordingly andrequires tips and tricks from the MCU supplier to configurethe MCU which works best with the application.

    This class provides tips and tricks for how to configure theRenesas new IDE Eclipse with GNU compiler to quickly developRL78 application.

    Do you agree that we accomplished the above statement?

    Enabling The Smart Society in Review

  • 8/13/2019 RL78 Project Configuration Tips

    24/26

    2012 Renesas Electronics America Inc. All rights reserved.24

    Pop Quiz

    Q: what configuration can be done using Renesas quicksetting 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 e2studioproject template??

    a) size

    b) speed

    c) No optimizationd) Size and speed

  • 8/13/2019 RL78 Project Configuration Tips

    25/26

    2012 Renesas Electronics America Inc. All rights reserved.25

    Pop Quiz

    Q: Name the perspectives available in the e2studio ?

    a) C/C++ Perspectiveb) 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

  • 8/13/2019 RL78 Project Configuration Tips

    26/26

    Renesas Electronics America Inc. 2012 Renesas Electronics America Inc All rights reserved