Cortex-R5 Software Development

Similar documents
Cortex-A9 MPCore Software Development

Cortex-A15 MPCore Software Development

Cortex-A5 MPCore Software Development

Cortex-A15 MPCore Software Development

ARMv8-A Software Development

Cortex-M Software Development

Cortex-M3/M4 Software Development

ARM CORTEX-R52. Target Audience: Engineers and technicians who develop SoCs and systems based on the ARM Cortex-R52 architecture.

RM4 - Cortex-M7 implementation

Kinetis Software Optimization

RM3 - Cortex-M4 / Cortex-M4F implementation

Modular ARM System Design

Embedded Seminar in Shenzhen

Cortex-M3/M4 Software Desig ARM

Hercules ARM Cortex -R4 System Architecture. Processor Overview

Agenda. ARM Core Data Flow Model Registers Program Status Register Pipeline Exceptions Core Extensions ARM Architecture Revision

Compiler toolchain ARM. Developing Software for ARM Processors. Version Copyright ARM. All rights reserved. ARM DUI 0471I (ID012213)

ARM Processors for Embedded Applications

Compiler toolchain ARM. Processors. Developing Software for ARM. Version 4.1. Copyright ARM. All rights reserved. ARM DUI 0471C (ID080411)

ARM Accredited Engineer Certification

L2 - C language for Embedded MCUs

RA3 - Cortex-A15 implementation

Chapter 5. Introduction ARM Cortex series

ARM Cortex core microcontrollers

The Definitive Guide to the ARM Cortex-M3

ARM Cortex core microcontrollers 3. Cortex-M0, M4, M7

Designing with NXP i.mx8m SoC

Implementing Secure Software Systems on ARMv8-M Microcontrollers

ELC4438: Embedded System Design ARM Embedded Processor

18-349: Embedded Real-Time Systems Lecture 2: ARM Architecture

KeyStone II. CorePac Overview

CODE TIME TECHNOLOGIES. mabassi RTOS. Porting Document. SMP / ARM Cortex-A9 CCS

Copyright 2016 Xilinx

ARM Cortex -M for Beginners

15CS44: MICROPROCESSORS AND MICROCONTROLLERS. QUESTION BANK with SOLUTIONS MODULE-4

The ARM10 Family of Advanced Microprocessor Cores

Job Posting (Aug. 19) ECE 425. ARM7 Block Diagram. ARM Programming. Assembly Language Programming. ARM Architecture 9/7/2017. Microprocessor Systems

Amber Baruffa Vincent Varouh

EEM870 Embedded System and Experiment Lecture 3: ARM Processor Architecture

CODE TIME TECHNOLOGIES. Abassi RTOS. Porting Document. ARM Cortex-A9 CCS

CISC RISC. Compiler. Compiler. Processor. Processor

ARM System Design. Aim: to introduce. ARM-based embedded system design the ARM and Thumb instruction sets. the ARM software development toolkit

ARM Processor Fundamentals

ECE 471 Embedded Systems Lecture 2

MICROPROCESSORS AND MICROCONTROLLERS 15CS44 MODULE 4 ARM EMBEDDED SYSTEMS & ARM PROCESSOR FUNDAMENTALS ARM EMBEDDED SYSTEMS

ARM Processors ARM ISA. ARM 1 in 1985 By 2001, more than 1 billion ARM processors shipped Widely used in many successful 32-bit embedded systems

AND SOLUTION FIRST INTERNAL TEST

Chapter 15 ARM Architecture, Programming and Development Tools

CODE TIME TECHNOLOGIES. mabassi RTOS. Porting Document. SMP / ARM Cortex-A9 DS5 (ARMCC)

ARM Processor. Dr. P. T. Karule. Professor. Department of Electronics Engineering, Yeshwantrao Chavan College of Engineering, Nagpur

The Next Steps in the Evolution of ARM Cortex-M

5. ARM 기반모니터프로그램사용. Embedded Processors. DE1-SoC 보드 (IntelFPGA) Application Processors. Development of the ARM Architecture.

ARM TrustZone for ARMv8-M for software engineers

Troubleshooting Guide

Running ARM7TDMI Processor Software on the Cortex -M3 Processor

ECE 471 Embedded Systems Lecture 2

The ARM Cortex-M0 Processor Architecture Part-2

Cortex -A15 MPCore. Technical Reference Manual. Revision: r3p0. Copyright ARM. All rights reserved. ARM DDI 0438E (ID040512)

