RAM 6.0 BUX II Series User's Guide

Browse online or download User's Guide for Audio amplifiers RAM 6.0 BUX II Series. RAM 6.0 BUX II Series User`s guide User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 189
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews

Summary of Contents

Page 1 - BSP DEVELOPER’S GUIDE

VxWorks6.0BSP DEVELOPER’S GUIDEedition 2 ®VxWorks BSP Developer's Guide

Page 2 - U.S.): (800) 545-WIND

VxWorksBSP Developer’s Guide, 6.0 2BSP, there are template files available for use in lieu of the reference BSP. However, a template BSP is generally

Page 3 - Contents

VxWorksBSP Developer’s Guide, 6.0 92/************************************************************ * sysPciAutocinfigInclude - Specify devices to conf

Page 4

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP933struct PciIntIrq { UINT8 bus; UINT8 device; UINT8 intPin; UINT8 irq; }; static struct Pc

Page 5 - Contents

VxWorksBSP Developer’s Guide, 6.0 94* the interrupt assignment correctly. The design of this* routine should handle any board design. * * RETURNS: N

Page 6

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP953#ifdef INCLUDE_PCI sysPciAutoConfig (); /* prepare BSP support for callouts from support

Page 7

VxWorksBSP Developer’s Guide, 6.0 96bar0 in 32-bit mem space @ 0x80002000 [0,18,0] type=P2P BRIDGE to [1,0,0] base/limit: mem= 0x80100000/0x800ffff

Page 8

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP973All values are numeric—pciHeaderShow( ) does not make any attempt to interpret register

Page 9 - Introduction

VxWorksBSP Developer’s Guide, 6.0 98VME_A24_MSTR_SIZE, VME_A16_MSTR_LOCAL, and VME_A16_MSTR_SIZE must be defined. However, this requirement can vary

Page 10 - BSP Developer’s Guide, 6.0

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP993Wind River Workbench User’s Guide (or, for Tornado users, the Tornado User’s Guide) for

Page 11 - 1.3 BSP Development Process

VxWorksBSP Developer’s Guide, 6.0 100parameter to the devEndLoad( ) routine is a character pointer. In order for each Ethernet device to be controlle

Page 12 - 1.4 Terminology

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1013Media Access Controller (MAC) Address for Ethernet Devices Most modern Ethernet devices

Page 13 - Overview of a BSP

1 Introduction1.3 BSP Development Process31Wind River provides processor-dependent software as part of each reference BSP. That is, the portions of

Page 14

VxWorksBSP Developer’s Guide, 6.0 102For more information about adding support for devices, refer to the VxWorks Device Driver Developer’s Guide. Gen

Page 15 - 2.2 Boot Sequence

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1033Multi-Mode Serial (SIO) Drivers The generic multi-mode serial drivers reside in the dir

Page 16 - 2.2.1 Sequence Overview

VxWorksBSP Developer’s Guide, 6.0 104int (*callbackInstall) ( SIO_CHAN * pSioChan, int callbackType, STATUS (*callback)(), void * callbackArg ); int

Page 17 - 2 Overview of a BSP

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1053SIO_OPEN Opens a channel. SIO_HUP Closes a channel.txStartup( ) This routine provides a

Page 18

VxWorksBSP Developer’s Guide, 6.0 106Serial Drivers The old style of serial drivers, those used before VxWorks 5.3, reside in the target/src/drv/seri

Page 19

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1073AUX_CLK_RATE_MIN Defines the minimum rate at which the auxiliary clock can run. To supp

Page 20

VxWorksBSP Developer’s Guide, 6.0 108sysOneShotInit( ) This routine is called during board initialization. It configures the one-shot timer and sets

Page 21

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1093match value is advanced. To implement the one-shot timer, a match count value is comput

Page 22

VxWorksBSP Developer’s Guide, 6.0 110Thus, the offset parameter is biased so that an offset of 0 points to the first byte of the VxWorks boot line. T

Page 23 - Step 1: Execute romInit( )

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1113In addition to modifications to sysMemTop( ), you must also modify the sysPhysMemDesc[

Page 24

VxWorksBSP Developer’s Guide, 6.0 4developer. However, a typical development process is more likely to take several months. Once the minimal kernel i

Page 25 - Step 4: Execute usrInit( )

VxWorksBSP Developer’s Guide, 6.0 112With separate drivers for different functional areas, users can scale out support for functional areas that are

Page 26

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1133Data Address in Virtual Memory Environments If the CPU board has a memory management un

Page 27 - TCB) from the top

VxWorksBSP Developer’s Guide, 6.0 114

Page 28 - 2.3 Components of a BSP

115 4Debugging Your BSP4.1 Introduction 1154.2 Basic Debugging Techniques 1164.3 Advanced Debugging Techniques 1264.1 Introduction This chapter pre

Page 29 - USRCONFIG = usrConfig.c

VxWorksBSP Developer’s Guide, 6.0 116Board Bringup During board bringup, the target hardware is still under development. Because of this, some compon

Page 30

4 Debugging Your BSP4.2 Basic Debugging Techniques1174information on debugging using an OCD, see 4.3 Advanced Debugging Techniques, p.126. 4.2.1 Us

Page 31

VxWorksBSP Developer’s Guide, 6.0 118Finding Code Block Addresses You can use objdumparch when you need to find the code that resides at a particular

Page 32

4 Debugging Your BSP4.2 Basic Debugging Techniques1194S21400002057696E64205269766572205379737465D9 ... ... S2140366400000000E000000010000000F0000000

Page 33

VxWorksBSP Developer’s Guide, 6.0 120In this example, you have 0x036670 - 0x000000 = 0x036670. Notice that edata - romInit (that is, 0x36670 - 0x0000

Page 34

4 Debugging Your BSP4.2 Basic Debugging Techniques1214Looking at the disassembly of an object file is helpful when, given the address of an exceptio

Page 35

5 2Overview of a BSP2.1 Introduction 52.2 Boot Sequence 72.3 Components of a BSP 202.4 The Development Environment 432.5 Avoiding Common Problems 50

Page 36 - 2.3.2 Derived Files

VxWorksBSP Developer’s Guide, 6.0 122one LED available on your target hardware or a port pin that can be connected to a logic analyzer. One useful bi

Page 37

4 Debugging Your BSP4.2 Basic Debugging Techniques1234void sysPrintDebug(char *msg) { unsigned long msgIx; int pollStatus; for (msgIx = 0; msgIx <

Page 38

VxWorksBSP Developer’s Guide, 6.0 124If you are not sure if a particular block of code is included in the final image, you can use the #warning macro

Page 39

4 Debugging Your BSP4.2 Basic Debugging Techniques1254Another way to see if components are included is to look at the nmarch -n output. For example:

Page 40 - 2.3.4 Required Routines

VxWorksBSP Developer’s Guide, 6.0 126image instead of the bootrom image. If bootrom_uncmp is the target image, the image contains the full informatio

Page 41

4 Debugging Your BSP4.3 Advanced Debugging Techniques1274Software BreakpointsThe type of breakpoints typically used during application development a

Page 42

VxWorksBSP Developer’s Guide, 6.0 128If you want to debug an image during boot, there are two different conditions to be aware of: code running direc

Page 43

4 Debugging Your BSP4.3 Advanced Debugging Techniques1294execution. Most other boot loaders provide similar functionality, though the commands may b

Page 44

VxWorksBSP Developer’s Guide, 6.0 130

Page 45

131 ACommon Development IssuesA.1 Introduction 131A.2 The Development Environment 132A.3 Cache and MMU 133A.4 Reusing Unportable Code 135A.5 Volatil

Page 46 - /* lock interrupts */

