VxWorks博客文章(摘录)

6 篇文章 15 订阅 ¥99.90 ¥99.00

VxWorks基础知识

VxWorks是啥?

关于实时

关于硬实时

BSP是啥

Task是啥?

RTP是啥?

RTP之启动

Utility之APP自启动

Component之Kernel Shell的命令

Boot之bootrom启动顺序

   加载vxWorks的boot loader有很多种,最常见的就是使用BSP编译的bootrom

它在Target里的执行顺序如下

  • romInit() - $(BSP)/romInit.s,这是bootrom的启动地址,它在ROM(例如Flash、硬盘)中执行最小的初始化,包括:初始化CPU、关中断、清Cache、初始化romStart()的栈STACK_SAVE、调用romStart()

  • romStart() - config/all/bootInit.c,这是bootrom的第一条C指令,它将bootrom镜像中未压缩的文本段与数据段从ROM复制到RAM的RAM_LOW_ADRS,然后将RAM中未占用的空间清零,将bootrom的剩余压缩部分解压到RAM的RAM_HIGH_ADRS,最后跳转到这个RAM_HIGH_ADRS处的usrEntry()执行

  • usrEntry() - config/all/usrEntry.c,RAM中的第一条指令,它的唯一功能就是调用usrInit()

  • usrInit() - config/all/usrConfig.c,主要工作包括:将BSS清零、初始化Cache库、设置中断向量表基址、安装异常向量、调用sysHwInit()、使能Cache、调用usrKernelCorePreInit()初始化Class、对象、信号量等、初始化wdb、调用usrKernelInit()

    • usrKernelInit() - comps/src/usrKernel.c,配置内核使用的数据结构,包括初始化内核的Task库、配置调度策略、初始化Tick队列、初始化wind work队列、记录系统内存池尺寸、调用kernelInit()初始化内

    • kernelInit() - src/wind/kernelLib.c,初始化并启动内核,包括设置中断栈尺寸、设置内存池位置、初始化中断lock-out等级、关闭时间片轮转策略、将系统Tick清零、初始化中断栈、初始化并启动第一个任务tRootTask

  • usrRoot() - config/all/usrConfig.c,这就是系统第一个任务的入口地址,主要负责post-kernel的初始化,逐步加载系统服务,它内部同样由大量初始化函数组成

    • usrKernelCoreInit() - src/config/usrKernelCore.c,初始化内核的一些机制,包括Event、信号量的open机制、消息队列及open机制、看门狗、任务的open机制等

    • memInit() - src/os/mm/memLib.c,初始化系统内存池

    • usrMmuInit() - comps/src/usrMmuInit.c,初始化MMU

    • usrKernelCreateInit() - src/config/usrKernelCore.c,初始化内核对象的creation机制,例如任务、消息队列、看门狗

    • sysClkConnect() - src/drv/timer/xxxTimer.c,挂接系统时钟ISR,调用sysHwInit2()

    • sysHwInit2() - $(BSP)/sysLib.c,挂接中断,配置其它附加信息

    • iosInit() - src/os/io/iosLib.c,初始化IO系统

    • tyLibInit() - src/os/io/tyLib.c,初始化TTY库

    • ttyDrv() - src/os/io/ttyDrv.c,初始化TTY驱动

    • ttyDevCreate - src/os/io/ttyDrv.c,创建TTY设备

    • 初始化其它机制,例如任务级job机制、message logging库、管道驱动、标准IO库、ERF(Event Reporting Framework)库、设备管理、文件系统相关机制、pty(pseudo-terminal)驱动、存储设备加载、Boot Line解析等

    • bootAppShellInit() - src/boot/bootAppShell.c,初始化Boot Shell

    • Boot方式的初始化,例如文件系统、网络

    • bootApp() - src/boot/bootApp.c,启动Boot Loader主任务bootApp

  • bootAppTask() - src/boot/bootApp.c,bootApp的入口地址。它默认先等待7秒,如果Boot Shell接收到命令,则解析执行;如果7秒倒计时结束,则按照Boot Line将vxWorks镜像加载到RAM_LOW_ADRS,然后跳转到这个地址开始执行vxWorks

Boot之VxWorks的镜像类型

Boot之vxWorks启动顺序

Tool之VIP

Tool之DKM

Tool之Debugger

Vx7之VmWare

Vx7之VirtualBox

Component之netstat

Component之抓包工具

Component之Spy

C语言之关键字static

UGL之HelloWorld

UGL之绘制多边形

Net之UDP极简编程

Net之TCP极简编程

Net之MultiCast极简编程

Net之SCTP极简编程

Net之TFTP

Net之NFS

Task之消息队列

Component之CMD的0x10x10个命令