Cortex -R5. Technical Reference Manual. Revision: r1p2. Copyright ARM. All rights reserved. ARM DDI 0460D (ID092411)

Hi Hsiao-Lung Chan, Ph.D. Dept Electrical Engineering Chang Gung University, Taiwan

ARM Cortex-M and RTOSs Are Meant for Each Other

Memory Models. Registers

ARM architecture road map. NuMicro Overview of Cortex M. Cortex M Processor Family (2/3) All binary upwards compatible

ARM. Cortex -A15 MPCore. Processor. Technical Reference Manual. Revision: r4p0. Copyright ARM. All rights reserved. ARM DDI 0438I (ID062913)

ARM ARCHITECTURE. Contents at a glance:

OUTLINE. STM32F0 Architecture Overview STM32F0 Core Motivation for RISC and Pipelining Cortex-M0 Programming Model Toolchain and Project Structure

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 12 Processor Structure and Function

ARM Cortex-A9 ARM v7-a. A programmer s perspective Part1

ARM Ltd. ! Founded in November 1990! Spun out of Acorn Computers

Hi Hsiao-Lung Chan, Ph.D. Dept Electrical Engineering Chang Gung University, Taiwan

Cavium ThunderX2 CN99XX PMU Events (Abridged) July 31, 2018

Embedded Systems Programming

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

This section covers the MIPS instruction set.

CODE TIME TECHNOLOGIES. mabassi RTOS. Porting Document. SMP / ARM Cortex-A9 Xilinx SDK (GCC)

Document number: ARM DAI 0240A Copyright ARM 2010

Contents of this presentation: Some words about the ARM company

FA3 - i.mx51 Implementation + LTIB

Sneha Rajguru & Prajwal Panchmahalkar

Universität Dortmund. ARM Architecture

FPQ9 - MPC8360E implementation

Freescale i.mx6 Architecture

ECE254 Lab3 Tutorial. Introduction to MCB1700 Hardware Programming. Irene Huang

ARMv8: The Next Generation. Minlin Fan & Zenon Xiu December 8, 2015

Performance Optimization for an ARM Cortex-A53 System Using Software Workloads and Cycle Accurate Models. Jason Andrews

Introduction to Armv8.1-M architecture

The Definitive Guide to ARM Ò Cortex Ò -M3 and Cortex-M4 Processors

Overview of Development Tools for the ARM Cortex -A8 Processor George Milne March 2006

Arm TrustZone Armv8-M Primer

IoT and Security: ARM v8-m Architecture. Robert Boys Product Marketing DSG, ARM. Spring 2017: V 3.1

Multi-core microcontroller design with Cortex-M processors and CoreSight SoC

embos Real Time Operating System CPU & Compiler specifics for ARM core with ARM RealView Developer Suite 3.0 Document Rev. 1

CS 310 Embedded Computer Systems CPUS. Seungryoul Maeng

Returning from an Exception. ARM Exception(Interrupt) Processing. Exception Vector Table (Assembly code) Exception Handlers (and Vectors) in C code

ARM Embedded Systems: ARM Design philosophy, Embedded System Hardware, Embedded System Software

Introduction to ARMv8-A

CODE TIME TECHNOLOGIES. mabassi RTOS. Porting Document. SMP / ARM Cortex-A9 DS5 (GCC)

Designing with Nios II Processor for Hardware Engineers

The ARM Cortex-M0 Processor Architecture Part-1

Cortex -A9. Technical Reference Manual. Revision: r3p0. Copyright ARM. All rights reserved. ARM DDI 0388G (ID072711)

Transcription:

Cortex-R5 Software Development Course Description Cortex-R5 software development is a three days ARM official course. The course goes into great depth, and provides all necessary know-how to develop software for systems based on Cortex-R5 processor. The course covers the processor architecture, memory ordering, memory protection unit (MPU), caches and TCMs, Assembler language, synchronization, barriers, debug, power management, C for ARM and exception handling. At the end of the course the participant will receive a certificate from ARM. Course Duration 3 days

