Author: Texas Instruments ®, Sitara™ ARM ® Processors Building Blocks for PRU Development Module 2 PRU Firmware Development This session covers how to.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Threads, SMP, and Microkernels
OPERATING SYSTEM An operating system is a group of computer programs that coordinates all the activities among computer hardware devices. It is the first.
Introduction to HT-IDE3000 Micro-C development System Department.
UEE072HM Linking HLL and ALP An example on ARM. Embedded and Real-Time Systems We will mainly look at embedded systems –Systems which have the computer.
Advanced microprocessor optimization Kampala August, 2007 Agner Fog
Chapter 3 Loaders and Linkers
Assembly 01. Outline Binary vs. Text Files Compiler vs. Assembler Mnemonic Assembly Process Development Process Debugging Example 1 this analogy will.
Linking and Loading Fred Prussack CS 518. L&L: Overview Wake-up Questions Terms and Definitions / General Information LoadingLinking –Static vs. Dynamic.
U-Boot and Linux Kernel Debug using CCSv5
Lab6 – Debug Assembly Language Lab
Chapter 7 Interupts DMA Channels Context Switching.
1 Real-Time System Design Developing a Cross Compiler and libraries for a target system.
Building Blocks for PRU Broad Market Success Module 4 – Linux Drivers
OllyDbg Debuger.
Software Development and Software Loading in Embedded Systems.
Introduction to Android Platform Overview
Introduction Purpose Objectives Content Learning Time
Cortex-M3 Programming. Chapter 10 in the reference book.
MDK-ARM Microcontroller Development Kit MDK: Microcontroller Development Kit.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Silicon Labs ToolStick Development Platform
U-Boot Debug using CCSv5 In this session we will cover fundamentals necessary to use CCSv5 and a JTAG to debug a TI SDK-based U-Boot on an EVM platform.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
System Calls 1.
University of Maryland Compiler-Assisted Binary Parsing Tugrul Ince PD Week – 27 March 2012.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Project Management November.
Enabling the ARM Learning in INDIA ARM DEVELOPMENT TOOL SETUP.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
CHAPTER FOUR COMPUTER SOFTWARE.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in.
1 What is a Kernel The kernel of any operating system is the core of all the system’s software. The only thing more fundamental than the kernel is the.
Challenges in KeyStone Workshop Getting Ready for Hawking, Moonshot and Edison.
Topic 2d High-Level languages and Systems Software
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
MICROPROGRAMMED CONTROL CH 17 Team # 2 Members: Wilmer Saint-Hilaire Alberto Mollinedo Vinicius Schuina Luis Perez.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
SKYPIAX, how to add Skype capabilities to FreeSWITCH (and Asterisk) CHICAGO, USA, September 2009.
Dissecting the Windows CE Build Process James Y. Wilson Principal Engineer, Windows Embedded MVP CalAmp, Inc. James Y. Wilson Principal Engineer, Windows.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
Computer Software Types Three layers of software Operation.
Full and Para Virtualization
Implementation of Embedded OS Lab3 Porting μC/OS-II.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
김민수 Cortex-M4 Processor - Getting Started with the GNU Compiler Collection(gcc)
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
1 The user’s view  A user is a person employing the computer to do useful work  Examples of useful work include spreadsheets word processing developing.
Building programs LinuxChix-KE. What happens in your CPU? ● It executes a small set of instructions called "machine code" ● Each instruction is just a.
Procedures Procedures are very important for writing reusable and maintainable code in assembly and high-level languages. How are they implemented? Application.
Introduction to Operating Systems Concepts
Computer System Structures
Computer Basics.
Lecture 3 Translation.
Introduction to the ARM mbed Platform– A Hands-on Course
Development Environment
Branching Error (a.k.a. the VM Program Instruction Break Error)
MODULAR PROGRAMMING Many programs are too large to be developed by one person. programs are routinely developed by teams of programmers The linker program.
Separate Assembly allows a program to be built from modules rather than a single source file assembler linker source file.
PRU-ICSS Programming with CCS
Workshop in Nihzny Novgorod State University Activity Report
An Introduction to Device Drivers
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
IS3440 Linux Security Unit 7 Securing the Linux Kernel
Lesson Objectives Aims Key Words Compiler, interpreter, assembler
Assembly Language for Intel-Based Computers
Linux Architecture Overview.
Outline Chapter 2 (cont) OS Design OS structure
Presentation transcript:

