Implementing Bootloaders on Renesas MCUs

Similar documents
Using Software Building Blocks for Faster Time to Market

Low Power Design Michael Thomas, Applications Engineer

RL78 Project Configuration Tips

Low Power Design. Renesas Electronics America Inc Renesas Electronics America Inc. All rights reserved.

CAN In A Day 2L01I. Renesas Electronics America Inc Renesas Electronics America Inc. All rights reserved.

Incorporating a Capacitive Touch Interface into Your Design

An Introduction to e 2 studio

Secure Firmware Update Lab Session

Software Development with an Open Source RTOS

Capacitive Touch Based User Interfaces and Hardware-based Solutions

RL78 Ultra Low Power MCU Lab

Rapid RX600 System Development Using the RPDL and PDG

CC05B RX Project Configuration Tips

RL78 Ultra Low Power MCU Lab

LibUSB - Create a Solution Without the Class Struggle

Embedding Audio into your RX Application

ID 730L: Getting Started with Multimedia Programming on Linux on SH7724

ID B34L: HMI Development with QNX'S Momentics Toolchain and Connected Automotive Reference QNX CAR

Enhance Embedded Systems with Low Cost TFT Solutions

ID 321L: KPIT GNU compiler plug-ins for HEW / KPIT Eclipse IDE

Optimizing RX Performance

ID 020C: Hardware-in-Loop: System Testing Without the System

ID 220L: Hands-on Embedded Ethernet Design with an Open Source TCP/IP Stack

Boot Loader. Bootloader

ID 024C: Auto Code Generation: The Shortest Distance From Idea to Implementation

Using Virtual EEPROM and Flash API for Renesas MCUs RX600 Series

Getting Started with Renesas Development Tools

Security in Automotive Applications

STM8L and STM32 L1 series. Ultra-low-power platform

Designing with External Flash Memory on Renesas Platforms

The purpose of this course is to provide an introduction to the RL78's flash features and archectecture including security features, code and data

ID 025C: An Introduction to the OSEK Operating System

ID 434L: Incorporating a Capacitive Touch Interface into Your Design

Embedded Wireless Technologies

A11L: 78K0R Low Power MCU

MCU R&D Strategies for the Smart Society

To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM).

Microcontroller Technologies for Smart Society

Introducing: New Low-Cost & Low Pin Count PIC Microcontrollers for the 8-, 16- & 32-bit Markets

Xerox Versant 3100 Press Xerox FreeFlow Print Server. Statement of Volatility Version 1.0

Keywords: maxq microcontrollers, data flash, in-application programming, in circuit programming, flash, microcontroller, MAXQ7663, MAXQ7664

APPLICATION NOTE 3575 In-Application Programming (IAP) of the MAXQ7665 Sector-Erasable Program and Data Flash

Keywords: MAXQ7665C, page erasable, flash, MAXQ, In-application, programming

Renesas Synergy MCUs Build a Foundation for Groundbreaking Integrated Embedded Platform Development

AN5123 Application note

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4

Xerox Color 800i/1000i Press FreeFlow Print Server. Statement of Volatility Version 1.0

VORAGO VA108x0 Bootloader application note

Bootloader Design Techniques for MCUs. Jacob Beningo, CSDP


Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

New STM32WB Series MCU with built-in Bluetooth 5 and IEEE

Design Tradeoffs in Industrial Ethernet Hardware Implementations

FOR IOT PRODUCT DEVELOPMENT

AN4491 Application note

MINIPROG C User Manual Ver101

Course Introduction. Purpose: Objectives: Content: Learning Time:

New STM32WB Series MCU with Built-in BLE 5 and IEEE

ARDUINO MEGA INTRODUCTION

SKP16C26 Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

ID B30C: IP Video Surveillance Applications

AN LPC1700 secondary USB bootloader. Document information. LPC1700, Secondary USB Bootloader, ISP, IAP

Portable Instrumentation Applications w/ the RL78

ESPino - Specifications

Hello, and welcome to this presentation of the STM32 Flash memory interface. It covers all the new features of the STM32F7 Flash memory.

New STM32 F7 Series. World s 1 st to market, ARM Cortex -M7 based 32-bit MCU

Statement of Volatility Dell PowerEdge R730 and R730XD

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

SPBT3.0DPx BT module. Firmware Update Procedure. Revision 1.0

Explanation of PIC 16F84A processor data sheet Part 1: overview of the basics

Introduction. Purpose. Objectives. Content. Learning Time

PL-I Assignment Broup B-Ass 5 BIOS & UEFI

Renesas Starter Kit for RX111

eip-10 Embedded TCP/IP 10-BaseT Network Module Features Description Applications

Getting Started With the Stellaris EK-LM4F120XL LaunchPad Workshop. Version 1.05

Customizable Flashloader Solution for Synergy MCUs

Insights into MCU & Mixed Signal Design

ID 411C: Capacitive Touch User Interfaces and Hardwarebased

LBAT90USB162 Atmel. LBAT90USB162 Development Board User s Manual

Manual of Board ET-PIC STAMP 18F8722-K22 ET-PIC STAMP 18F8722-K22

Renesas 78K/78K0R/RL78 Family In-Circuit Emulation