Goals 1. Become familiar with ARMv7 architecture 2. Become familiar with Cortex-R5 architecture 3. Become familiar with ARM instruction sets 4. Understand Caches and TCMs structures and maintenance 5. Be able to write assembler code for Cortex-R5 6. Implement synchronization processes using mutex/semaphore 7. Be able to add barriers instructions to control program flow 8. Be able to configure and use the MPU 9. Apply invasive and non-invasive debug techniques 10. Write an efficient C code for Cortex-R5 processor 11. Be familiar with ARM tools for Cortex-R processors 12. Manage Cortex-R4 power modes Target Audience Software engineers that would like developing software and BSP for platforms based on Cortex-R5 processor. Prerequisites. Computer architecture background C and Assembler Experience in developing embedded systems Course Material ARM official course book ARM DS5 SDK

Agenda Main Topics: ARM Processor Cores ARM System Design Introduction to the ARM Architecture ISA Assembly Exception Handling Software Engineer s Guide to the Cortex-R5 Assembler Programming for ARM Processors Exception Handling ARM Caches and TCMs Using the MPU Synchronization Barriers C/C++ Compiler Hints & Tips Linker & Libraries Hints & Tips Programming the GIC Further Compiler/Linker Hints & Tips Embedded Software Development Cortex-R5 power management Debug and trace Day #1 Introduction to the ARM architecture Architecture Versions o Introduction to the ARM architecture o Development of the ARM architecture o ARM Cortex processors (A/R/M) Registers & Instruction Sets o Data sizes and instruction sets o The ARM register set o Program status register o ARM, Thumb. Thumb2, ThumbEE, Jazelle o Endianness o Assembler syntax examples o Floating point and NEON o AAPCS

Exception Model o Processor modes o Banking of registers o Taking an exception o Vector table Memory Model o Memory model overview o Memory types (Normal/Device/Strongly Ordered) o Memory hierarchy example o Data alignment Coprocessors o Coprocessors overview o CP15 example o PMU Architecture Extensions o TrustZone o Virtualization o Jazelle ARMv7-A/R ISA Overview ARM Assembler File Syntax Load/Store Instructions o Single/Double register data transfer o Addressing memory o Pre and post-indexed addressing o Multiple register data transfer Data Processing Instructions o Arithmetic, logical, move instructions o Shift/Rotate operations o The flexible second operand o Instructions for loading constants o Multiply/Divide o Bit manipulation instructions o Byte reversal Flow Control Instructions o Branch instructions o Interworking o Compare and branch if Zero o Condition codes and flags o If-Then instruction o Supervisor call instruction (SVC) Miscellaneous Instructions o Coprocessor instructions o PSR access o Breakpoint instruction (BKPT) o Wait for interrupt instruction (WFI)

o NOP instruction o Wait for event & send event instructions (WFE & SEV) DSP Instructions o SIMD o Saturated maths and CLZ o Data packing/unpacking Exception Handling in Details Introduction o Exception handling process o The ARM register set and modes o Exception priorities o Vector table o Link register adjustments o Returning from exceptions o Exception state & Endianness o Non-makable fast interrupt o Low latency interrupt Interrupts o Interrupt & interrupt handler example o Interrupt pre-emption o Issues with re-enabling interrupts o Change processor state (CPS) instruction o Stack issues o Nested interrupt example o FIQ vs IRQ o Interrupt controllers Abort Handlers o Prefetch and data aborts o Data abort types (internal/external, precise/imprecise) o Identifying the abort source o Example data abort handler SVC Handlers o What are SVC used for? o Example SVC handler o Example SVC usage in an OS Undef Handlers o Undefined instruction o Example Undef handler Reset Handlers ARM Tools Overview ARM Tools o ARM Compiler o Fast Models

o Versatile Express boards o DS5 Professional Edition o DSTREAM Debug & Trace Unit o Streamline analysis tool Cortex-R5 Architecture System Engineer s Guide to the Cortex-R5 o Cortex-R5 architecture overview o Cortex-R5 pipeline o Program flow prediction o Twin CPU support o Divide & floating point units o Level 1 memory system o Error detection and correction o Instruction set changes o Debug and trace support Day #2 Memory Structure ARMv7-R Caches and TCMs o Cache basics o Caches on ARM processors o L1 data cache policies o Inner and Outer cache policies o Write back and write through o L1 memory system buffers o Tightly Coupled Memory (TCM) o TCM configuration o ECC and parity schemes o Optimization considerations o Cache coherency operations o Cache core optimizations o Point of Unification (PoU) and Point of Coherency (PoC) Memory Protection Unit (MPU) Using the MPU o Why do we need memory management? o Access permissions o Memory types