Author: Texas Instruments ®, Sitara™ ARM ® Processors Building Blocks for PRU Development Module 2 PRU Firmware Development This session covers how to develop firmware for the PRU-ICSS Subsystem. Oct 2014

2

3 TI PRU CGT C Compiler

4 C Compiler Developed and maintained by TI CGT team –Remains very similar to other TI compilers Full support of C/C++ Adds PRU-specific functionality –Can take advantage of PRU architectural features automatically –Contains several intrinsics List can be found in Compiler documentation Full instruction-set Assembler for hand-tuned routines For more information, visit

5 TI PRU CGT Assembler vs PASM Advantages of using TI PRU Assembler over PASM The biggest advantage is that the TI PRU linker produces ELF files that enable source- level debugging within CCS. No more debugging in disassembly window!! The TI PRU assembler uses the same shell as other TI compilers. Customers only need to learn one set of conventions, directives, etc. TI PRU assembler will be maintained in the future, while PASM will not be updated anymore. The TI PRU assembler uses the powerful TI linker which allows more flexibility then PASM and facilitates linking PRU programs with host CPU image for runtime loading and symbol sharing. Disadvantages of using TI PRU Assembler over PASM Have to learn new directives if already used to PASM TI PRU assembler requires more command line options and a linker command file. Some porting effort required for reusing legacy PASM projects. There are some differences in the instructions and directives supported TI PRU Assembler versus PASM. Theses are listed in the TI PRU Compiler package release notes which is located at the root of the install folder.

6 TI PRU CGT Assembly vs C Advantages of coding in Assembly over C –Code can be tweaked to save every last cycle and byte of RAM –No need to rely on the compiler to make code deterministic –Easily make use of scratchpad Advantages of coding in C over Assembly –More code reusability –Can directly leverage kernel headers for interaction with kernel drivers –Optimizer is extremely intelligent at optimizing routines “Accelerating” math via MAC unit, implementing LOOP instruction, etc. –Not mutually exclusive - inline Assembly can be easily added to a C project

7 Coding Considerations There are some “tricks” we have to use to get the compiler to perform some operations –Variables have to be “mapped” to Constant Table entries –The compiler will automatically use the MAC unit if the --hardware_mac switch is passed to it –Optimization can be tricky; be sure to mark variables that can change via outside forces (e.g., host, other PRU core) as volatile

8 Coding Considerations There are also some limitations –The C environment does not know that the final eight CT registers have a variable offset, and thus that feature cannot be easily utilized –The compiler does not currently use the scratchpad for register state saving This support is tentatively planned for a future CGT release

9 PRU Register Header Files

10 PRU Register Headers Created to make accessing a register easier –Register names match those in documentation Code Completion feature in CCS automatically lists all members Developed to allow a user to program at the register-level or at a bit- field level –Note that bit-field accesses could potentially cause some issues with other C compilers (e.g., gcc), but register-level shouldn’t PRU cregister mechanism used to leverage constants table when possible. Currently provides definition for the following: PRU INTC PRU Config PRU IEP PRU Control PRU ECAP PRU UART

11 PRU Register Headers Layout 11 Excerpt from config.h –Access register directly pruCfg.SYSCFG –Or access specific bitfields CT_CFG.SYSCFG_bit.STANDBY_INIT Example of how to use in C file –#include the specific header –Map the constant table entry to register structures –Access registers or fields

12 Development and Debug Options

13 Development In CCS –Download and install PRU CGT package via App Center –Open or create new PRU projects just like with any other device –Code completion helps make register accesses easier The Downside –Is more difficult to debug while Linux kernel and user application also running concurrently

14 Development Outside of CCS –Code in your favorite text editor, build via command line Linux and Windows packages available –May be easier to script/automate different processes (build or otherwise) The Downside –Can be difficult to debug PRU code –Lacks CodeCompletion

15 Debug In CCS –Easy to view register and variable contents –Access to breakpoints and simply stepping mechanism Outside CCS –Minimal debug control, but some debugfs control provided through remoteproc –Start, halt, single-stepping is all console-based Clunky when done by hand, but can potentially be scripted

16 Thank you! For more information about the PRU, visit: Presentation Home – PRU-ICSS Wiki – PRU Evaluation Hardware – Support –