首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

VxWork BSP 和启动过程 02

VxWork BSP 和启动过程 02

README

BSP发布纪录,版本,总的文档

config.h

包括所有涉及CPU主板的设置及定义(includes,definations),参见 BSP设置文件及生成下载

configNet.h

网络驱动的主要设置文件,主要对END驱动设置.

romInit.s

汇编语言文件,是VxWorks Boot ROM和ROM based image的入口,参见 系统启动部分

sysALib.s

汇编语言文件,程序员可以把自己的汇编函数放在这个文件里,在上层调用.VxWorks image的入口点_sysInit在这个文件里,是在RAM中执行的第一个函数.

sysLib.c

包含一些系统相关的函数例程,提供了一个board-level的接口,VxWorks和应用程序可以以system-indepent的方式生成.这个文件还能包含目录target/config/comps/src的驱动.

sysScsi.c

可选文件用于Scsi设备设置和初始化.

sysSerial.c

可选文件用于所有的串口设置和初始化.

bootrom.hex

ASIC文件包含VxWorks Boot ROM代码

VxWorks

运行在目标机上,完整的,连结后的VxWorks二进制文件.

VxWorks.sym

完全的,连结后带有符号表的VxWorks二进制文件

VxWorks.st

完全的,连结后,standalone,带有符号表的VxWorks二进制文件




BSP用"make"来编译连接生成(Created),而不是用Tornado的工具.

BSP和应用程序都可以在"make"或"tornade"上开发(developed)

BSP被设置包括以下驱动:

中断控制interrupt controller,计时器timer(sys/aux),串口UART(serial),显示屏LCD,键盘Keyboard(opt),触摸屏touch-screen(opt).

前面三个是BSP的主要部分.

BSP默认的download VxWorks RAM image方式是从ethernet.

串口电缆需要用来和开发板(COM1)通信,通过协议WDB.

    VxWorks Image的种类:

Loadable images.

ROM-based images---compressed/uncompressed.

ROM-Resident images.

VxWorks boot images---A VxWorks image designed to load another VxWorks images containing application code (often refer to as "boot code")

"Burned" into ROM or loaded into Flash.

Maybe execute in ROM/Flash (ROM-resident).

Maybe execute out of RAM.

VxWorks images---A VxWorks image containing "end-user" code,Sub-types:

Loadable VxWorks image--VxWorks images loaded by VxWorks boot image.

VxWorks ROM image--VxWorks image "burned" into ROM or loaded into Flash.May execute in Flash.

VxWorks images consist of:

Text segment---executable instruction.

Data segment---Initilized global and static varibles.

BSS.

VxWorks Image文件类型的说明

Uploaded images(通过网口或串口下载到RAM):

vxWorks - basic Tornado, shell 和 symbol table 在主机端
vxWorks.st(文件很大)- 独立的 image,包含shell和 symbol table在目标板运行

ROM based images(直接烧入ROM的VxWorks):

vxWorks_rom - Tornado in ROM,非压缩, 在 RAM 中运行
vxWorks.res_rom_nosym - Tornado in ROM, 非压缩,在 ROM 中运行
vxWorks.st_rom - Stand-alone in ROM, 压缩, RAM 中运行
vxWorks.res_rom - Stand-alone in ROM, 非压缩, ROM 中运行




非BSP make文件中包括:

   include $(TGT_DIR)/h/make/rules.library

include $(TGT_DIR)/h/make/defs.default(define default value for makefile)

...............

BSP make文件中包括: include $(TGT_DIR)/h/make/rules.bsp ...

arm7 做VxWorks imgage 时,在makefile 文件中用 MACH_EXTRA 代替 LIB_EXTRA, 这样生成的VxWorks时不压缩的在ROM中运行的程序(uncompressed ROM-based VxWorks image),否则就是压缩的在RAM中运行的程序(compressed RAM-based VxWorks image).




启动顺序的一些概念

The sequence of events which occur as power-up are a function of type VxWorks image with will run.

处理器"跳"到再ROM或Flash中Boot-strap 程序的起点. 这个程序主要有以下作用:

关闭中断(来自处理器)

初始化目标内存(target memory)

装载要运行的VxWorks image segments

Jumps to code to place target in quiet state

启动顺序 Boot Sequence--Loadable VxWorks image

Bootstrap code executes and loads text and data segments of boot code(from ROM or Flash) into RAM.具体执行如下:

Boot code compressed-Decompression during copy

Boot code uncompressed-copy

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.

Startup Sequence--VxWorks 初始化

做以下工作:

Place hardware environment in a quiet state.

Initalize and start the wind kernel

Spawn a tast to complete system initialization

System initialization task will initialize support for end-user specified facilities,and start the end-user's application
返回列表