o Types & attributes o Instruction accesses o Memory Protection Unit (MPU) overview o Protection regions o When the MPU is disabled Synchronization Techniques Synchronization o The need for atomicity o Critical sections o LDREX and STREX instructions o Multi-thread mutex example o Coherent and non-coherent multi-core o Synchronization in a cluster o Memory attributes o Context switching Using Barriers Understanding Barriers o Memory model and access order o Barriers overview o Data barriers o Speculation across barriers o Instruction barriers o Ordering of maintenance operations Debug Overview Debug o Types of debug o Invasive debug o Debug infrastructure and CoreSight overview o How do I access the debug logic? o Debug events o Halt vs. Monitor mode debugging o Viewing memory o Debugger impact on caches o Vector catch o Instruction breakpoint types o Embedded cross trigger- CTI o Debugger semi-hosting support o Non-invasive debug (PMU and trace) o Performance monitoring hardware o PMU configuration o Results analysis

o CoreSight trace system o Other trace resources Day #3 C/C++ Compiler Hints & Tips Writing C for ARM o Parameter passing Parameter passing Passing more than 4 parameters Parameter alignment o Floating point linkage HW and SW floating point linkage Floating point linkage example o Alignment Global data layout Unaligned accesses Packing and alignment of structures Alignment of pointers o Coding considerations Size of local variables Division Base pointer optimization Using volatile C/C++ Compiler Hints & Tips o Basic compilation Language support Variables types supported Optimization levels Selecting an architecture or processor o Compiler optimizations Automatic optimizations Tail-call optimization Instruction scheduling Idiom recognition Inlining of functions Loop transformation o Coding considerations Register usage Loop termination Division operations Reminders-Modulo arithmetic

C++ support o Local and global data issues Variable types Global data layout Optimization of memcpy() Linker & Libraries Hints & Tips Linker & Libraries Hints & Tips o Linking basics How does the linker know what to do? Object file structure Library structure Scatter-loading o System and user libraries Libraries versus object files Linker library searching Creating and maintaining libraries o Veneers and interworking Dealing with branches Linker generated veneers Veneer types Minimizing the number of veneers o Linker optimizations and diagnostics Unused section elimination RW data compression Small function inlining Useful linker diagnostics o ARM supplied libraries ARM compiler standard libraries Microlib o Mixing C/C++ and Assembler Register usage revisited Mixing C and Assembly Calling Assembly from C/C++ Intrinsics Embedded Assembler Inline Assembler o Stack issues Protecting and measuring stack usage --callgraph example (Dhrystone) o VFP Floating point capabilities Floating point linkage o Advanced building facilities Multifile compilation Linker feedback

Linking for specific target Debug issues & build time BPABI & SysV Embedded Software Development o Embedded development process o An out-of-the-box build Default C library Default memory map Application startup o Tailoring the C library to your target Retargeting the C library Avoiding C library Semihosting o Tailoring image memory map to your target Introduction to Scatterloading Scatter description files Linker placement rules Ordering objects in a Scatter file Root regions Run-time memory management Stack and Heap initialization Run-time memory models Stack and Heap regions o Reset and initialization The vector table Initialization steps Initialize stack pointers Local memory setup Extending functions Execute mode considerations o Further memory map considerations Long branch veneers Memory mapped registers o Building and debugging your image Unused section elimination/entry points Endianness Output options Debugging ROM images o Placing stack and heap in scatter file o ROM/RAM remapping Generic Interrupt Controller Programming GIC Overview o GIC architecture o Sources of interrupt (SGI, PPI, SPI) Distributor and CPU Interfaces

o Register interfaces o Distributor interface o CPU interface o Programming guidelines How to Enable and Configure Interrupts o Enabling the IC o Interrupt configuration How to Handle Interrupts o Interrupt states o Taking an interrupt o Which CPU services an SPI? o Priority mask register o Interrupt priority registers o Pre-emption o Nesting interrupts How to Send Software Interrupts o SGI capability o Sending a SGI o Receiving a SGI Security Extensions o Group 0 and Group 1 o Acknowledging interrupts o Priority and banking Interrupts IDs on Cortex-R4 Software Power Management for Cortex-R5 Cortex-R4 Power Management o Processor power consumption Power components Example power contributions Power reduction o Power modes Standby mode Shutdown mode Dormant mode o Use cases o SoC power modes o Entering low power modes o Exiting shutdown/dormant mode