命令简介
adrsp               Display information  on the address space.
alias               Add an alias or  display alias
arp                 IPNET arp control
bp                  Display, set or unset  a breakpoint
C                   Switch to C  interpreter
cd                  Change current  directory.
cpu                 Set/Get CPU affinity
date                Show/Set current date
demangle            Display demangled  string
dprintf             Insert a dynamic  printf eventpoint
echo                Display a line of  text
echoclient          TCP/UDP echo client
echoserver          TCP/UDP echo server
edr clear           Clear ED&R log
edr show            Display ED&R log
edr show  boot       Display ED&R  records caused by a boot
edr show  fatal      Display fatal records  from the ED&R log
edr show  info       Display information  records from the ED&R log
edr show  init       Display ED&R  records caused by initialization
edr show  interrupt  Display ED&R  records caused by an interrupt
edr show  kernel     Display ED&R  records created at the kernel-level
edr show  reboot     Display ED&R  records caused by a reboot
edr show  rtp        Display ED&R  records created by the RTP system
edr show  user       Display ED&R  records created at the user-level
exit                Exit the shell  session.
expr                Evaluate expressions
file  concat         Concatenate and  display files.
file copy           Copy files and  directories.
file  create         Create files or  directories.
file list           List the files in a  directory.
file move           Move (rename) files.
file  remove         Remove files or  directories.
ftp                 FTP client
func call           Call a given routine  with parameters.
getenv              Get an environment  variable
history  load        Load an history file  into the current shell session.
history  save        Save the current  shell session history.
ifconfig            IPNET interface  configuration
ipd                 ipd - Interpeak  daemon control
ipversion           Show interpeak  product versions
logout              Logout the shell  session.
lookup              Lookup a symbol
mem                 Memory debug tool
mem block  list      Display information  on allocated blocks.
mem block  mark      Mark allocated  blocks.
mem block  unmark    Unmark allocated  blocks.
mem dump            Display memory
mem info            Display memory  information
mem list            Disassemble and  display a specified number of instructions
mem  modify          Modify memory values
mem part  list       Display information  on memory partition instrumentation.
mem queue  flush     Flush the free queue.
mem rtp block  list  Display information  on allocated blocks.
mem rtp block  mark  Mark allocated  blocks.
mem rtp block  unmarkUnmark allocated  blocks.
mem rtp part  list   Display information  on memory partition instrumentation.
mib2                Print MIB-2  statistics
mmap list           Display information  on memory mapped objects.
module              Display the current  status for all the loaded modules
module  info         Display complete  information for a loaded module
module  load         Load an object module  into kernel memory
module  unload       Unload an object  module from kernel memory
more                Browse and page  through a text file.
netstat             IPNET socket and  route stats
nslookup            Query Internet name  servers interactively
object  handle       Display the object Id  for an object handle.
object  info         Display information  on specified objects.
pcap                Packet capture  utility
ping                IPNET ping utility
pppconfig           ppp config
print  errno         Print a errno value
printf              Write formatted  output
pwd                 Display current  working directory.
qc                  IPNET output queue  configuration
qos                 IPNET Quality of  Service configuration
reboot              Reboot the system
repeat              Repeat a command
ripctrl             RIP daemon control
route               IPNET route table  control
rtp                 Display process list.
rtp  attach          Attach the shell  session to a process.
rtp  background      Run the current or  specified process in the shell background.
rtp  continue        Continue a process.
rtp  delete          Delete a process.
rtp  detach          Detach the shell  session from a process
rtp exec            Execute a process.
rtp  foreground      Bring the current or  specified process into the shell foreground.
rtp hooks           Display the list of  RTP hooks in the system.
rtp info            Display process  information.
rtp list            Display the list of  RTPs in the system.
rtp  meminfo         Display memory  information for a process.
rtp shl             Display the list of  shared libraries in the process.
rtp stop            Stop a RTP.
rtp symbols  add     Add symbols to a RTP  symbol table
rtp symbols  overrideOverrides RTP symbol  registration policy
rtp symbols  remove  Removes symbols from  a RTP symbol table
rtp task            Display a process  task list.
sd                  Display information  on shared data regions.
sd info             Display detail  information on shared data regions.
set                 Set the value of a  symbol 
set  bootline        Change the boot line
set  config          Set or display shell  configuration variables
set cwc             Set the current  working context of the shell session
set  deploy          Set or display the  system debug flag.
set env             Set or display shell  environment variables
set  history         Set the size of shell  history.
set  prompt          Set the shell session  prompt
set  symbol          Set the value of a  symbol
setenv              Set an environment  variable
shl                 Display information  on shared libraries.
shl info            Display detail  information on an SHL.
show  bootline       Display the boot line
show  devices        Display all  subsystem-known devices.
show  drivers        Display a list of  system drivers
show fds            Display a list of  file descriptor names in the system.
show  history        Display the shell  history events.
show  lasterror      Display the last  error value of a command.
slab                Print slab cache  information
sleep               Suspend execution for  an interval.
sockperf            Network performance  test tool
socktest            Socket API test tool
spy                 Begin periodic task  activity reports.
spy  clkstart        Start collecting task  activity data.
spy  clkstop         Stop collecting task  activity data.
spy  report          Display task activity  data.
spy stop            Stop spying and  reporting.
string  free         Free a string  allocated within the kernel shell
syscall  hooks       Display the list  system call hooks.
syscall  monitor     Turn on system call  monitor for all system calls.
syscalls            Display system call  group information in the system.
sysctl              IPNET sysctl  configuration
syslog              syslog
sysvar              System variable tool
task                Display a summary of  each task's TCB
task  continue       Continue from a  breakpoint
task  default        Set or display the  default task
task  delete         Delete a task
task  hooks          Display task hook  functions
task info           Display complete  information from a task's TCB
task regs           Set task register  value
task  resume         Resume a task
task  spawn          Spawn a kernel or an  RTP task with default parameters
task  stack          Display a summary of  each task's stack usage
task step           Single-step a task
task  stepover       Single-step, but step  over a subroutine
task stop           Stop a task
task  suspend        Suspend a task
task  trace          Display a stack trace  of a task
task wait           Display info about  the object a task is pending on
time                Show/Set current time
tip                 Connect to one or  several remote systems over serial lines.
traceroute          Trace route command  for IPv4
ttcp                ttcp - standard  performance test
ttcp1               ttcp - min priority
ttcp7               ttcp - max priority
unalias             Remove an alias
unset  config        Remove a shell  configuration variable
user                User admin command
version             Display VxWorks  version information.
vm  context          Display information  on the virtual memory context.
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值