龙芯CPU开发系统vxWorks BSP规范_1.02
VxWorks_BSP移植笔记
Amine思创黄金开发板S3C44B0X VxWorks BSP 移植笔记版本 1.0修改历史目录1.介绍51.1目的51.2范围51.3定义和缩写51.4参考51.5声明52.开发环境描述52.1思创黄金开发板S3C44B0X 62.2Tornado 2.2 62.3ARM SDT v2.51 62.4Flash Programmer 63.设计目标74.关键主题74.1异常处理74.1.1问题分析74.1.2解决方法1(eking) 94.1.3解决方法2(d3000) 104.1.4解决方法3 114.1.5其他124.2CPU寄存器124.3仿真和写Flash程序的差别124.4时钟134.5串口驱动134.5.1修改134.5.2FIFO 144.5.3连接Console和target server 144.6缓存[Cache] 154.6.1修改154.6.2测试174.7网络驱动184.7.1修改184.7.2寄存器测试194.7.3网络初始化分离194.8TFFS驱动204.8.1Socket 204.8.2MTD 204.8.3格式化204.8.4加载214.9目标机FTP服务启动214.10boot Shell命令扩展224.11简单VxWorks应用235.详细开发过程245.1建立开发环境245.2选择近似BSP模板245.3让最简bootRom运行起来255.4丰富bootRom功能296.操作说明296.1bootRom启动296.2加载VxWorks 306.2.1TFFS自动加载316.2.2TFFS手动加载316.2.3网络自动加载316.2.4网络手动加载326.3VxWorks 启动337.TIPs 358.TODOs 359.?s 3510.附件3510.1代码目录3610.2映象目录3610.3其他36S3C44B0X VxWorks BSP 移植笔记1. 介绍1.1 目的主要从几个关键主题描述S3C44B0X VxWorks BSP定制工作,对整个过程作了详细描述。
vxworks系统的bsp概念及启动过程
VxWorks 系统的BSP 概念及启动过程乔从连(船舶重工集团公司723所,扬州225001)摘要:VxWorks 作为一个高性能的嵌入式实时操作系统,已经得到了广泛的应用。
介绍了实时操作系统VxWorks 的BSP 的概念及组成,详细分析了VxWorks 系统的初始化流程和启动过程。
关键词:板级支持包;初始化;启动过程中图分类号:TP316.89 文献标识码:B 文章编号:CN3221413(2005)0120061204Concept and Starting Procedure of VxWorks System BSPQ IAO Cong 2lian(The 723Institute of CSIC ,Yangzhou 225001,China )Abstract :As a high 2performance embedded real 2time operating system ,VxWorks has been already applied widely.This paper introduces t he concept and component of VxWorks BSP ,analyses t he initialization flow and starting p rocedure of VxWorks system in detail.K eyw ords :board support package ;initialization ;starting p rocedure0 引 言板级支持包(board support package ,BSP )是介于硬件和操作系统之间的一层,应该说是属于操作系统的一部分,主要目的是为了支持操作系统,使之能够更好地运行于硬件。
在使用嵌入式系统VxWorks 时,有时需要根据硬件平台移植BSP 或者对某一配件的驱动进行开发修改。
vxworks_01_bspOverview
Chapter1OverviewTornado BSP Training Workshop© Copyright Wind River Systems1-1Wind River SystemsOverview1.1Integration IssuesVxWorks Boot SequenceTornado Directory StructureConventions and ValidationTornado BSP Training Workshop© Copyright Wind River Systems1-2Wind River SystemsWhat is a BSP?•Provides VxWorks with primary interface to hardwareenvironment.•BSP Responsibilities:q Hardware initialization on power-up.q Support for VxWorks access to hardware drivers.q Integration of hardware-dependent and hardware-independent software in VxWorks.•Components consist of:q Source, include, and make files.q Derived files.q Binary driver modules.•May be validated to be WRS compliant.Tornado BSP Training Workshop© Copyright Wind River Systems1-3Wind River SystemsWind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-4What a BSP is Not• A BSP is not a hardware driver:q A hardware driver accesses hardware.•Hardware drivers are classified as generic or BSPspecific:qGeneric drivers manage devices which can be moved from one target environment to another (e.g. LAN chip).q BSP drivers manage devices which are specific to thetarget environment (e.g. interrupt controller).•BSP developer responsible for:q Complete support for BSP specific drivers.q Integration of generic device drivers.• A BSP provides support for accessing drivers through VxWorks. This ishow a BSP provides access to the system hardware environment.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-5BSPs and VxWorksHardware-independent SoftwareTools - ApplicationI/O SystemVxWorks Libraries TCP/IP File S ystemMUXHardware-Dependent Software Hardware wind KernelBSP LAN Driver SCSIDriverLAN Controller SCSIControllerSCC TimerBSP Responsibility: HardwareInitialization•VxWorks boot sequence specifics will vary withprocessors and hardware environments.•Common initialization requirements:q Provide code at specific location in memory whichprocessor will jump to on reset or power-up.q Set processor in a specific state.q Initialize memory and memory addressing.q Disable interrupts.q Pass control to additional bootstrapping code.q Load required VxWorks segment(s) into RAM.q Place hardware in quiescent state before initializingVxWorks kernel.Tornado BSP Training Workshop© Copyright Wind River Systems1-6Wind River SystemsWind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-7BSP Responsibility: VxWorks Access To Hardware Drivers•Some driver support is provided by BSP . Examples:qDriver defines ISR(s), but BSP connects ISR(s) to interrupt vector table.qBSP creates structures (objects) which are passed to driver for initialization.q Offset constants and access macros for hardwareregisters provided by BSP and used by driver.•Provides portability for hardware driver code.•Device configuration management:qAccess to full range of device features (possibly at a later time).q Separate development/production configurations.•Example - Portability for LAN driver code would allow developer to:qTransport LAN driver to new hardware environment.q Provide new LAN driver for familiar hardware environment.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-8BSP Responsibility: Integration of Hardware Dependent Software•Provides code flexibility and portability:qCompile-time flexibility.q Run-time portability.•Compile-time flexibility:q Uses preprocessor macros to customize system.q Provides ability to produce optimized modules without changing source code.•Run-time portability:qUses pointers to access routines.qProvides portability for compiled object modules.•Combining techniques allows compile-time macros to implement run-time vectored routines. This is the preferred method at WRS.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-9•Primary BSP files:qSource files.qInclude files.q Make files.•Source files:q Generic code is written in C. Architecture specific and performance optimized code is assembly.•Include files:q All includes and definitions specific to a CPU board are localized in two files.•Make file:q Controls building of all images.•The two BSP specific include files are distinguished by definitions whichare fixed once the physical hardware environment is fixed, anddefinitions which allow configuration of the hardware environment after the physical hardware environment is fixed.•All images are built using a compact primary makefile which accessesmake sub-files.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-10•Derived BSP files are created using:qPrimary BSP files.qDriver source files.q Modules in VxWorks archive libraries.•Derived BSP files are classified as:q Hardware initialization object modules.q VxWorks boot object modules.qVxWorks images.q VxWorks binary symbol table.• A complete BSP port will generate all of these files.•End users will recreate some of these files whenconfiguring the system.•There are two “non-standard” derived BSP files:qIf text segment write protection for VxWorks has been activated,there is an object module to guarantee that text and data do not share a common memory page. This functionality supports VxVMI. If this functionality has not been included this will be a null object module,however, it is still required.q There is an ASCII file derived from an nroff file containing BSPspecific information.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-11BSP Development•Development should occur in incremental steps:qFirst set up development environment (down-load path(s), debug strategies, etc.).qWrite pre-kernel initialization code.qOptionally activate WDB agent and Tornado tools using polled serial or ethernet interface.qStart minimal VxWorks kernel adding support for a system clock, and install interrupts.qComplete BSP providing all necessary support for hardware environment (full network support etc.).q Clean-up, testing and documentation.•Course material will be presented following thissequence as closely as possible.•Pre-kernel Tornado ethernet interface provided by NetROM which willbe discussed later in the course.BSP Development - cont.•Development time may be reduced by purchasing:q The BSP Developer’s Kit.q Appropriate reference BSP.•BSP Developers Kit provides:q A Validation Test Suite (VTS).q Template BSP (all architectures).q Template device drivers.• Purchasing a reference BSP which most closely matches target environment:q Specific device drivers which are not part ofreference BSP can also be purchased from WRS.•Reference BSP obtained when Tornado is purchased.Tornado BSP Training Workshop© Copyright Wind River Systems1-12Wind River SystemsWind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-13BSP Validation•BSP validation:qWRS validated.q Non WRS validated.• A WRS validated BSP:q Classified as Tornado Certified, and may be distributed displaying this information.q Contact WRS to obtain validation requirements.•BSP validation uses a Validation Test Suite (VTS):q Automated test suite which runs on host and target to exercise BSP and report defects.q Included in BSP Developer’s Kit.q VTS distribution includes source to allow extension.•BSP Porting Kit includes:qValidation Test Suite.qBSP Porting Kit Manual.qSample driver source code.q Template BSP files (all architectures).•Optional enhanced features - Engineering Services developmentsupport.OverviewIntegration Issues1.2VxWorks Boot SequenceTornado Directory StructureConventions and ValidationTornado BSP Training Workshop© Copyright Wind River Systems1-14Wind River SystemsWind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-15VxWorks Image Types•There are three classes of VxWorks images:qLoadable images.qROM-based images - compressed/uncompressed.q ROM-Resident images.•Loadable images are loaded into RAM by boot code.qBoot code is “burned” into ROM or Flash.qBoot code is a stand-alone VxWorks application.•ROM-based images load themselves into RAM from ROM or Flash.•ROM-resident images execute out of ROM or Flash.q Only the data segment of the VxWorks image isloaded into RAM.•VxWorks images consist of:qText segment - Executable instructions.qData Segment - Initialized global and static variables.q BSS (Block Started by Symbol) Segment - Un-initialized global andstatic variables. (ANSI C/C++ requires these variables to be initialized to zero.).•These are generic components common to all VxWorks images.Component details will depend on the Object Module Format for the image:qa.out qCOFF q ELF•BSS segments of VxWorks images are zeroed by initialization code afterappropriate image segments are relocated.Some Terminology•VxWorks boot image - A VxWorks image designed toload another VxWorks image containing applicationcode (often referred to as “boot code”).q“Burned” into ROM or loaded into Flash.q May execute in ROM/Flash (ROM-resident).q May execute out of RAM.•VxWorks image - A VxWorks image containing“end-user” code. Sub-types:q Loadable VxWorks image - VxWorks images loadedby VxWorks boot image.q VxWorks ROM image - VxWorks image “burned”into ROM or loaded into Flash. May execute inROM/Flash (ROM-resident) or RAM.Tornado BSP Training Workshop© Copyright Wind River Systems1-16Wind River SystemsVxWorks Startup Sequence•The sequence of events which occur at power-up are afunction of the type of VxWorks image which will run.•The initial phase of the start-up sequence is the sameacross all VxWorks image types.•Processor is “jumped” to the entry point of boot-strapcode in ROM or Flash. This code:q Disables interrupts (via the processor).q Initializes target memory.q Loads appropriate VxWorks image segments.q Jumps to code to place target in a quiet state.•Various startup sequences are discussed next.Tornado BSP Training Workshop© Copyright Wind River Systems1-17Wind River SystemsWind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-18Boot Sequence - Loadable VxWorks Image•Bootstrap code executes and loads text and datasegments of boot code (from ROM or Flash) into RAM.Scenarios are:qBoot code compressed - Decompression during copy qBoot code uncompressed - Copy q Boot code is ROM-resident - Copy data segment only •Boot program executes and loads VxWorks image into RAM. Jumps to VxWorks load point.•System initialization code statically linked into loaded VxWorks image executes and completes initialization.•Memory allocated in RAM for boot code is reclaimed by VxWorks.•VxWorks startup sequence is sometimes referred to as a “boot”sequence.•Image stored in ROM/Flash is a boot-ROM image.•Loaded image will be a “end-user” or “application” image.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-19Loadable VxWorks ImageBootStrapProgramsROM/FlashRAM VxWorksBoot ProgramROMBoot Program RAM_LOW_ADRSRAM_HIGH_ADRSFREE_RAM_ADRS LOCAL_MEM_LOCAL_ADRS •LOCAL_MEM_LOCAL_ADRS is the beginning of RAM.•RAM_LOW_ADRS is the load point for VxWorks. It is also the start of thetext segment of VxWorks.•FREE_RAM_ADRS marks the end of the VxWorks image. Usually thesystem memory pool or the target server memory pool begins here.•RAM_HIGH_ADRS is the load point for the boot program. It is also thestart of the text segment for the boot program unless the boot image is ROM-resident, in which case it is the start of the data segment for the boot module.Startup Sequence - ROM-basedVxWorks Image•Bootstrap code executes and loads text and datasegments of VxWorks (from ROM or Flash) into RAM.Scenarios are:q VxWorks compressed - Decompression during copyq VxWorks uncompressed - Copy•Control transfers to VxWorks initialization code inRAM.•System initialization code statically linked intoVxWorks image executes (in RAM) and completesinitialization.Tornado BSP Training Workshop© Copyright Wind River Systems1-20Wind River SystemsWind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-21ROM-based VxWorks ImageBootStrapProgramsROM/FlashRAM VxWorksRAM_LOW_ADRSFREE_RAM_ADRS ROM-basedVxWorksImage LOCAL_MEM_LOCAL_ADRS •LOCAL_MEM_LOCAL_ADRS is the beginning of RAM.•RAM_LOW_ADRS is the load point for VxWorks. It is also the start of thetext segment of VxWorks.•FREE_RAM_ADRS marks the end of the VxWorks image. Usually thesystem memory pool or the target server memory pool begins here.Startup Sequence - ROM-residentVxWorks Image•Bootstrap code executes and loads data segment ofVxWorks image (from ROM or Flash) into RAM.•Control branches to VxWorks initialization code inROM or Flash.•System initialization code statically linked intoVxWorks image executes (in ROM or Flash) andcompletes initialization.Tornado BSP Training Workshop© Copyright Wind River Systems1-22Wind River SystemsWind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-23ROM-resident VxWorks ImageBootStrapProgramsROM/FlashRAM RAM_LOW_ADRS FREE_RAM_ADRSVxWorks Data + BSS VxWorksTextVxWorksData + BSS LOCAL_MEM_LOCAL_ADRS •LOCAL_MEM_LOCAL_ADRS is the beginning of RAM.•RAM_LOW_ADRS is the load point for VxWorks. It is also the start of thedata segment of VxWorks.•FREE_RAM_ADRS marks the end of the VxWorks image. Usually thesystem memory pool or the target server memory pool begins here.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-24Startup Sequence - VxWorks Initialization•After (“end-user”) VxWorks segment(s) are loaded into RAM, system initialization code statically linked intoVxWorks image executes to complete the bootsequence.•This code will:qPlace hardware environment in a quiet state.qInitialize and start the wind kernel.q Spawn a task to complete system initialization.•System initialization task will initialize support for end-user specified facilities, and start the end-user’sapplication.•Loadable VxWorks images do not assume that they have been loaded by VxWorks boot code, so most initialization performed by boot-strap code must be duplicated in loaded image.•The system initialization task will install drivers and ISRs, create devices, initialize the I/O system, etc. Usually, it will spawn a user application initialization task just before it terminates.•The specifics of a VxWorks boot image will be discussed later in the course.OverviewIntegration IssuesVxWorks Boot Sequence1.3Tornado Directory StructureConventions and ValidationTornado BSP Training Workshop© Copyright Wind River Systems1-25Wind River SystemsWind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-26•Tornado is composed of a set of modular components.•Modularity aids in portability, flexibility of use, andmaintenance.•Tornado modules are:qHost Support Package (HSP).qGeneric (target independent) VxWorks.qArchitecture Module.q Board Support Package.q Wind Debug Agent (WDB Agent).•Tornado modules have been designed to minimizeinterdependence.•The Host Support Package is the host-specific component of Tornado(cross-compiler, dynamic loader, Tornado tools, etc.).•The generic VxWorks component is independent of host or targetenvironments (wind kernel, semaphore libraries, I/O system, etc.).•The architecture module provides support for target processor(s).•The Board Support Package provides support for target hardware.•The WDB agent provides target agency for the host resident Tornadotools. Because it is independent of VxWorks it can be run as task or a “virtual ROM monitor”.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-27GenericVxWorks ArchBSPHSPWDBAgentTornado Modularity and theTornado Directory Tree•Files which make up Tornado are organized to reflectTornado’s component modularity.•At the highest level files (relevant for BSP development) are separated into host and target directories.•All BSP specific files are in the target directory.However, many tools useful in developing a BSP are inthe host directory.•Files which will be modified in developing a BSP are ina configuration sub-directory of the target directory.Tornado BSP Training Workshop© Copyright Wind River Systems1-28Wind River SystemsWind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-29Tornado Directory TreeTornado host share target Tornado host-resident toolsShared XDR codeVxWorks OSBoard supportpackage•The shared XDR code is used in the transfer of data between tools andthe target.•The Tornado directory tree can be installed anywhere that is convenient.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-30Host Directory Treeinclude Header files for Tornado toolshost-os Host-specific toolsbin Tornado and GNU host executableslib Tornado Tool librariesmanGNU man pages resourceGUI, Tcl, and Help support files tclStandard Tcl distribution manUNIX man pages on Tornado tools host src Source for VxColor demo•The directory host-os is named for your host’s hardware and operatingsystem.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-31Target Directory Treeconfig Files to configure and build VxWorksall Generic configuration filesbspName Board Support Package (BSP)hVxWorks header files lib Libraries provided by VxWorksman UNIX man pagessrc Partial VxWorks source codeunsupported Tools, driverstarget •The directory bspName is named for your target’s Board SupportPackage.Wind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-32BSP Relevant Files•All code which executes at power-up is in files withinthe config directory.•BSP code vs. generic driver code:qGeneric device driver code is designed to be usable with multiple BSPs (network drivers, serial drivers,etc.).q BSP (device driver) code is tightly coupled to thetarget environment and is not designed to be used with other BSPs.•BSP specific code will always reside in ../<bspName>.•Generic device driver code not supplied by WRS willreside in the <bspName> directory or a subdirectory of<bspName>.•Generic device driver code supplied by WRS will reside insubdirectories under ../src/drv and ../h/drv .OverviewIntegration IssuesVxWorks Boot SequenceTornado Directory Structure1.4Conventions and ValidationTornado BSP Training Workshop© Copyright Wind River Systems1-33Wind River SystemsWind River Systems Tornado BSP Training Workshop © Copyright Wind River Systems 1-34BSP Conventions and Validation•BSP conventions and validation procedures aredesigned to help guarantee integrity of BSP .•BSP conventions fall into categories:qCoding conventions qDocumentation guidelines.qBSP packaging.q Driver guidelines.•Validation test:q Package validation.q Installation test.q Functional test (VTS).q Code review process and WRS validation process.•Users guide in BSP development kit contains discussion of BSPconventions and validation issues.Summary•BSP responsible for supporting system hardwareenvironment:q Initialization of hardware environment.q VxWorks/application access to hardware drivers.q Hardware/software integration.•Provides VxWorks with primary interface to hardwareenvironment.•Components consist of:q Source, include, and make files.q Derived files.•May be validated to be WRS compliant.Tornado BSP Training Workshop© Copyright Wind River Systems1-35Wind River Systems。
VxWorks操作系统BSP和BootLoader介绍
之前要对板卡上所用的处理器、外围电路和设备一 我们可以通过仿真器 清二楚。在 BSP 调试的前期, 来调试。由于这个时期我们没有更多的手段获取处 理器执行 BSP 代码的情况 ( 包括控制指令执行, 获
另外, 在初始化时, 数据缓存和指令缓存应当被 禁止, 中断应当被禁止。
图1 内核后调试环境
!-1
"#$%&’( 启动过程
首先在上电时在处理器跳转的固定位置( ROM
!
"#$%&’( )*+ 实例
本 章 对 一 个 具 体 的 VxWorks BSP 进 行 讨 论 ,
或 Flash中)固化的代码完成处理器的初始化状态 设置, 初始化内存, 下载 VxWorks 镜像所需驱动程 跳转到 VxWorks 序的初始化, 下载 VxWorks 镜像, 镜像所在入口地址继续执行初始化内核( 见表 2 ) 。
%&!&’
内核前调试环境
下载手段有:
1)目标板上的 ROM 编程; 调试只读存储器) ; 2)目标板的 DEBUG ROM ( 3)ROM 仿真; 。 4)集成调试环境( ICE )
调试工具有:
%
"#$ 的开发方法和过程
由于 BSP 的开发同硬件密切相关, 所以在开发
1)标板 DEBUG ROM ; 2)ICE ; 3)逻辑分析仪; 如发光二极管( 。 4)目标板上设备, LED ) %&!&! 内核后调试环境
基于VxWorks的BSP概念与开发
vxworksbsp:. 基于VxWorks的BSP概念与开发疯狂代码 / ĵ:http://NetworkProgramming/Article33345.html基于VxWorksBSP概念与开发2002年3月B版摘 要:本文以VxWorks操作系统为例阐述了BSP概念和系统启动流程并描述了BSP开发过程关键词:BSP;VxWorks;镜像;boot Rom概述VxWorks操作系统是美国WindRiver公司于1983年设计开发种嵌入式实时操作系统(RTOS)它采用微内核结构具有支持多种处理器丰富网络协议良好兼容性和裁减性等特点同时具有动态链接和下载功能图1 BSP在VxWorks系统中地位图2 压缩可引导镜像启动过程BSP(Board Support Packet——板级支持包)是介于底层硬件和上层软件之间底层软件开发包它主要功能为屏蔽硬件提供操作系统驱动及硬件驱动具体功能包括:·单板硬件化主要是CPU化为整个软件系统提供底层硬件支持;·为操作系统提供设备驱动和系统中断服务;·定制操作系统功能为软件系统提供个实时多任务运行环境;·化操作系统为操作系统正常运行做好准备;BSP在VxWorks系统中地位见图1BSP文件在vxworks/target/config/all和vxworks/target/config/bspname文件夹里其中all文件夹里文件是所有BSP通用文件bspname文件夹文件是用户自己定制BSP文件经过编译、链接并在makefile和depend. bspname等文件控制下原最后将生成镜像VxWorks镜像可分为两类:可下载镜像和可引导镜像·可下载镜像(Loadable Image):实际包括两部分是vxWorks二是boot ROM两部分是独立创建其中boot ROM包括被压缩boot ROM镜像(bootrom)、非压缩boot ROM镜像(bootrom_uncmp)和驻留ROMboot ROM镜像(bootrom_res)三种类型;·可引导镜像(Bootable Image):是将引导和vxWorks融为体镜像它常常是最终产品包括不驻留ROM镜像和驻留ROM镜像两种类型VxWorks系统启动流程般来说所有处理器VxWorks系统启动流程都是相似但有些处理器会有些特殊步骤而另些处理器会跳过几个步骤 下面以CPU为ARM7TDMI为例具体描述(见表1)对于可引导镜像在usrConfig.c文件里执行对于可下载镜像在bootConfig.c文件里执行图2为压缩可引导镜像启动过程图示其中所用到地址说明见表2BSP开发过程建立开发环境主要是以目标板CPUBSP文件为模板在 ornado argetconfig目录下创建用户BSP目录bspname把 ornado argetconfigall下文件和BSP模板文件拷贝到该目录下根据具体情况选择合适VxWorks镜像类型修改模板MakefileMakefile文件控制镜像创建在Makefile文件里使用了将近135个宏最简单Makefile文件要包含以下宏: ·CPU:目标板CPU类型;·TOOL:主机make工具为GNU;·TGT_DIR:target路径默认为$(WIND_BASE)/target;·TARGET_DIR:BSP目录名;·VENDER:目标板生产商名;·BOARD:目标板名;·ROM_TEXT_ADRS:boot ROM入口地址(以16进制表示并且与config.h文件定义相同);·ROM_SIZE:ROM大小;·RAM_LOW_ADRS:加载vxWorks目标地址;·RAM_HIGH_ADRS:boot ROM拷贝到RAM目标地址;·HEX_FLAGS:特殊结构标记用于产生S-记录文件;·MACH_EXTRA:扩展文件用户可以加入自己目标模块;·除此以外Makefile文件还需要包括以下文件:·$(TGT_DIR)/h/make/defs.bsp:Vxworks系统运行标准变量定义;·$(TGT_DIR)/h/make/make.$(CPU)$(TOOL):提供了特别目标机结构和套编译工具如make.ARM7TDMI_Tgnu;·$(TGT_DIR)/h/make/defs.$(WIND_HOST_TYPE):提供了与主机系统有关定义;·rules.bsp:在创建目标文件时所需要规则;·rules. $(WIND_HOST_TYPE):指出创建目标文件时所需从属文件表;·如果没有用all目录下文件而是拷贝到bspname下修改并使用需要定义与这些文件有关宏如BOOTINIT=bootInit.c这样在创建镜像时就不会用all目录下文件而使用bspname目录下相应文件了;·在Makefile文件里凡是16进制数前面都无需加“0x”;bspname.h根据具体目标板设置串行接口、时钟以及I/O设备等在该文件中必须包含以下内容:·中断向量/级别·I/O设备地址·设备寄存器位含义·系统和附加时钟参数(最大和最小速率)config.h根据目标板具体情况配置宏定义注意ROM_TEXT_ADRS、ROM_SIZE、RAM_LOW_ADRS、RAM_HIGH_ADRS要与Makefile文件里定义致LOCAL_MEM_LOCAL_ADRS和LOCAL_MEM_SIZE要正确 romInit.s这是系统上电后运行第个根据具体目标板对寄存器和CPU进行设置;以CPU为ARM7TDMI为例romInit.s 需要进行工作有:·保存启动方式:对于冷启动如果CPU配置是HIGH VECTORS就设置入口地址为0xFFFF0000否则设置入口地址为0x00000000;·屏蔽中断:通过设置cpsrI_BIT和F_BIT都为1来实现还要设置中断寄存器为关模式同时设定运行模式为SVC32模式;·化堆栈指针pc和sp:堆栈指针sp指向STACK_ADRS这个宏定义为当镜像为驻留ROM时该宏值为_sdata当镜像为非驻留ROM时该宏值为_romInit这两个地址经过地址映射后都指向被拷贝镜像在RAM目标地址;·化cache屏蔽cache;·根据具体目标板需要化其他寄存器;·指针跳转到romStart并执行;bootConfig.c般不需要用户修改也可以根据具体情况做适当修改;sysALib.s与romInit.s文件实现功能相似但如果在romInit.s文件里对DRAM和内存控制器进行了化在这里不再进行这项工作;创建VxWorks镜像根据具体需要在命令行环境下利用Makefile创建各种镜像也可以在Tornado集成环境下Build菜单中选择Build Boot ROM来创建各种类型Boot ROM;除此以外如果系统硬件包括串口还要根据具体情况修改sysSerial.c文件;如果包含网络部分要修改configNet.h;如果包含NVRAM要修改bootnv.h文件总之BSP开发要根据具体目标板硬件进行结语我们已经利用基于VxWorksBSP开发包成功进行了线缆调制解调器底层软件开发在开发过程中深感BSP在整个系统软件中重要性——没有正确BSP软件整个系统启动和运行也不会正确另外需要强调是:BSP概念只是针对嵌入式操作系统而言而像DOS、WINDOWS、UNIX等BIOS操作系统是无BSP可言对同目标板而言不同操作系统BSP在本质上是样但是不同操作系统将提供不同支持库另外在BSP结构上也可能会有所不同在做BSP移植时候应该注意■参考文献1. Tornado BSP Developer誷 Kit for VxWorks User誷 GuideTornado2.0Edition 119992. Tornado BSP Developer誷 Kit for VxWorks User誷 GuideTornado 1.0.1Edition 119973. VxWorks Programmer誷 GuidesEdition 11999基于VxWorksBSP概念与开发2002年3月B版摘 要:本文以VxWorks操作系统为例阐述了BSP概念和系统启动流程并描述了BSP开发过程关键词:BSP;VxWorks;镜像;boot Rom概述VxWorks操作系统是美国WindRiver公司于1983年设计开发种嵌入式实时操作系统(RTOS)它采用微内核结构具有支持多种处理器丰富网络协议良好兼容性和裁减性等特点同时具有动态链接和下载功能图1 BSP在VxWorks系统中地位图2 压缩可引导镜像启动过程BSP(Board Support Packet——板级支持包)是介于底层硬件和上层软件之间底层软件开发包它主要功能为屏蔽硬件提供操作系统驱动及硬件驱动具体功能包括:·单板硬件化主要是CPU化为整个软件系统提供底层硬件支持;·为操作系统提供设备驱动和系统中断服务;·定制操作系统功能为软件系统提供个实时多任务运行环境;·化操作系统为操作系统正常运行做好准备;BSP在VxWorks系统中地位见图1BSP文件在vxworks/target/config/all和vxworks/target/config/bspname文件夹里其中all文件夹里文件是所有BSP通用文件bspname文件夹文件是用户自己定制BSP文件经过编译、链接并在makefile和depend. bspname等文件控制下原最后将生成镜像VxWorks镜像可分为两类:可下载镜像和可引导镜像·可下载镜像(Loadable Image):实际包括两部分是vxWorks二是boot ROM两部分是独立创建其中boot ROM包括被压缩boot ROM镜像(bootrom)、非压缩boot ROM镜像(bootrom_uncmp)和驻留ROMboot ROM镜像(bootrom_res)三种类型;·可引导镜像(Bootable Image):是将引导和vxWorks融为体镜像它常常是最终产品包括不驻留ROM镜像和驻留ROM镜像两种类型VxWorks系统启动流程般来说所有处理器VxWorks系统启动流程都是相似但有些处理器会有些特殊步骤而另些处理器会跳过几个步骤 下面以CPU为ARM7TDMI为例具体描述(见表1)对于可引导镜像在usrConfig.c文件里执行对于可下载镜像在bootConfig.c文件里执行图2为压缩可引导镜像启动过程图示其中所用到地址说明见表2BSP开发过程建立开发环境主要是以目标板CPUBSP文件为模板在 ornado argetconfig目录下创建用户BSP目录bspname把 ornado argetconfigall下文件和BSP模板文件拷贝到该目录下根据具体情况选择合适VxWorks镜像类型修改模板MakefileMakefile文件控制镜像创建在Makefile文件里使用了将近135个宏最简单Makefile文件要包含以下宏: ·CPU:目标板CPU类型;·TOOL:主机make工具为GNU;·TGT_DIR:target路径默认为$(WIND_BASE)/target;·TARGET_DIR:BSP目录名;·VENDER:目标板生产商名;·BOARD:目标板名;·ROM_TEXT_ADRS:boot ROM入口地址(以16进制表示并且与config.h文件定义相同);·ROM_SIZE:ROM大小;·RAM_LOW_ADRS:加载vxWorks目标地址;·RAM_HIGH_ADRS:boot ROM拷贝到RAM目标地址;·HEX_FLAGS:特殊结构标记用于产生S-记录文件;·MACH_EXTRA:扩展文件用户可以加入自己目标模块;·除此以外Makefile文件还需要包括以下文件:·$(TGT_DIR)/h/make/defs.bsp:Vxworks系统运行标准变量定义;·$(TGT_DIR)/h/make/make.$(CPU)$(TOOL):提供了特别目标机结构和套编译工具如make.ARM7TDMI_Tgnu;·$(TGT_DIR)/h/make/defs.$(WIND_HOST_TYPE):提供了与主机系统有关定义;·rules.bsp:在创建目标文件时所需要规则;·rules. $(WIND_HOST_TYPE):指出创建目标文件时所需从属文件表;·如果没有用all目录下文件而是拷贝到bspname下修改并使用需要定义与这些文件有关宏如BOOTINIT=bootInit.c这样在创建镜像时就不会用all目录下文件而使用bspname目录下相应文件了;·在Makefile文件里凡是16进制数前面都无需加“0x”;bspname.h根据具体目标板设置串行接口、时钟以及I/O设备等在该文件中必须包含以下内容:·中断向量/级别·I/O设备地址·设备寄存器位含义·系统和附加时钟参数(最大和最小速率)config.h根据目标板具体情况配置宏定义注意ROM_TEXT_ADRS、ROM_SIZE、RAM_LOW_ADRS、RAM_HIGH_ADRS要与Makefile文件里定义致LOCAL_MEM_LOCAL_ADRS和LOCAL_MEM_SIZE要正确 romInit.s这是系统上电后运行第个根据具体目标板对寄存器和CPU进行设置;以CPU为ARM7TDMI为例romInit.s 需要进行工作有:·保存启动方式:对于冷启动如果CPU配置是HIGH VECTORS就设置入口地址为0xFFFF0000否则设置入口地址为0x00000000;·屏蔽中断:通过设置cpsrI_BIT和F_BIT都为1来实现还要设置中断寄存器为关模式同时设定运行模式为SVC32模式;·化堆栈指针pc和sp:堆栈指针sp指向STACK_ADRS这个宏定义为当镜像为驻留ROM时该宏值为_sdata当镜像为非驻留ROM时该宏值为_romInit这两个地址经过地址映射后都指向被拷贝镜像在RAM目标地址;·化cache屏蔽cache;·根据具体目标板需要化其他寄存器;·指针跳转到romStart并执行;bootConfig.c般不需要用户修改也可以根据具体情况做适当修改;sysALib.s与romInit.s文件实现功能相似但如果在romInit.s文件里对DRAM和内存控制器进行了化在这里不再进行这项工作;创建VxWorks镜像根据具体需要在命令行环境下利用Makefile创建各种镜像也可以在Tornado集成环境下Build菜单中选择Build Boot ROM来创建各种类型Boot ROM;除此以外如果系统硬件包括串口还要根据具体情况修改sysSerial.c文件;如果包含网络部分要修改configNet.h;如果包含NVRAM要修改bootnv.h文件总之BSP开发要根据具体目标板硬件进行结语我们已经利用基于VxWorksBSP开发包成功进行了线缆调制解调器底层软件开发在开发过程中深感BSP在整个系统软件中重要性——没有正确BSP软件整个系统启动和运行也不会正确另外需要强调是:BSP概念只是针对嵌入式操作系统而言而像DOS、WINDOWS、UNIX等BIOS操作系统是无BSP可言对同目标板而言不同操作系统BSP在本质上是样但是不同操作系统将提供不同支持库另外在BSP结构上也可能会有所不同在做BSP移植时候应该注意■参考文献1. Tornado BSP Developer誷 Kit for VxWorks User誷 GuideTornado2.0Edition 119992. Tornado BSP Developer誷 Kit for VxWorks User誷 GuideTornado 1.0.1Edition 119973. VxWorks Programmer誷 GuidesEdition 119992008-12-12 15:53:11疯狂代码 /。
VXWORKS BSP调试
支持 tsfs 加载需要修改 config.h
#ifndef INCLUDE_TSFS_BOOT #define INCLUDE_TSFS_BOOT #endif /* TSFS */
#undef NUM_TTY #define NUM_TTY
N_SIO_CHANNELS /* 2 serial ports */
eking 20040416
欲知后事,且听下回分解
44B0x 的 BSP 是如何调成的(1)
工欲善其事, 必先利其器
一. 制作 44B0x 的 VxWorks 的 BSP 需要以下硬件和软件的准备
1. 44B0x 的开发板, 可选择的很多, 这里就不用说了. 2. Tornado IDE 2.0/2.2, 我用的是 2.2, 注意的是 2.2 只能安装在 windows 2K/XP 下, 生成的文件是 el f 格式, 2.0 可以在 98 下安装, 生成的文件是 coff 格式, 2.0 如果补充几个文件, 也可以下载 2.2 生成的 elf 格式 vxworks 3. ICE 或者 wiggler, 我用的是 wiggler, 鱼的 wiggler 就不错,51eda 的板子随板带一个 jtag 小板,简单 jtag, 支持 sdt251,也可以用 4. Source Insight, 编写代码 5. Ultraedit, 查看二进制文件, 运行 bat 文件 6. Beyond Compare, 版本文件比较(修改了文件代码, 突然发现不能工作的时候, 就需要它了) 7. SDT251, 实际上只需要 ADW 8. 2K/xp 下的 jtag.exe, 可以到 51eda 下载 9. 烧写软件 FlashPGM 或者 fluted, FlashP(推荐使用, 不用换线), 使用 FlashPGM+wiggler 烧写速度快,
龙芯CPU开发系统固件与内核接口规范
负 面 影 响和 维 护开 发成 本 。据悉 此 规 范 自 2 0 1 0年 底 就开 始酝 酿 , 由龙 芯 中科 、 昆仑 固件 、 中科 梦 兰 、 中
义 固件 和 内核 之 间的接 口。同时我 们看 到 国 际上针
对 同件 设计 也有 不 同规 范或 标准 , 比如 南 I n t e l 倡导 的U E F 1 规范 , 由I B M的 P o w e r P C上 使用 的 F D T标
是 每种 机器都 需要 制作一 个安 装 系统 ,应用 软 件厂
商 和用 户需要 可单 独升级 固件 和 内核 ,而不 是 必须 同时升 级 。 随着龙 芯芯 片和 板卡种 类不 断增 多 , 这种 矛 盾表 现的 日益突 ,亟 需要 一个 统一 的规 范 来定
级过程 中的兼容性 ,大大提高了龙芯各类硬件产品
龙芯 CP U开发系统固件与内核接口规范
龙 芯 中科 供 稿
近 日, “ 龙芯 C P U开发 系 统 固件 与 内核 接 口规 范” 正 式 作 为企 业 规 范 发布 了 , 龙 芯在 产 业 化 进 程 中又迈 出标 志性 的一步 。这 个规 范能保 证龙 芯 2号 个 人 电脑 系列和 3号 服务器 系列产 品在 今后 系统 升
h) 固件 负 责 完 成桥 片 上 的 P C I / P C I E设 备 和插
F F F F ,规 范 约 定 O x O 0 0 0 — 0 0 0 0~
O x OF FF
_ _
F F F F的低 2 5 6 M B空间为内存空间 ,其 中
—
槽的中断号 申请和路 由,操作系统内核完成中断号
龙芯 1B 开发学习套件 用户手册说明书
1、电源和开关 ..............................................................................................................................7 2、ADC和DAC .................................................................................................................................7 3、串口和 485...............................................................................................................................8 4、Debug调试接口 .......................................................................................................................8 5、CAN接口....................................................................................................................................8 6、DC插座 ......................................................................................................................................9 7、LCD 接口................................................................................................................................10 第二章 LoongIDE集成开发环境 ...............................................................................................................11 第一节 系统安装 ................................................................................................................................11 1、运行环境 ................................................................................................................................11 2、LoongIDE安装.......................................................................................................................11 3、GNU 工具链............................................................................................................................12 4、注意事项 ................................................................................................................................13 第二节 串口控制台 ............................................................................................................................13 第三节 常见问题 ................................................................................................................................14 1、LxLink驱动安装 ...................................................................................................................14 2、引导程序PMON........................................................................................................................15 第四节 编程前准备 ............................................................................................................................16 1、设置默认工作区 ....................................................................................................................16 2、工具链配置 ............................................................................................................................16 3、主机IP地址 ............................................................................................................................17 第三章 设备驱动与编程参考.....................................................................................................................18 第一节 创建项目框架.........................................................................................................................18 1、项目向导 ................................................................................................................................18 2、项目目录与文件 ....................................................................................................................19 第二节 配置BSP..................................................................................................................................20 1、片上设备使用列表 ................................................................................................................20 2、SPI0 总线上的从设备...........................................................................................................21
龙芯1C嵌入式开发板手册说明书
智龙开发板手册——基于龙芯1C的嵌入式开发板版本历史版本日期备注V1.02015-05-30基于智龙V1.0,创建手册V2.02015-10-21结合智龙开发者的经验和龙芯官方1C300B开发板手册编写目录1硬件篇 (7)1.1龙芯1C芯片介绍 (8)1.2智龙开发板介绍 (9)1.3智龙开发板硬件接口 (13)SDRAM控制器 (15)SRAM/NOR FLASH控制器 (15)NAND控制器 (15)时钟发生器 (18)I2S控制器 (19)AC97控制器 (19)LCD控制器 (19)Camera接口 (19)MAC控制器 (19)USB2.0控制器 (20)SPI控制器 (20)I2C控制器 (20)UART控制器 (20)GPIO (21)PWM控制器 (21)RTC (21)CAN控制器 (22)SDIO控制器 (22)ADC控制器 (22)1.4串口调试连接 (22)1.5eJtag调试系统 (27)1.6Flash烧写PMON引导系统 (28)1.7Flash烧写linux系统(附带跑马灯实验) (32)2软件篇 (42)2.2Linux内核裁剪和配置 (44)2.2.1安装图形化配置工具Ncurses (44)2.2.2运行图形化配置界面 (45)2.2.3编译Linux内核 (46)2.2.4开发板各模块驱动源码 (46)2.3配置内核各模块驱动 (48)2.3.1配置网卡驱动 (48)2.3.2配置NFS支持 (51)2.3.3配置UBIFS支持 (54)2.3.4配置串口驱动 (57)2.3.5配置LCD驱动 (59)2.3.6配置按键驱动 (61)2.3.7配置SD卡驱动 (63)2.3.8配置U盘驱动 (65)2.3.9配置USB鼠标和键盘驱动 (68)2.3.10配置USB OTG驱动 (72)2.3.11配置音频驱动 (74)2.3.12配置RTC驱动 (76)2.3.13配置PWM驱动 (78)2.3.14配置红外驱动 (81)2.3.15配置CAN总线驱动 (82)2.3.16配置SPI控制器驱动 (85)2.3.17配置I2C控制器驱动 (87)2.3.18配置ADC驱动 (89)2.3.19配置GPIO驱动 (90)2.3.20配置看门狗驱动 (92)2.3.21配置中星微zc301USB摄像头驱动 (93)2.4Linux、PMON、Rootfs镜像制作 (96)2.5Linux系统的交叉编译环境的搭建 (99)2.5.2新建Ubuntu虚拟机 (101)2.5.3安装Ubuntu系统 (109)2.5.4备份恢复Ubuntu虚拟机 (119)2.6使用Ubuntu12.04 (122)2.6.1Ubuntu终端 (122)2.6.2设置Ubuntu虚拟机网络 (124)2.6.3安装VMware Tools (129)2.6.4更新Ubuntu软件包列表 (131)2.6.5设置Windows和Ubuntu的共享文件夹 (131)2.6.6安装配置minicom串口工具 (133)2.6.7安装配置TFTP服务器 (142)2.6.8安装配置NFS服务器 (146)2.6.9建立交叉编译环境 (149)2.7PMON的配置和编译 (150)2.7.1安装依赖库和编译工具 (150)1连网在线安装 (150)2使用源码包安装 (150)2.7.2配置PMON (152)1配置系统启动方式 (152)2配置串口 (152)2.7.3编译PMON (153)2.8基于linux的根文件系统 (153)2.8.1创建文件系统目录 (153)2.8.2创建系统配置文件 (153)2.8.3拷贝库文件 (156)2.9制作根文件系统镜像 (157)2.9.1安装镜像文件制作工具 (157)2.9.2制作根文件系统镜像文件 (160)2.10基于linux的网络配置 (161)2.11基于linux的交叉编译Helloworld (164)2.12基于linux的Python移植 (170)2.13基于linux的PWM控制LED (171)2.14RT-Thread实时系统移植 (177)2.14基于RTT编写PWM驱动 (177)2.15基于RTT的LED和按键的控制 (177)3应用篇 (177)3.1龙芯wifi小车 (177)3.2英国智龙摩尔电码播放器 (178)3.3俄罗斯方块 (195)3.4智龙连接物联网平台智城云 (200)3.5智龙连接微信公众号 (200)3.63D打印机主板 (200)附录 (200)龙芯1C引脚复用表 (200)Linux常用命令 (200)PMON命令 (200)1硬件篇主要介绍龙芯1C芯片以及智龙开发板相关硬件设计图龙芯1C300A图智龙V2.0开发板1.1龙芯1C芯片介绍龙芯1C300(以下简称1C)芯片是基于LS232处理器核的高性价比单芯片系统,可应用于指纹生物识别、物联传感等领域。
基于Vxworks操作系统的BSP开发
基于Vxworks操作系统的BSP开发
周雪赞;张宏
【期刊名称】《工业控制计算机》
【年(卷),期】2004(17)2
【摘要】本文基于Vxworks操作系统讲述了板级支持包BSP的概念并分析了Vxworks的启动过程,重点介绍了BSP的设计与开发过程.
【总页数】2页(P33-34)
【作者】周雪赞;张宏
【作者单位】浙江大学生仪学院生物医学工程系,310027;浙江大学生仪学院生物医学工程系,310027
【正文语种】中文
【中图分类】TP3
【相关文献】
1.基于S698PM的VxWorks操作系统串口模块应用与开发 [J], 肖文斌
2.基于S698P4的VxWorks操作系统定时器模块应用与开发 [J], 肖文斌
3.基于S698的VxWorks操作系统CAN应用与开发 [J], 骆杰华
4.基于S698 PM处理器的VxWorks操作系统1553B总线模块应用与开发 [J], 沈祖崮;龚永红;许怡冰
5.基于VxWorks操作系统的PCI设备驱动程序开发 [J], 常明志
因版权原因,仅展示原文概要,查看原文内容请购买。
VxWorks系统的BSP设计与实现
VxWorks系统的BSP设计与实现王彦刚;吕遵明;万留进【摘要】BSP(Board Support Packet)是介于硬件和实时操作系统VxWorks之间的底层软件开发包,为VxWorks系统提供了标准的硬件接口函数,保证了VxWorks 系统能够运行在不同的硬件平台上.介绍了BSP的概念,并以嵌入式微处理器MPC8280构成的硬件平台为例详细介绍了BSP的开发过程.%BSP(Board Support Packet) is the software between hardware and VxWorks Real-Time Operation System, which provides VxWorks with standard hardware interface functions and enable it to run on a specific board. This article introduces BSP conception and the process of designing a BSP on the hardware platform based on embedded microprocessor MPC8280.【期刊名称】《计算机系统应用》【年(卷),期】2011(020)012【总页数】4页(P91-94)【关键词】BSP;实时操作系统;嵌入式微处理器【作者】王彦刚;吕遵明;万留进【作者单位】总参第六十三研究所,南京210007;总参第六十三研究所,南京210007;总参第六十三研究所,南京210007【正文语种】中文VxWorks是风河公司推出的业界第一个实时操作系统,它以其良好的可靠性和卓越的实时性被广泛地应用在通信、军事、航空和航天等高精尖技术及实时性要求极高的领域中,如卫星通信、军事演习、弹道指导和飞机导航等,并且在嵌入式领域占有一定的市场份额[1]。
vxWorks的BSP开发
VxWorks的BSP开发➢BSP概述一个成熟的商用操作系统,其被广泛应用的必要条件之一就是能够支持众多的硬件平台,并实现应用程序的硬件无关性。
一般来说,这种无关性都是由操作系统实现的。
但对于嵌入式系统来说,它没有像PC机那样具有广泛使用的各种工业标准,各种嵌入式系统其不同的应用需求就决定了它一般都选用了各自定制的硬件环境,这种诸多变化硬件的环境就决定了无法完全由操作系统来实现上层软件与底层硬件之间的无关性。
因此各种商用实时操作系统,都采用了分层设计的方法,它将系统中与硬件直接相关的一层软件独立出来,称之为Board Support Package即简称BSP。
顾名思义,BSP是针对某个单板而设计的,并且它对于用户(指开发者)也是开放的,用户可以根据不同的硬件需求对其作改动或二次开发,而操作系统本身仅仅提供了CPU内核的无关性。
BSP在系统中的角色,很相似于BIOS在PC系统中的地位。
定义BSP就是为软件操作系统正常运行提供最基本、最原始的硬件操作的软件模块,它和操作系统息息相关,但又不属于操作系统的一部分。
BSP可以分为三大部分:1:系统上电时的硬件初始化。
2:为操作系统访问硬件驱动程序提供支持。
3:集成的硬件相关和硬件无关的操作系统所需的软件模块.BSP的表现形式BSP主要以两种形式来表现:1:源代码(C代码、汇编代码)、系统编译连接依靠文件。
2:二进制的目标代码和目标代码库。
BSP在软件系统中的位置BSP在软件系统中的位置可以用下图来表示,BSP为操作系统和硬件设备的互操作建了一个桥梁,操作系统通过BSP来完成对指定硬件的配置和管理.2 vxWorks系统中的BSP 目录结构BSP软件与其他软件的最大区别在于BSP软件有一整套模板和格式,开发人员必须严格遵守,不允许任意发挥.在BSP软件中,绝大部分文件的文件名和所要完成的功能都是固定的。
所以,BSP软件的开发一般来说都是在一个基本成型的BSP软件上进行修改,以适应不同单板的需求。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
4.1.3 workbench-3.2 ....................................................................................................................................... 5
9 设备驱动模型 ............................................................................................................................................ 7
3 概述 ............................................................................................................................................................ 1
5.1
三方库编译规范 ................................................................................................................................... 5
5.2 BSP 编译规范 ............................................................................................................................................ 5
7 与 CPU 相关的宏定义及使用规范 ............................................................................................................ 6
8 大内存配置规范 ........................................................................................................................................ 6
4.3
工程配置规范 ....................................................................................................................................... 5
5 编译规范 .................................................................................................................................................... 5
4.2 BSP 命名规范 ........................................................................................................................................... 5
9.3
非 vxbus 架构的设备驱动.................................................................................................................... 9
10 中断管理模型 ............................................................................................................................................ 9
9.1 基于 vxbus 架构的设备驱动..................................................................................................................... 7
9.1.1 vxbus 架构驱动框架 ............................................................................................................................ 7
4.1.1 components 目录................................................................................................................................... 4
3.1 vxWorks 系统架构 ..................................................................................................................................... 1
9.1.2 hwconf.c 文件 ....................................................................................................................................... 7
4.1.2 vxworks-6.8 目录.................................................................................................................s 启动过程 ..................................................................................................................................... 3
9.1.3 修改 BSP............................................................................................................................................... 8
4 windRiver workbench 目录结构、BSP 命名及工程配置规范............................................................... 4
4.1 windRiver workbench 目录结构................................................................................................................ 4
i
Q/LS 0022-2015
9.2 vxbus 驱动组件添加.................................................................................................................................. 9
2 术语 ............................................................................................................................................................ 1
8.1
内存容量限制 ....................................................................................................................................... 6
8.2 TLB 页面配置............................................................................................................................................ 7
5.3 vxWorks 基础库编译规范 ......................................................................................................................... 5
6 PMON 功能调用区域保留规范 ................................................................................................................... 5
3.2.1 vxWorks 映像分类................................................................................................................................ 3