Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Implementing Bootloaders on Renesas MCUs.

Slides:



Advertisements
Similar presentations
WANs and Routers Routers. Router Description Specialized computer Like a general purpose PC, a router has:  CPU  Memory  System Bus Connecting Internal.
Advertisements

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.
© 2004 Cisco Systems, Inc. All rights reserved. Managing Your Network Environment Managing Router Startup and Configuration INTRO v2.0—9-1.
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
NET+OS Bootloader Overview Requirements How to Build How to Customize Changes to Applications Configuration Settings.
Shell and Flashing Images Commands and upgrades. RS-232 Driver chip – ST3232C Driver chip is ST3232C Provides electrical interface between UART port and.
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.
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.
Computing Hardware Starter.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Know your Precise Position with RX600 MCU.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Sensorless Vector Control with RL78G14.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A15C: Application Code Reprogramming Using Different Serial.
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
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 ID 220L: Hands-on Embedded Ethernet Design with an Open Source.
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. Class ID: 9L02I Software Development with an Open Source.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. LibUSB - Create a Solution Without the Class Struggle.
Computer Terms.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Migrating from CubeSuite+ to Eclipse.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 410L: Low cost audio in 8/16 bit applications using ADPCM.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 2L03I RL78 Bluetooth Connectivity Anthony Harris,
Renesas Electronics America Inc. RX USB Peripheral The Renesas RX USB peripheral a.k.a. USBC_597IP_PP Ver
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
ID A16C: Outfitting Embedded Devices with Low Power Wireless Communications Design considerations for adding wireless communications to low power embedded.
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.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID630L: Becoming Familiar with Sensorless Vector Control.
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.
2L01I Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 2L02I CAN In A Day Carl Stenquist, Staff.
RL78 Code & Dataflash.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Audio Solutions on the RX MCU Family Mitch Ferguson,
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Module Introduction Purpose  This training module provides an overview of the peripherals.
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: CC05B RX Project Configuration Tips John Breitenbach,
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Low Power Design Michael Thomas, Applications Engineer.
ID 222L: Get Connected with USB on RX62N
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.
© GCSE Computing Computing Hardware Starter. Creating a spreadsheet to demonstrate the size of memory. 1 byte = 1 character or about 1 pixel of information.
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.
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:
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an introduction to the peripheral functions.
© 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.
Bootloaders Many embedded processors have flash memory. This allows us to alter a product even though it is in the users hands: -fix bugs -upgrade or enhance.
Bootloaders Many embedded processors have flash memory. This allows us to alter a product even though it is in the users hands: -fix bugs -upgrade or.
David Hedley Staff AE, Applications Engineering 12 Oct 2010
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
ID 325L: Getting Started with CubeSuite
2.C Memory GCSE Computing Langley Park School for Boys.
Presentation transcript:

Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Implementing Bootloaders on Renesas MCUs

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

© 2012 Renesas Electronics America Inc. All rights reserved.3 Microcontroller and Microprocessor Line-up Wide Format LCDs  Industrial & Automotive, 130nm  350µA/MHz, 1µA standby 44 DMIPS, True Low Power Embedded Security, ASSP 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  200µ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, 90nm  1mA/MHz, 100µA standby  Industrial & Automotive, 130nm  144µA/MHz, 0.2µA standby bit 8/16-bit

© 2012 Renesas Electronics America Inc. All rights reserved.4 In a smart society devices can add features and fix bugs after leaving store shelves. Having a bootloader in your system allows you to sleep better at night. ‘Enabling The Smart Society’ Firmware v1.2 ??? Firmware v3.0 v4.0v1.3 Added Multitasking Fixed focusing bug

© 2012 Renesas Electronics America Inc. All rights reserved.5 Agenda Quick bootloader overview The flash loader framework Design choices RX implementation RL78 implementation Lab

© 2012 Renesas Electronics America Inc. All rights reserved.6 Quick Bootloader Overview

© 2012 Renesas Electronics America Inc. All rights reserved.7 Quick Bootloader Overview What is a bootloader? What can a bootloader do? Erase and rewrite user memory Validate user memory Communicate with the outside world Download new application in case of failure What should a bootloader be? Reset Bootloader Application

© 2012 Renesas Electronics America Inc. All rights reserved.8 Available Boot Options Factory bootloader Cannot be modified User code cannot run Can program/erase everything User boot area Programmed with USB from factory Uses CPU rewrite code User application Uses CPU rewrite code MCU Address Space Factory Bootloader RAM User Boot Area User Application Area P/E

© 2012 Renesas Electronics America Inc. All rights reserved.9 The Flash Loader Project

© 2012 Renesas Electronics America Inc. All rights reserved.10 What is the Flash Loader Project? Flexible system for implementing in-field-reprogramming in your own project Communications medium agnostic Modify to fit your system Retries & error checking built in Does not interfere with user application

© 2012 Renesas Electronics America Inc. All rights reserved.11 Terms Device Storage v4.2 Host Load Image

© 2012 Renesas Electronics America Inc. All rights reserved.12 Checking…Downloading … Storing … Reprogramming … Parts of the Flash Loader Project? Flexible system that can be split into 2 parts: Downloader Bootloader Host Device Storage