VxWorksBSP Developer’s Guide, 6.0 6Before describing the steps in the boot process, it is worth noting the files you must write or modify during BSP

Page 47 - 2.3.5 Required Macros

VxWorksBSP Developer’s Guide, 6.0 132A.2 The Development Environment There are a number of problems that can occur due to your choice of development

Page 48 - ROM_TEXT_ADRS. The offset

A Common Development IssuesA.3 Cache and MMU133AIf your system becomes unresponsive, verify that the RAM addresses the code is actually loaded at ma

Page 49

VxWorksBSP Developer’s Guide, 6.0 134cache entry points to. In this case, the modification that was made by the device is never visible to the proces

Page 50 - 2.3.6 Optional Routines

A Common Development IssuesA.4 Reusing Unportable Code135AA.4 Reusing Unportable Code A common problem when creating BSPs is that code for some dev

Page 51

VxWorksBSP Developer’s Guide, 6.0 136However, there are several reasons why this is not good programming practice. In many modern processors, the phy

Page 52 - 2.4.1 BSP Debugging Methods

137 BDocumentation GuidelinesB.1 Introduction 138B.2 Written Style 138B.3 Sections for Libraries and Subroutines 145B.4 Sections for target.ref 153B

Page 53

VxWorksBSP Developer’s Guide, 6.0 138B.1 IntroductionReference documentation for Wind River board support packages (BSPs) consists of UNIX-style ref

