Shell and Flashing Images Commands and upgrades. RS-232 Driver chip – ST3232C Driver chip is ST3232C Provides electrical interface between UART port and.

Slides:



Advertisements
Similar presentations
MUHAMMAD AHMED HUSSAIN
Advertisements

Managing Cisco IOS Software. Overview The router boot sequence Locating IOS software The configuration register Recovering Passwords Backing Up the Cisco.
INPUT-OUTPUT ORGANIZATION
Programmable Interval Timer
The 8051 Microcontroller Chapter 5 SERIAL PORT OPERATION.
Programmable Keyboard/ Display Interface: 8279
The Assembly Language Level
Serial I/O - Programmable Communication Interface
CS4315A. Berrached:CMS:UHD1 Operating Systems and Computer Organization Chapter 4.
ARM development environment Modified Content Philips LPC2106 ARM chip ARM target board PSPad customised development environment Troubleshooting.
CCNA2 MODULE 5.
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
Input/Output and Communication
CCNA 2 v3.1 Module 2.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Software Development and Software Loading in Embedded Systems.
Intel Do-It-Yourself Challenge Hello World with the Arduino IDE Nicolas Vailliet Intel.
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Embedded Systems Principle of Debugger. Reference Materials kl.de/avr_projects/arm_projects/#winarmhttp://
Oppenheimer Technologies Rick King Jonathan Creekmore.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Linux Booting Procedure
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
Computer Maintenance Unit Subtitle: Basic Input/Output System (BIOS) Excerpted from 1 Copyright © Texas Education Agency, All.
COMP201 Computer Systems Exceptions and Interrupts.
Topics Introduction Hardware and Software How Computers Store Data
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
The 8051 Microcontroller and Embedded Systems
Chapter 7 Low-Level Protocols
Cisco S2 C4 Router Components. Configure a Router You can configure a router from –from the console terminal (a computer connected to the router –through.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
Universal Asynchronous Receiver/Transmitter (UART)
The FPX KCPSM Module Exercise 1 Henry Fu The FPX KCPSM Module Exercise: Network Data Encryption / Decryption Using ROT13 Algorithm Henry Fu Washington.
Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Implementing Bootloaders on Renesas MCUs.
Development of a microprocessor project with LPC2388 development board.
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
MECH1500 Chapter 3.
Source Controller software Ianos Schmidt The University of Iowa.
Damper board (redux) SHARC overview Bill A. May 17, 2004.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
Computer Maintenance I
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Introduction to Computer Programming using Fortran 77.
LonWorks Introduction Hwayoung Chae.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Chapter Nine: Data Transmission. Introduction Binary data is transmitted by either by serial or parallel methods Data transmission over long distances.
Linux on ARM7TDMI or Nothing is as easy as it looks Helicon technologies Ltd. How to run uClinux on NXP LPC22xx.
1.1.2 OneOs Downloading Software Upgrade
OSI LAYERS.
Computer System Laboratory
Topics Introduction Hardware and Software How Computers Store Data
Computer Maintenance Unit Subtitle: Basic Input/Output System (BIOS)
Input/Output and Communication
Networking COMP
Implementation of Embedded OS
Key Terms By: Kelly, Jackson, & Merle
An Embedded Software Primer
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Operating Systems Chapter 5: Input/Output Management
Topics Introduction Hardware and Software How Computers Store Data
Chapter Nine: Data Transmission
Embedded System Development Lecture 13 4/11/2007
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

Shell and Flashing Images Commands and upgrades

RS-232 Driver chip – ST3232C Driver chip is ST3232C Provides electrical interface between UART port and RS-232 hardware.

UART0 on LPC2478 Serial port is connected to P0_2 TXD0 and P0_3 RXD0 which is UART0

Initialize UART for interrupts void UARTInitInterrupt(void(*handler)(void)) { // Set as UART interrupt as IRQ and not FIQ VICINTSELECT_bit.UART0 = 0; // Set handler VICVECTADDR6 = (unsigned int)handler; // VICIntEnable VICINTENABLE_bit.UART0 = 1; U0IER_bit.RXLSIE = 1; U0IER_bit.RDAIE = 1; }

Shell Code See TinyOS_Shell_LPC2478.zipTinyOS_Shell_LPC2478.zip

Flashing IMages

Upgrading devices in the field Very common problem Needs to be done carefully to prevent ‘bricking’ the device. Need to be able to upgrade main software yet recover if there is an error. Often done by splitting code on the device into parts bootloader main code That way the main code can be upgraded without damaging a bootloader. The bootloader can always boot the device even if the main area has been corrupted.

Bootloader Starts initial boot then jumps to either bootloader monitor – ie, shell Main application As part of its startup sequence there is a part where tests for some condition If true it runs the shell monitor If false it runs the main application Condition might be Keys held down Repeating magic word on serial port etc.

Bootloader Shell A little command shell that receives commands through serial or other port. Executes the commands Prints results to the port. Commands are a string starting with the command name then followed by parameters. show status run task flashImage newbits.hex 0x Commands can be implemented by the bootloader task itself or by other tasks waiting for a signal or created on demand.

Bootloader Flash command Can read new bits from a external memory such as an SD card or receive the bits from a port. If from a SD card then it’s a matter of copying the bits from the card to right location in flash If from a port then it will require a protocol between the bootloader and the client sending the bits. Does not have to be very complicated but needs at least have start, repeat, reset, stop, and many run. Data can be either binary or some easy to work with character based encoding. Should include checksum. For example Motorola S-Records or Intel Hex Bootloader needs to decode and convert to binary.

Flashing process Desktop client sends line of data Bootloader Decodes data Checks checksum Writes data to memory Sends acknowledge for new data or repeat on error Repeat until done Jump to main application

Requirements for flashing Main application has to be built for a specific fixed memory location. Binary is correct for final memory location. Bootloader does not have to modify the binary. Compiler and link settings for specifying load location If using encoding then the main application binary is converted to the encoding format. For example S-Record. Text encoding can be easier to work with and less likely to be corrupted then binary. Some tools will change binary Serial port might only support 7-bits Human readable Does increase the size of the image. Binary image will also work if tools do checksum on the fly.

S-Records From Wikipedia The Motorola S-record format is an ASCII hexadecimal ("hex") text encoding for binary data. It is also known as the SREC or S19 format. Each record contains a checksum to detect data that has been corrupted during transmission. The first record (S0) may include arbitrary comments such as a program name or version number. The last (termination) record (S7, S8, or S9) may include a starting address.

S-Record Format

S-Record parts

S-Record Example S B S30D FFFFF BF S F E7B F940000BD4243C40000D BD S C FA4FF941FFFFF041EFFFFC23C840000BD44EB F800005E S E7B88012E502F E F D8 S E E4884E F0004E E E E2 S E F0004E288EB883200E EA884E F0006EB8800 S E889E E F C000007E02200C082E388ED89EB S BC D24E7157 S The S0 record starts the file. The S3 records contain the data. The S7 record contains the entry address and terminates the download.

S-Record Tools GNU binutils can generate S-Record files objcopy can be used to generate S-records by using an output target of srec objcopy Myapp.bin -O srec Many others available on internet