DRIVER STATION v1.0 UTILITY LOADER Created: 22DEC2008 FIRST DRIVER STATION UTILITY LOADER RE-IMAGE INSTRUCTIONS

STM32F429 Overview. Steve Miller STMicroelectronics, MMS Applications Team October 26 th 2015

XILICA DESIGNER. Firmware Upgrade

Hello, and welcome to this presentation of the STM32F7 System Configuration Controller.

AT45DB041E. 4-Mbit DataFlash (with Extra 128-Kbits), 1.65V Minimum SPI Serial Flash Memory. Features

MYD-JA5D2X Development Board

Energy Efficient Communications with Wi-Fi

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

AN4872 Application note

AT45DB321E. Features. 32-Mbit DataFlash (with Extra 1-Mbits), 2.3V Minimum SPI Serial Flash Memory

NAND/MTD support under Linux

A Developer's Guide to Security on Cortex-M based MCUs

Intelop. *As new IP blocks become available, please contact the factory for the latest updated info.

AT45DB021E. 2-Mbit DataFlash (with Extra 64-Kbits), 1.65V Minimum SPI Serial Flash Memory PRELIMINARY DATASHEET. Features

ARDUINO YÚN MINI Code: A000108

IAR EWARM Quick Start for. Holtek s HT32 Series Microcontrollers

T he key to building a presence in a new market

s132_nrf52 release notes

STM32G0 MCU Series Efficiency at its Best

Transcription:

Implementing Bootloaders on Renesas MCUs Brandon Hussey, Applications Engineer Class ID: CL09I Renesas Electronics America Inc.

Brandon Hussey Applications Engineer RX support Flash API Virtual EEPROM Flash Loader Firmware Integration Technology (FIT) PREVIOUS EXPERIENCE: Interned at Renesas for 3 years Joined on full-time after graduation I hold an MSCPE from North Carolina State University 2

Renesas Technology & Solution Portfolio 3

8/16-bit 32-bit Microcontroller and Microprocessor Line-up 2010 2012 1200 DMIPS, Superscalar Automotive & Industrial, 65nm 600µA/MHz, 1.5µA standby 500 DMIPS, Low Power 32-Bit High Performance DSP, FPU with High 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 & LCDs Automotive, 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 4

Enabling The Smart Society 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.??? Firmware v1.2 v1.3 Fixed focusing bug Firmware v3.0 v4.0 Added Multitasking 5

Agenda Quick bootloader overview The flash loader framework Design choices RX implementation RL78 implementation Lab 6

Quick Bootloader Overview 7

Quick Bootloader Overview Reset What is a bootloader? What can a bootloader do? Erase and rewrite user memory Bootloader Validate user memory Communicate with the outside world Download new application in case of failure Application What should a bootloader be? 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 P/E P/E MCU Address Space RAM Factory Bootloader User Boot Area User Application Area 9

The Flash Loader Project 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 11

Terms Load Image v4.2 Host Device Storage 12

Parts of the Flash Loader Project? Flexible system that can be split into 2 parts: Downloader Bootloader Host Device Storage Checking Downloading Storing Reprogramming 13

1: Using Flash Loader With Your Project 14

Add Flash Loader to your HEW Project Add flash loader project files User s Project User Application + Flash Loader Enables future updates Flash loader bootloader is separate project 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 = Edit for your configuration v4.2 Host Device Storage 16

2: Making a Load Image 17

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

Load Image Header Field Size in Bytes Valid mask 1 Image ID 1 Version number 1 Size of load image 4 Max block data size 4 Load image CRC 2 Raw CRC 2 Address of 1 st data block 4 Successfully stored? 4 19 2012 2010 Renesas Renesas Electronics Electronics America America Inc. Inc. All rights reserved. All rights reserved.

3: Obtaining the Load Image 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 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 Load Block Host Device Storage 22

What the Storage Area Looks Like Load images are in different partitions Storage Load Image #1 Address 0x00100000 Header Block 1 Block 2 Block 3 Block 512 Load Image #2 Address 0x00200000 Header Block 1 Block 2 Block 3 Block 656 Load Image #3 Address 0x00300000 EMPTY 23

4: Using the Load Image 24

Reboot & Flash Reboot when convenient Check for new load image If valid, reflash MCU Jump to user application and execute Load Image Host Device Storage 25

Design Choices 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 27

RX Implementation 28

Flash Loader Bootloader Separate workspace Separate memory areas Can use same or different communications as FL downloader User Boot is special M C User Application & Flash Loader Downloader Flash Loader Bootloader U User ROM User Boot Area 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! User Boot Mode Reset Vector Single-Chip Mode Reset Vector 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! 31

RL78 Implementation 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 33

Using Boot Swap Download new image Swap to bootloader block Program in image Swap to application block 34

Summary Quick bootloader overview The flash loader framework Design choices RX implementation RL78 implementation Lab 35

Questions? 36

Enabling The Smart Society 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.??? Firmware v1.2 v1.3 Fixed focusing bug Firmware v3.0 v4.0 Added Multitasking 37

Please Provide Your Feedback Please utilize the Guidebook application to leave feedback or Ask me for the paper feedback form for you to use 38

Renesas Electronics America Inc.