Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: CC05B RX Project Configuration Tips John Breitenbach,

Slides:



Advertisements
Similar presentations
Renesas Technology America Inc. 1 SKP8CMINI-15,17 Tutorial 2 Creating A New Project Using HEW4.
Advertisements

Using PDG with e2studio: Example
Software Development and Software Loading in Embedded Systems.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L02B Introduction to the RX-Arduino (Lab) Anthony.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Using a Renesas Code Generation Tool for RL78 Devices.
Introduction Purpose Objectives Content Learning Time
3-1 System peripherals & Bus Structure Memory map of the LPC2300 device is one contiguous 32-bit address range. However, the device itself is made up of.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. RL78 Ultra Low Power MCU Lab.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Migrating from 8-to-32 bit Processors CC17I Kevin.
ID 413C: Can Touch This: Designing Capacitive-Based Touch Solutions Mark F Rodriguez Senior Engineering 13 October 2010 Version: 1.0 Xaplos Inc.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Increase the Dynamic Range and Precision of Digital Filters.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. An Introduction to e 2 studio.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Know your Precise Position with RX600 MCU.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Sensorless Vector Control with RL78G14.
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 Clock Generator.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: “Living in a Virtual World” – Microcontroller and.
NET+OS 6 BSP How and why it was restructured Changes to memory map New features How to port to custom hardware.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 320L: Rapid RX600 System Development Using the RPDL and.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L13B David Hedley, Applications Engineer Advanced.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. 431L: Using a Graphics API to Create User Interface Components—Advanced.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Migrating from CubeSuite+ to Eclipse.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 2L03I RL78 Bluetooth Connectivity Anthony Harris,
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. e 2 Studio – Getting Started.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Know your Precise Position with RX600 MCU Huangsheng.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an overview of the CPU architecture.
Chapter 8 – Main Memory (Pgs ). Overview  Everything to do with memory is complicated by the fact that more than 1 program can be in memory.
RX Voltage Detection Circuit (LVD) and Power-On Reset (POR)
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Debugging on RX with IAR Embedded Workbench Micael.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID630L: Becoming Familiar with Sensorless Vector Control.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This training course provides an overview of the CPU architecture.
Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Using Virtual EEPROM and Flash API for.
Renesas Technology America, Inc. Flash!. CPU Rewrite CPU-rewrite is a term that refers to an Renesas MCU’s ability to erase/program its own internal Flash.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. QuantiPhi for RH850 and RL78 - The Fastest Path from Idea.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Increase the Dynamic Range and Precision of Digital.
Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Implementing Bootloaders on Renesas MCUs.
2L01I Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 2L02I CAN In A Day Carl Stenquist, Staff.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Audio Solutions on the RX MCU Family Mitch Ferguson,
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced Debugging on the RX600.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced E 2 Studio Topics.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Low Power Design Michael Thomas, Applications Engineer.
Operating Systems Lecture 14 Segments Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of Software Engineering.
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 230L: Simplify your Networked Application with CAN and.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L08I Migrating from CubeSuite+ to Eclipse Neelima.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L05I Advanced Debugging on the RX600 Fatih Peksenar.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 5L08I Using the Renesas Graphics API to Create.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 322L:Advanced Debugging on the RX600 Brandon Hussey Applications.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
AT91 C-startup. 2 For reasons of modularity and portability most application code for an embedded application is written in C The application entry point.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 421L: R8C Segment-LCD API Lab Bob Proctor Staff Engineer.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A10L:A Flexible Flash Rewrite Application Brandon Hussey.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: QuantiPhi for RH850 and RL78 - The Fastest Path.
ID 021L: Model Based Control Design and Auto-Code Generation using the R8C Christopher Myers Director of Software Development 12 October 2010 Version:
Renesas Electronics America Inc. © 2011 Renesas Electronics America Inc. All rights reserved. RX Bus State Controller (BSC) Ver
Renesas Electronics America Inc. © 2011 Renesas Electronics America Inc. All rights reserved. RX Interrupt Control Unit (ICU) Ver
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the Project Generator function.
Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Using Software Building Blocks for Faster.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
Chap. 4 ARM Boot Loader Internals. 2 S3C2500 ARM940T Core module ARM9TDMI CoreIC.
David Hedley Staff AE, Applications Engineering 12 Oct 2010
Refer to Chapter 5 in the reference book
RX Watchdog Timer (WDT)
ID 325L: Getting Started with CubeSuite
Computer System Laboratory
Presentation transcript:

Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: CC05B RX Project Configuration Tips John Breitenbach, Senior Engineering Manager CC05B