Page 54

B Documentation GuidelinesB.2 Written Style139BPunctuation Always use a colon after the phrase or sentence introducing an example, display, itemized

Page 55

VxWorksBSP Developer’s Guide, 6.0 140boot ROM bootrom, boot rom, bootROMbring up (v.) bringup, bring-upbring-up (n., adj.) bringup, bring upbps BPS,

Page 56 - 2.4.3 The Wind River IDE

B Documentation GuidelinesB.2 Written Style141Bfile system filesystemflash (n.) Flash, flash (v. or gerund)for example e.g.FTP ftpHP-UX HP/UX, HPUXh

Page 57 - 2.4.5 Download Path

2 Overview of a BSP2.2 Boot Sequence722.2 Boot SequenceThis section describes the steps in a typical VxWorks boot scenario and identifies which rou

Page 58

VxWorksBSP Developer’s Guide, 6.0 142MS-DOS MSDOS, MS DOSmotherboard mother-board, mother boardmultiprocessor multi-processormultitasking multi-taski

Page 59

B Documentation GuidelinesB.2 Written Style143Bscalable scaleable SCSI Scsi, scsiset up (v.) set-upsetup (n., adj.) set-upshell script shellscriptsi

Page 60

VxWorksBSP Developer’s Guide, 6.0 144AcronymsDefine acronyms at first usage, except for widely recognized acronyms (see Table B-2). At first usage, g

Page 61 - 2.5 Avoiding Common Problems

B Documentation GuidelinesB.3 Sections for Libraries and Subroutines145BBoard NamesNames used for target boards should correspond to the names used

Page 62

VxWorksBSP Developer’s Guide, 6.0 146In the examples that follow, mfr&board means the manufacturer’s name plus the full model name of the board,

Page 63 - Custom Hardware

B Documentation GuidelinesB.3 Sections for Libraries and Subroutines147B LibrariesDescribe briefly what this collection of routines does. The hyphen

Page 64 - 3.2.1 Initializing the Board

VxWorksBSP Developer’s Guide, 6.0 148Tcl Procedures, Scripts, CommandsFor Tcl procedures, scripts, and other commands, this section is the execution

Page 65 - 3.2.2 Initializing Memory

B Documentation GuidelinesB.3 Sections for Libraries and Subroutines149Bcomment for each parameter, which serves as a useful overview or memory jogg

Page 66

VxWorksBSP Developer’s Guide, 6.0 150bytesPerBlkThe size of each logical block on the disk. If zero, the default is 512.blksPerTrackThe number of blo

Page 67

B Documentation GuidelinesB.3 Sections for Libraries and Subroutines151B Mention only true returns in this section, not values copied to a buffer gi

Page 68