© 2012 Renesas Electronics America Inc. All rights reserved.13 1: Using Flash Loader With Your Project

© 2012 Renesas Electronics America Inc. All rights reserved.14 Add Flash Loader to your HEW Project Add flash loader project files Enables future updates Flash loader bootloader is separate project User’s Project User Application Flash Loader +

© 2012 Renesas Electronics America Inc. All rights reserved.15 Configure Flash Loader for Your System  r_fl_app_header.c  r_fl_comm_*type*.c  r_fl_downloader.c  r_fl_store_manager.c  r_fl_memory_*type*.c  r_fl_utilities.c Host Device Storage v4.2 = Edit for your configuration

© 2012 Renesas Electronics America Inc. All rights reserved.16 2: Making a Load Image

© 2012 Renesas Electronics America Inc. All rights reserved.17 © 2010 Renesas Electronics America Inc. All rights reserved. Making a Load Image S-Record (“MOT”) files are inefficient S-Record Converter Load image information: Binary Starts with header Has N blocks Load Image HeaderBlock 1 Block 2Block N... MOT S-Record Converter Load Image 60KB 20KB

© 2012 Renesas Electronics America Inc. All rights reserved.18 Load Image Header © 2010 Renesas Electronics America Inc. All rights reserved. FieldSize in Bytes Valid mask1 Image ID1 Version number1 Size of load image4 Max block data size4 Load image CRC2 Raw CRC2 Address of 1 st data block4 Successfully stored?4

© 2012 Renesas Electronics America Inc. All rights reserved.19 3: Obtaining the Load Image

© 2012 Renesas Electronics America Inc. All rights reserved.20 Transferring the Load Image Flash loader is medium agnostic Communications protocol is supplied Supported commands Information request Erase image from storage Load image download Host Device Storage

© 2012 Renesas Electronics America Inc. All rights reserved.21 Storing the Load Image As Load blocks come in: Check for errors Store Storage area partitioned for load images If error occurs, retry is possible Host Device Storage Load Block

© 2012 Renesas Electronics America Inc. All rights reserved.22 Storage What the Storage Area Looks Like Load images are in different ‘partitions’ Load Image #1 – Address 0x HeaderBlock 1Block 2Block 3 Block 512 … Load Image #2 – Address 0x HeaderBlock 1Block 2Block 3 Block 656 … Load Image #3 – Address 0x EMPTY

© 2012 Renesas Electronics America Inc. All rights reserved.23 4: Using the Load Image

© 2012 Renesas Electronics America Inc. All rights reserved.24 Reboot & Flash Reboot when convenient Check for new load image If valid, reflash MCU Jump to user application and execute Host Device Storage Load Image

© 2012 Renesas Electronics America Inc. All rights reserved.25 Design Choices

© 2012 Renesas Electronics America Inc. All rights reserved.26 Bootloader Decisions Why not store bootloader in same memory area as user application? Bug in control code could erase everything Application must be aware of bootloader Why not store load images in MCU memory? Hard to make bootloader not interfere with user application Bug in control code could erase currently running application Limit application size or pay more Move code to RAM May have to use PIC and PID Keep safe older revisions

© 2012 Renesas Electronics America Inc. All rights reserved.27 RX Implementation

© 2012 Renesas Electronics America Inc. All rights reserved.28 Flash Loader Bootloader Separate workspace Separate memory areas Can use same or different communications as FL downloader User Boot is special User Application & Flash Loader Downloader Flash Loader Bootloader MCUMCU User ROMUser Boot Area

© 2012 Renesas Electronics America Inc. All rights reserved.29 Why is User Boot Special? Can execute from either reset vector on start-up Cannot accidentally erase Should have ‘one and done’ attitude No indirection tables! Single-Chip Mode Reset Vector User Boot Mode Reset Vector

© 2012 Renesas Electronics America Inc. All rights reserved.30 Storing Load Images By default stored in external SPI flash RX cannot read from ROM while writing or erasing ROM Large stalls in user application or move to RAM No chance of losing image Cost of SPI flash is usually lower than doubling MCU ROM It’s so much easier!

© 2012 Renesas Electronics America Inc. All rights reserved.31 RL78 Implementation

© 2012 Renesas Electronics America Inc. All rights reserved.32 Dual Boot Blocks Has 2 independent boot blocks Can swap which one is used Removes problem of losing everything Still recommend external SPI flash

© 2012 Renesas Electronics America Inc. All rights reserved.33 Using Boot Swap Download new image Swap to bootloader block Program in image Swap to application block

© 2012 Renesas Electronics America Inc. All rights reserved.34 Summary Quick bootloader overview The flash loader framework Design choices RX implementation RL78 implementation Lab

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

© 2012 Renesas Electronics America Inc. All rights reserved.36 In a smart society devices can add features and fix bugs after leaving store shelves. Have a bootloader in your system allows you to sleep better at night. ‘Enabling The Smart Society’ Firmware v1.2 ??? Firmware v3.0 v4.0v1.3 Added Multitasking Fixed focusing bug

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