© 2012 Renesas Electronics America Inc. All rights reserved.2 Senior Engineering Manager Manage apps engineering team for RX & RL78 Software libraries, app notes, sample code Custom work for customers Life before Renesas Patent #7,054,045 for Holographic HMI First computers: Atari 800 Timex Sinclair 1000 – 16K! John Breitenbach

© 2012 Renesas Electronics America Inc. All rights reserved.3 Renesas Technology & Solution Portfolio

© 2012 Renesas Electronics America Inc. All rights reserved.4 Microcontroller and Microprocessor Line-up Wide Format LCDs  Industrial & Automotive, 130nm  350µA/MHz, 1µA standby 44 DMIPS, True Low Power 165 DMIPS, FPU, DSC 1200 DMIPS, Performance 1200 DMIPS, Superscalar 500 DMIPS, Low Power 165 DMIPS, FPU, DSC 25 DMIPS, Low Power 10 DMIPS, Capacitive Touch  Industrial & Automotive, 150nm  190µA/MHz, 0.3µA standby  Industrial, 90nm  500µA/MHz, 1.6µA deep standby  Automotive & Industrial, 90nm  600µA/MHz, 1.5µA standby  Automotive & Industrial, 65nm  600µA/MHz, 1.5µA standby  Automotive, 40nm  500µA/MHz, 35µA deep standby  Industrial, 40nm  200µA/MHz, 0.3µA deep standby  Industrial & Automotive, 130nm  144µA/MHz, 0.2µA standby bit 8/16-bit

© 2012 Renesas Electronics America Inc. All rights reserved.5 Challenge: “The Smart Society can only be made possible by Smart Products. You, the Smart Engineers, are the ones who must create these Smart Products in ever shorter design cycles.” Solution: “This session will make you Smarter Engineers by shining a light on some of the most common stumbling blocks for engineers working on RX-based products.” ‘Enabling The Smart Society’

© 2012 Renesas Electronics America Inc. All rights reserved.6 Reset & interrupt vectors Flash-based options ID code Stacks & heaps Clock C runtime environment Review of startup code Q & A Agenda

