RAM 6.0 BUX II Series Guia do Utilizador

Consulte online ou descarregue Guia do Utilizador para Amplificadores áudio RAM 6.0 BUX II Series. RAM 6.0 BUX II Series User`s guide Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 189
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes

Resumo do Conteúdo

Página 1 - BSP DEVELOPER’S GUIDE

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

Página 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

Página 3 - Contents

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

Página 4

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

Página 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

Página 6

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

Página 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

Página 8

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 16 - 2.2.1 Sequence Overview

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

Página 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

Página 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

Página 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

Página 20

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

Página 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

Página 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

Página 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[

Página 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

Página 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

Página 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

Página 27 - TCB) from the top

VxWorksBSP Developer’s Guide, 6.0 114

Página 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

Página 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

Página 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

Página 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

Página 32

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

Página 33

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

Página 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

Página 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

Página 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

Página 37

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

Página 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

Página 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:

Página 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

Página 41

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

Página 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

Página 43

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

Página 44

VxWorksBSP Developer’s Guide, 6.0 130

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 53

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

Página 54

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

Página 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,

Página 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

Página 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

Página 58

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

Página 59

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

Página 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

Página 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

Página 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,

Página 63 - Custom Hardware

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

Página 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

Página 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

Página 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

Página 67

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

Página 68

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

Página 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

Página 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

Página 71

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

Página 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

Página 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

Página 74

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

Página 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

Página 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

Página 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.

Página 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

Página 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

Página 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

Página 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

Página 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

Página 83

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

Página 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

Página 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

Página 86

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

Página 87

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

Página 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

Página 89 - UINT * pArg

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

Página 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

Página 91

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

Página 92

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

Página 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.

Página 94

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

Página 95

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

Página 96

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

Página 97

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

Página 98

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

Página 99

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

Página 100

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 109

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

Página 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

Página 111

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

Página 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

Página 113

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 119

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

Página 120

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

Página 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

Página 122

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

Página 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_

Página 124

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

Página 125

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

Página 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

Página 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

Página 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

Página 129 - 4.2.3 Verifying RAM

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

Página 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

Página 131

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

Página 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

Página 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

Página 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

Página 135

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

Página 136

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

Página 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

Página 138

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 145 - Documentation Guidelines

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

Página 146 - B.2 Written Style

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

Página 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

Página 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

Página 149 - B Documentation Guidelines

VxWorksBSP Developer’s Guide, 6.0 54

Página 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

Página 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

Página 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

Página 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

Página 154 - NAME Section

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

Página 155

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

Página 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

Página 157

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

Página 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

Página 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

Página 160

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

Página 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

Página 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

Página 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

Página 164

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

Página 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

Página 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

Página 167

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

Página 168

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 174 - Board Diagrams

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

Página 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

Página 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

Página 177

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

Página 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-

Página 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

Página 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

Página 181

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 188

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

Página 189

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

Comentários a estes Manuais

Sem comentários