VxWorksBSP Developer’s Guide, 6.0 82.2.1 Sequence OverviewMinimally, initializing a processor consists of providing a portion of code, and possibly

Page 69

VxWorksBSP Developer’s Guide, 6.0 152Format the list with the item-list tags \is, \i, and \ie (for more information, see Item Lists (Definition Lists

Page 70 - LED Routines

B Documentation GuidelinesB.4 Sections for target.ref153Bbook on a line by itself—this approach is preferable when there are three or more books.B.4

Page 71

VxWorksBSP Developer’s Guide, 6.0 154INTRODUCTION SectionThis section includes getting-started information, including subsections detailing ROM insta

Page 72

B Documentation GuidelinesB.5 Format and Style155BUse the \bs and \be tags to display board diagrams. See the template BSP for guidelines on diagram

Page 73

VxWorksBSP Developer’s Guide, 6.0 156Formatting is controlled by special text markup, summarized in Table B-5. Some markup consists of format command

Page 74

B Documentation GuidelinesB.5 Format and Style157Binline ‘text’ or ’text’ Bold text, for literal names: filenames, commands, keywords, global varia

Page 75 - #undef INCLUDE_WDB_VIO

VxWorksBSP Developer’s Guide, 6.0 158Punctuation and SpellingQuotation MarksIf quotation marks really are necessary in text, always type a straight d

Page 76

B Documentation GuidelinesB.5 Format and Style159B A group of all-uppercase words on a line by itself. Underscores and numbers are also permitted. F

Page 77

VxWorksBSP Developer’s Guide, 6.0 160Example input:When semTake() returns due to timeout, it sets ’errno’ to S_objLib_OBJ_TIMEOUT (defined in objLib.

Page 78 - 3.2.9 DMA

B Documentation GuidelinesB.5 Format and Style161BPlaceholder TextA placeholder (also known as a text variable) is a word that represents a value th

Page 79 - 3.2.11 Serial Drivers

2 Overview of a BSP2.2 Boot Sequence92Figure 2-1 Boot Sequence Using a VxWorks Image sysInit sysAlib.s RAM-based loadablesysClkConnectusrKernelInitu

Page 80

VxWorksBSP Developer’s Guide, 6.0 162Cross-References to Other Reference EntriesDo not use the UNIX-style parentheses-plus-number scheme to cross-ref

Page 81 - 3.3.3 Adding Other Timers

B Documentation GuidelinesB.5 Format and Style163BLists and TablesShort Word ListsA simple list of words or short phrases can be created simply by p

Page 82 - 3.3.4 NVRAM

VxWorksBSP Developer’s Guide, 6.0 164Resulting output:FIODISKFORMATFormats the entire disk with appropriate hardware track and sector marks. No file

Page 83

B Documentation GuidelinesB.5 Format and Style165BExample input:\tsKey | Name | Meaning----|------------+--------\& | ampersand | bitwise AND\|

Page 84

VxWorksBSP Developer’s Guide, 6.0 166Because backslashes are not interpreted as an escape in \cs blocks, the backslash itself must not be escaped. Fo

Page 85 - 3.3.6 Boot ROMs

B Documentation GuidelinesB.6 Directives167B If ports are stacked, be sure that your notation includes a description of which port is the relevant o

Page 86

VxWorksBSP Developer’s Guide, 6.0 168The backslash is a significant deviation from refgen, apigen’s predecessor. Most refgen directives required no b

Page 87

B Documentation GuidelinesB.6 Directives169BNote that these directives should not be used to suppress the publication of an entire file. The standar

Page 88

VxWorksBSP Developer’s Guide, 6.0 170new name is used in searching for possible hyperlinks to the output file, but does not affect the name of the ou

Page 89 - UINT * pArg

B Documentation GuidelinesB.8 Generating Reference Entries171BThis will generate a target.ref file in the current directory.The resulting target.ref

Page 90

VxWorksBSP Developer’s Guide, 6.0 10Figure 2-2 illustrates the boot sequence used when VxWorks is booted from a boot ROM. Figure 2-2 Boot Sequence Us

Page 91

VxWorksBSP Developer’s Guide, 6.0 172and model of the board. For example: mv2603 = Motorola MVME2603. The files relevant to documentation are: Makefi

Page 92

B Documentation GuidelinesB.8 Generating Reference Entries173BToolshost/host/bin/apigenThe apigen tool is a Perl script (refgen is a Tcl script) tha

Page 93

VxWorksBSP Developer’s Guide, 6.0 174The flow chart in Figure B-1 shows how the make process distributes BSP reference entries in the docs directory.

Page 94

175IndexSymbols_romInit( ) 8_sysInit( ) 8, 24Aadding other timers 73ambaTimer.c 108apigen tool 173architecture considerations 14avoiding common proble

Page 95

VxWorks BSP Developer’s Guide, 6.0 176BSP development process 3time required 3BSP directoriesvtsLogs 23BSP filesbootInit.c 27bspname.h 23config.h 23c

Page 96

Index177Indexdebugging 44advanced techniques 126basic techniques 116breakpoints 126forever loop 129in-circuit emulator (ICE) 46logic analyzer 46on-ch

Page 97

VxWorks BSP Developer’s Guide, 6.0 178Hheader filesbspname.h 23config.h 23configAll.h 27IICE 46IDE 48image types 28vxWorks 77in-circuit emulator (ICE

Page 98

Index179IndexsysFlashSet( ) 74Oobjdump 117OCD 45, 126on-chip debugging (OCD)see OCDone-shot timer 107examples 108OS image 11outConsole( ) 63PPCIautoc

Page 99

VxWorks BSP Developer’s Guide, 6.0 180required macros 39 see also macros, BSP macrosrequired routines 32see also routinesreusing code 135ROM emulator

Page 100

Index181IndexsysNvRamGet( ) 32, 36, 74, 109sysNvRamSet( ) 32, 36, 74, 109sysOneShotDisable( ) 107sysOneShotEnable( ) 107sysOneShotInit( ) 108sysPciAu

Page 101 - 3.3 Finalizing Your BSP

2 Overview of a BSP2.2 Boot Sequence1122.2.2 Boot Sequence Configurations There are several boot sequence configurations that are commonly supporte

Page 102

Copyright © 2005 Wind River Systems, Inc. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any me

Page 103

VxWorksBSP Developer’s Guide, 6.0 12An image that continues running from flash and is built from a project is normally called vxWorks_romResident. Su

Page 104

2 Overview of a BSP2.2 Boot Sequence132over the network. This image requires a large ROM space and a large RAM space. This image can not be run from

Page 105

VxWorksBSP Developer’s Guide, 6.0 14bootrom_uncmp A VxWorks image with a boot loader application that is programmed into flash. This image copies its

Page 106

2 Overview of a BSP2.2 Boot Sequence152The MIPS processor uses a ModeIn input pin to set 256 bits of initialization information. This information is

Page 107

VxWorksBSP Developer’s Guide, 6.0 16The purpose of this routine is to initialize the CPU and some portion of memory. It does the absolute minimum amo

Page 108

2 Overview of a BSP2.2 Boot Sequence172This routine must duplicate much of the hardware initialization done by romInit( ) in order to set the run-ti

Page 109

VxWorksBSP Developer’s Guide, 6.0 18 Initializing Interrupt Vectors—The exception vectors must be initialized before enabling interrupts and starting

Page 110 - Generic Driver Introduction

2 Overview of a BSP2.2 Boot Sequence192allocated to the system memory pool, which is managed by memPartLib. All cached dynamic allocations are deriv

Page 111

VxWorksBSP Developer’s Guide, 6.0 20responsible for any board initialization not completed in sysHwInit( ), such as the connection of interrupt sourc

Page 112

2 Overview of a BSP2.3 Components of a BSP212files, a custom usrAppInit.c file, another makefile for use with the project facility, and directories

Page 113

iiiContents1 Introduction ... 11.1 About This Document ...

Page 114

VxWorksBSP Developer’s Guide, 6.0 22The following files, located in target/config/all, may be copied to the BSP directory and modified during BSP dev

Page 115

2 Overview of a BSP2.3 Components of a BSP232vtsLogsStarting with VxWorks 6.0, Wind River recommends, but does not require, that VxWorks validation

Page 116 - One-Shot Timer Examples

VxWorksBSP Developer’s Guide, 6.0 24This file is intended for constant information that is not subject to user configuration. If any macros or values

Page 117 - Non-Volatile Memory

2 Overview of a BSP2.3 Components of a BSP252romInit.s This assembly file contains the romInit( ) routine, which is the entry point for bootstrappin

Page 118

VxWorksBSP Developer’s Guide, 6.0 26sysHwInit2( ). These routines are described in 2.3.4 Required Routines, p.32. Also see the source code in your re

Page 119

2 Overview of a BSP2.3 Components of a BSP272sysSerial.c would identify network interface and serial port drivers, respectively. Some device drivers

Page 120

VxWorksBSP Developer’s Guide, 6.0 28The routine romStart( ) is essentially a loader. It performs the necessary decompression and relocation for the R

Page 121

2 Overview of a BSP2.3 Components of a BSP292#include "sysIOPort.c" This means that the BSP contains a source file sysIOPort.c that does n

Page 122

VxWorksBSP Developer’s Guide, 6.0 30initialized statically during compile time, but it may also be initialized dynamically early in the boot process.

Page 123 - Debugging Your BSP

2 Overview of a BSP2.3 Components of a BSP312The following state values are available:VM_STATE_VALIDVM_STATE_WRITABLEVM_STATE_CACHEABLEVM_STATE_MEM_

Page 124

VxWorksBSP Developer’s Guide, 6.0 ivMakefile ... 23

Page 125

VxWorksBSP Developer’s Guide, 6.0 32sysFlags int sysFlags ; /* boot flags */The sysFlags variable holds the boot flags, which control factors such as

Page 126

2 Overview of a BSP2.3 Components of a BSP332development effort. The following pages describe the initial code for each required routine, and the fi

Page 127 - 4 Debugging Your BSP

VxWorksBSP Developer’s Guide, 6.0 34sysMemTop( ) The sysMemTop( ) routine returns the address of the top of VxWorks memory. During early BSP developm

Page 128

2 Overview of a BSP2.3 Components of a BSP352sysPhysMemTop( ) The sysPhysMemTop( ) routine in sysLib.c returns the address of the top of physical me

Page 129 - 4.2.3 Verifying RAM

VxWorksBSP Developer’s Guide, 6.0 36/**************************************************************************** * * sysModel - return the model nam

Page 130

2 Overview of a BSP2.3 Components of a BSP372supported, this routine returns a pointer to a statically allocated structure. The following is a sampl

Page 131

VxWorksBSP Developer’s Guide, 6.0 38STATUS sysToMonitor ( int startType /* parameter passed to ROM to tell it how to boot */ ) { /* Warm reboot addre

Page 132

2 Overview of a BSP2.3 Components of a BSP3922.3.5 Required Macros BSP macros are defined in either Makefile or config.h, with some macros defined

Page 133 - For example:

VxWorksBSP Developer’s Guide, 6.0 40ROM_WARM_ADRS (Optional. Defined in both Makefile and config.h, or in either)The boot ROM warm boot entry address

Page 134 - 4.3.2 Breakpoints

2 Overview of a BSP2.3 Components of a BSP412These macros must be defined before the configAll.h file is included. Note that BSP_VERSION and BSP_REV

Page 135

ContentsvOn-Chip Debugging (OCD) Devices ... 45Logic Analyzer ...

Page 136

VxWorksBSP Developer’s Guide, 6.0 42boot record. For architecture-specific information, see the appropriate VxWorks Architecture Supplement and the V

Page 137

2 Overview of a BSP2.4 The Development Environment432linked with the boot ROM image. For more information, see the memory controller section of the

Page 138

VxWorksBSP Developer’s Guide, 6.0 44directories; each library file contains object modules for individual components. In VxWorks 6.0, processor varia

Page 139 - Common Development Issues

2 Overview of a BSP2.4 The Development Environment452Native Debug ROMs In some cases, the board manufacturer provides flash software that can be use

Page 140 - Image Locations

VxWorksBSP Developer’s Guide, 6.0 46During development, the OCD is used like a standard software debugger—that is, it is used to trace and modify pro

Page 141 - A.3 Cache and MMU

2 Overview of a BSP2.4 The Development Environment472An in-circuit emulator provides all the advantages of an on-chip debugging (OCD) device and may

Page 142 - Timing Issues

VxWorksBSP Developer’s Guide, 6.0 48selected parts of the OS (such as individual tasks), without affecting the rest of the system. Because the Wind

Page 143 - A.5 Volatile Variables

2 Overview of a BSP2.4 The Development Environment492 It must be able to generate code that works with the debugger, if any, that is to be used for

Page 144

VxWorksBSP Developer’s Guide, 6.0 50 Use a ROM emulator (such as NetROM from AMC). The drawback of this approach is that it can take time for you to

Page 145 - Documentation Guidelines

2 Overview of a BSP2.5 Avoiding Common Problems512For example, the routine sysPhysMemTop( ) indicates the highest addressable memory present on the

Page 146 - B.2 Written Style

VxWorksBSP Developer’s Guide, 6.0 vi3.3.2 Projects ...

Page 147 - Use... Not

VxWorksBSP Developer’s Guide, 6.0 52Modified Drivers Located in the Wrong Directory BSP writers frequently modify Wind River device drivers, as well

Page 148

2 Overview of a BSP2.5 Avoiding Common Problems532Incorrect example 3:/* WRONG: DO NOT use a magic number in assembly source! */ lis r6, 0 /* load r

Page 149 - B Documentation Guidelines

VxWorksBSP Developer’s Guide, 6.0 54

Page 150

55 3Porting a BSP toCustom Hardware3.1 Introduction 553.2 Getting a Minimal Kernel Running 563.3 Finalizing Your BSP 723.1 Introduction This chapte

Page 151

VxWorksBSP Developer’s Guide, 6.0 565. Complete the BSP. This can include adding support for busses, networking, boot ROMs, SCSI, caches, MMU initial

Page 152 - Acronyms

3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running573in romInit( ). The selection of processor registers that must be set early

Page 153 - Board Names

VxWorksBSP Developer’s Guide, 6.0 58On a well-designed board, the LEDs are addressable without having too many processor or board registers configure

Page 154 - NAME Section

3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running593* Write to LED. */ BSCR_LED_REGISTER = sysLed; } /*************************

Page 155

VxWorksBSP Developer’s Guide, 6.0 60/*********************************************************************** * * sysLedControl - Turn selected LED(s)

Page 156

3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running613are provided in 2.2 Boot Sequence, p.7. This section reviews the steps of t

Page 157

Contentsvii4.2.3 Verifying RAM ... 121Runtime Execution ...

Page 158

VxWorksBSP Developer’s Guide, 6.0 62After the copy action, verify that the data segment is properly initialized. For example:int thisVal = 17; /* som

Page 159

3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running633Console Output Routines In addition to the LED routines described above, it

Page 160

VxWorksBSP Developer’s Guide, 6.0 64Copying Additional Code From the Reference BSP If you followed the guidelines provided in earlier sections, your

Page 161 - B.4 Sections for target.ref

3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running653Initializing All Image Types The remainder of the initialization code is co

Page 162

VxWorksBSP Developer’s Guide, 6.0 66mistake in BSP development is the failure to ensure that all interrupt sources are quiescent prior to enabling in

Page 163 - B.5 Format and Style

3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running673ROM as early as possible and thus save download cycles. In this case, start

Page 164

VxWorksBSP Developer’s Guide, 6.0 68void (*myHwInit2Hook)(void); /* declare a hook routine */ ... void sysHwInit2 (void) { if (myHwInit2Hook != NULL)

Page 165

3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running6933.2.6 Building and Downloading VxWorks The VxWorks image you load to the t

Page 166 - Ta b le B -5 Apigen Markup

VxWorksBSP Developer’s Guide, 6.0 703.2.7 Interrupt Controllers The generic interrupt controller device drivers reside in the directory target/src/d

Page 167

3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running713do is to perform board-specific hardware initialization in sysHwInit( ) and

Page 168

VxWorksBSP Developer’s Guide, 6.0 viiiPunctuation and Spelling ... 158Headings .

Page 169

VxWorksBSP Developer’s Guide, 6.0 72compatibility, these drivers are available in target/src/drv/serial. However, no new development should be done w

Page 170 - Component Input Output

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP733However, this file should not be used by default. The file may also be commented out in

Page 171

VxWorksBSP Developer’s Guide, 6.0 743.3.4 NVRAM VxWorks defines an interface for reading and writing to a persistent storage area. This interface is

Page 172

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP7533.3.5 Cache, MMU, and DMA Devices The next step in the BSP development process is to ge

Page 173

VxWorksBSP Developer’s Guide, 6.0 76For L2 cache support, the following routines must be supplied and added to sysCache.c:For cache lock support, the

Page 174 - Board Diagrams

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP773The L2 cache initialization routine sysL2CacheInit( ) should be called from sysHwInit( )

Page 175 - B.6 Directives

VxWorksBSP Developer’s Guide, 6.0 78sysPciAutoConfig( ) routine (located in sysBusPci.c) that makes a call to pciAutoCfg( ). If PCI autoconfiguration

Page 176 - Directive Name Usage

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP793In addition, PCI support requires routines for low-level reads and writes to the PCI con

Page 177

VxWorksBSP Developer’s Guide, 6.0 80The modern interface to the PCI autoconfiguration library, starting with VxWorks 5.5, uses an initialization rout

Page 178 - \IMAGE images/switches.gif

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP813PCI_FBB_ENABLE and PCI_FBB_DISABLE enable and disable the routines that check fast back-

Page 179

1 1Introduction1.1 About This Document 11.2 The Board Support Package 21.3 BSP Development Process 31.4 Terminology 41.1 About This Document This d

Page 180

VxWorksBSP Developer’s Guide, 6.0 82The default value of the MAX_LAT routine is NULL. Unless the MAX_LAT routine is changed, MAX_LAT values are set a

Page 181

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP833Bus Numbering During autoconfiguration, the library maintains a counter with the highest

Page 182 - (apigen or refgen -mg)

VxWorksBSP Developer’s Guide, 6.0 84Base Addressing 32-Bit Memory Space Address Register (Prefetchable) PCI_MEM32_LOC_SET This routine sets the base

Page 183

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP853 PCI_MEMIO32_SIZE_SET This routine sets the maximum size memory chunk allowable for the

Page 184

VxWorksBSP Developer’s Guide, 6.0 86 PCI_IO16_LOC_SET This routine sets the base address of the PCI 16-bit I/O space. This is an alternative to setti

Page 185

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP873This routine can use any combination of this input data to ascertain any special initial

Page 186

VxWorksBSP Developer’s Guide, 6.0 88The default value is NULL, so that no roll call delay is introduced before PCI configuration. Optional PCI Routin

Page 187

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP893PCI_INT_ASSIGN_FUNC_SET This interrupt assignment routine is specified by assigning a fu

Page 188

VxWorksBSP Developer’s Guide, 6.0 90Example 3-1 Basic PCI Configuration /* sysBusPci.c - configure PCI bus for hypothetical BSP */ /* forward declara

Page 189

3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP913pciAutoCfgCtl(pCookie, PCI_FBB_ENABLE, (void *)NULL); return; } /***********************

Comments to this Manuals

No comments