© 2012 Renesas Electronics America Inc. All rights reserved.7 Two vector tables Fixed vector table – top of memory (0xFFFFFF80 to 0xFFFFFFFF) Relocatable vector table (auto-generated & #pragmas) Fixed Vectors Reset Vector - make sure you have one! Fixed_Vectors[] in vector_table.c Other Exceptions: undefined inst., NMI, supervisor violation Also includes ID code for some parts Relocatable vectors Contains vectors for peripherals (>200) Startup code points INTB to relocatable vector table Tip: Use the default handler (“Empty Vector”) Reset & Interrupt Vectors

© 2012 Renesas Electronics America Inc. All rights reserved.8 WDT, IWDT, LVDT, HOCO, endian Some located in the fixed vector table Some located in User Boot Flash All 0xFF’s (erased) means No watchdogs Little-endian HOCO off at boot Low-voltage monitor 0 reset disabled Located in the one of the following places HEW project generator: Flash_options.c e 2 studio blank project: vector_table.c FIT: r_bsp_config.h Flash-Based Options (RX63X, RX21x)

© 2012 Renesas Electronics America Inc. All rights reserved.9 Used to protect chip from unauthorized read/modifications Three modes: No protection Always reports non-matching ID (permanent lock) Allows access w/ matching ID Detailed in “ROM” chapter of HW Manual Lives in fixed vector table Be careful you don’t have code/constants there – If you do, you’ll lock yourself out! Locked chips can be erased & recovered in serial boot mode Where to find it: Fixed vector table in vector_table.c FIT: r_bsp_config.h Flash-Based ID Code

© 2012 Renesas Electronics America Inc. All rights reserved.10 Stacks & Heaps Q: What’s the difference between stack and heap? StackHeap Automatic variables (locals)Dynamically allocated memory Parameters for function callsMalloc/Calloc Return address for function callsC++ new() Automatic create & clean-upStays allocated until clean-up Fast create/deleteSlow create/delete RequiredOptional

© 2012 Renesas Electronics America Inc. All rights reserved.11 Stacks & Heaps Stacks Two stacks on the RX: User & Interrupt User stack is optional Each has independent size Three steps to use: – 1. Define the size – 2. Define the location – 3. Load them at startup Project TypeSizeLocationLoad RX CStacksct.hLinker map#pragma stacksize FIT ProjectsR_bsp_config.hLinker map#pragma stacksize GCCLinker map** Reset_program.asm

© 2012 Renesas Electronics America Inc. All rights reserved.12 Stacks & Heaps Heap Must include sbrk.c Located in RAM w/ the rest of static variables (section B_1) HEW project generator w/ RX C: Size defined in sbrk.h – #define HEAPSIZE 0x4000 FIT projects: Size defined in r_bsp_config.h – #define HEAP_BYTES (0x4000) GCC projects: uses ALL left-over RAM by default – May not be what you want!

© 2012 Renesas Electronics America Inc. All rights reserved.13 Tips Put stacks at start of RAM (they grow down) Fill stack memory at startup with pattern – Monitor it in debugger memory window Old school: Don’t use heap if you can avoid it! – Dynamic memory problems are hard to debug – Can lead to non-deterministic behavior – No error checking in default handler If you must use the heap – Allocate memory soon after startup; don’t free it – Useful when buffers allocated based on runtime config Stacks & Heaps

© 2012 Renesas Electronics America Inc. All rights reserved.14 Specific to chip RX63x, RX21x Starts on LOCO (125 kHz) Switch to high speed before C init RX610, RX62x crystal speed (usually 12 MHz) OK to do clock switch after C init Where to find it: HEW project generator: HWSetup.C (maybe) FIT: r_bsp_config.h Clock Setup

© 2012 Renesas Electronics America Inc. All rights reserved.15 Copies initialized data from ROM to RAM char prompt[] = “Enter name”; float setpoint = 72.5f; Zeroes uninitialized data Can be time-intensive Especially if running off LOCO Check ResetPRG.c for _INITSCT() call Switch to high-speed clock is BEFORE _INITSCT() Add additional sections to copy ROM to RAM Code for flash programming Add linker section; modify dbsct.c C Runtime Environment Initialization

© 2012 Renesas Electronics America Inc. All rights reserved.16 #pragma entry PowerON_Reset_PC void PowerON_Reset_PC(void) { MVTC# H,USP// Only in mixed mode view MVTC# H,ISP // Relocatable vectors set_intb((void *)__sectop("C$VECT")); set_fpsw(FPSW_init);// Floating point status _INITSCT();// Init C runtime … HardwareSetup();// Setup clock other hardware set_psw(PSW_init);// Set Ubit & Ibit for PSW Change_PSW_PM_to_UserMode();// Change PSW PM bit … main();// Call user code … brk();// Should never get here } RX startup code: RX610/RX62N (ResetPrg.c)

© 2012 Renesas Electronics America Inc. All rights reserved.17 void PowerON_Reset_PC(void) { MVTC# H,USP// Only in mixed mode view MVTC# H,ISP // Relocatable vectors set_intb((void *)__sectop("C$VECT")); set_fpsw(FPSW_init);// Floating point status operating_frequency_set();// Set clock to high-speed _INITSCT();// Init C runtime … HardwareSetup();// Setup other hardware set_psw(PSW_init);// Set Ubit & Ibit for PSW Change_PSW_PM_to_UserMode();// Change PSW PM bit … main();// Call user code … brk();// Should never get here } RX startup code: RX63x/RX210 (ResetPrg.c)

© 2012 Renesas Electronics America Inc. All rights reserved.18 Optimization Dang near impossible to outsmart the compiler Choose either “Speed” or “Size” – A side note about the RX210 and the RX instruction set Turn off for debug Default project settings in HEW Doubles are singles by default Chars are unsigned by default Bit fields are right-to-left by default Endian settings A Quick Note On Other Settings Warp speed, Scotty! I can’t do it, Captain!

© 2012 Renesas Electronics America Inc. All rights reserved.19 Questions? Questions?

© 2012 Renesas Electronics America Inc. All rights reserved.20 Challenge: “The Smart Society can only be made possible by Smart Products. You, the Smart Engineers, are the ones who must create these Smart Products in ever shorter design cycles.” Solution: “This session will make you Smarter Engineers by shining a light on some of the most common stumbling blocks for engineers working on RX-based products.” ‘Enabling The Smart Society’

© 2012 Renesas Electronics America Inc. All rights reserved.21 Please utilize the ‘Guidebook’ application to leave feedback or Ask me for the paper feedback form for you to use… Please Provide Your Feedback…

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