VxWorks

VxWorks基本OS介绍

前提是你 提交于 2019-12-06 12:36:41
这里我就偷点懒,直接复制粘贴文档了。可能会有一些图片无法显示 ,可以直接管我索要文档。 每一个被切换的程序实体就是“任务”。每一个任务都有其自己的上下文——所谓上下文就是指任务在每一次被核心调度时所需要的 CPU环境、系统资源。在上下文的切换过程中,每一个任务的上下文被存在该任务的任务控制块中(TCB )。 ◆ 执行的线程,也就是任务程序计数器; ◆ CPU 寄存器的内容和浮点寄存器中的内容; ◆ 动态变量和程序调用所使用的堆栈; ◆ 标准输入输出的I/O 分配和错误; ◆ 延时计时器; ◆ 时间片计时器; ◆ 核心控制结构; ◆ 信号处理句柄; ◆ 调试和性能监视值。 wind核心中使用了基于优先级抢占式的任务调度策略,但是用户也可以选择优先级轮转调度策略。 1.优先级抢占策略 通过使用优先级抢占策略,每一个任务都会拥有一个优先级,这样内核就会确信将 CPU资源分给了优先级最高的就绪任务。这种方法之所以叫做抢占式的,是指任何运行的任务会被一个变成就绪状态而且优先级更高的任务打断,这时系统会保存当前任务的上下文并立即切换到高优先级的任务上下文,并且开始执行这个任务。在图14.2所示的任务优先级抢占图中给出了优先级抢占的例子,例子中任务t1被优先级较高的任务t2抢占,而更高优先级的任务t3则抢占了t2的执行,当t3执行完后,t2开始继续执行,接下来t1在t2

vxworks 用户开发手册 概述

元气小坏坏 提交于 2019-12-06 12:35:19
Wind River VxWorks Platforms 是一个完善的开发环境,包含了完整的开发工具。当然具体每个工具都有相应的用户操作手册,里面包含了详细的使用介绍。我把相关手册的介绍看了一遍,并总结出每个手册大概讲了什么,方便以后遇到问题的时候知道看什么。 总的来说,手册大概分为以下几类: 1. 综述 。从整体角度出发,讲 vxworks 的开发流程。 2. workbench 3.3 。 workbench 及相关图形化的工具的使用。 3. vxworks 6.9 。 vxworks 操作系统的相关介绍与使用。 4. BSP 与驱动 。设备驱动模型和如何编写 BSP 。 5. 相关网络、安全、管理等组件 。提供了一些通用协议的 API 组件,不需要用户编写,需要时可以直接调用。 6. 编译器 。介绍了 gnu 和 diab 编译器的使用。 综述 Wind River VxWorks Platforms Release Notes 6.9 - 包含主机和目标机最新的支持列表、与老版本的兼容信息、新版本特性的说明、对新版本的附加说明 Wind River VxWorks Platforms User's Guide, 6.9 - 提供对平台全面完整的介绍,包括开发环境、代码编译步骤、通用网络和安全功能、平台架构 Wind River VxWorks Platforms

Redirecting to stdin in order to execute script in vxworks 6.7

房东的猫 提交于 2019-12-06 11:20:28
I need to execute a script in vxWorks 6.7. It can be done with the execute() function in vxworks 5.5. The solution that I am applying is to use stdin redirection as in the following code: newStdIn = open("myScript.txt",O_RDONLY,0644); oldStdIn=ioGlobalStdGet(STD_IN); ioGlobalStdSet(STD_IN, newStdIn); /*Read file here and execute*/ ioGlobalStdSet(STD_IN,oldStdIn); /*Restore old stdIn*/ close(newStdIn); I am missing the read and execute part (where the comment is). EDIT: According to the vxworks kernel programmers guide, the way to execute a script is as follows: fdScript = open ("myScript", O

Mapping a VxWorks image onto RAM (BSP)

痞子三分冷 提交于 2019-12-06 08:13:45
Looking at a BSP package supplied with VxWorks shows the following memory mapping for the image: (from Pentium4) Parameter RAM_HIGH_ADRS { NAME Bootrom Copy region DEFAULT (INCLUDE_BOOT_APP)::(0x00008000) \ 0x00108000 } Parameter RAM_LOW_ADRS { NAME Runtime kernel load address DEFAULT (INCLUDE_BOOT_RAM_IMAGE)::(0x00508000) \ (INCLUDE_BOOT_APP)::(0x00108000) \ 0x00308000 } But this one looks strange to me, how can RAM_LOW_ADRS > RAM_HIGH_ADRS ? Per what I could understand, the boot loader is suppose to be loaded after RAM_HIGH_ADRS and the VxWorks image at RAM_LOW_ADRS, and the boot loader is

Relocation value does not fit in 24 bits

末鹿安然 提交于 2019-12-05 16:13:28
I tried to load a code file to memory using the vxWorks function loadModule and it gave me the error: Relocation value does not fit in 24 bits I tried to add the -mlongcall flag in my compiler but it doesn't work. I have seen this error before working in a PowerPC architecture. Assuming that you are working in a similar environment, the issue has to do specifically with the amount of memory in the system and the range of the relative branch instruction. The Argonne National Labs has a webpage detailing their experiences with the same issue . The following excerpt explains the issue with the

Python3 环境搭建

天涯浪子 提交于 2019-12-05 14:22:53
Python 是一个高层次的结合了解释性、编译性、互动性和面向对象的 脚本 语言。 Python3 可应用于多平台包括 Windows、 Linux 和 Mac OS X。 Unix (Solaris, Linux, FreeBSD, AIX, HP/UX, SunOS, IRIX, 等等。) Win 9x/NT/2000 Macintosh (Intel, PPC, 68K) OS/2 DOS (多个DOS版本) PalmOS Nokia 移动手机 Windows CE Acorn/RISC OS BeOS Amiga VMS/OpenVMS QNX VxWorks Psion Python 同样可以移植到 Java 和 .NET 虚拟机上。 Python3 下载 Python3 最新源码,二进制文档,新闻资讯等可以在 Python 的官网查看到: Python 官网:https://www.python.org/ 你可以在以下链接中下载 Python 的文档,你可以下载 HTML、PDF 和 PostScript 等格式的文档。 Python文档下载地址:https://www.python.org/doc/ Python 安装 Python 已经被移植在许多平台上(经过改动使它能够工作在不同平台上)。 您需要下载适用于您使用平台的二进制代码,然后安装 Python。

VxWin--KUKA Robot操作系统

南笙酒味 提交于 2019-12-05 06:45:20
VxWin是KUKA Robot 操作系统 由Vxworks和Win95 或WinXP构成,采用TCP/IP通讯 其中 VxWorks是一种嵌入式的实时操作系统,所谓嵌入式系统就是用户自己开发设计板子,板子上通常有一颗CPU,VxWorks支持32位的 CPU,包括Intel公司的x86、Motorola公司的68k和PowerPC、MIPS、ARM、Intel公司的i960、Hitachi公司 的SH。我们设计的这块板子通常没有软件的自开发能力,所以我们需要一台通用机来辅助开发,这台通用机可以是PC或工作站,我们称辅助我们软件开发的通用 机为宿主机(Host),用户自己开发的板子为目标机(Target)。宿主机上要有一个集成开发环境(IDE)来辅助我们的软件开发,这套集成开发环境 可以运行在Windows95/NT或 UNIX下,包括交叉编译器(Cross Compiler)和交叉调试器(Cross Debugger),所谓交叉编译器就是在宿主机上编译生成可以在目标机上运行的代码IMAGE,交叉调试器就是通过宿主机和目标机之间的某种耦合方式实 现前后台调试。我们称宿主机上的这套集成开发环境为Tornado,编译生成的目标机上的可执行代码IMAGE为VxWorks。在系统安装的时候,集成 调试环境和VxWorks的原材料(一些obj文件)都安装到宿主机上

How can I cancel a blocked read/recvfrom system call on vxworks or linux

僤鯓⒐⒋嵵緔 提交于 2019-12-04 21:13:30
In TASK I : ... while (1) { if (running == false) break; ret = read(fd, buf, size); /* Or: ret = recvfrom(sock, buf, size, 0, NULL, NULL); */ ... } In task II : ... running = true; /* ioctl(fd, FIOCANCEL, 0); */ close(fd); /* Or: close(sock);*/ what should do in task II to cancel the blocked task I , In vxworks , there is a function, ioctl(fd, FIOCANCEL, 0) to cancel a blocked read or write but it can not work. Probably because the driver can not support "FIOCANCEL" . how to write task II in vxworks and linux? or are there any other way to do my task? Cancelling a read/recvfrom call is

Difference between flat memory model and protected memory model?

懵懂的女人 提交于 2019-12-03 07:58:21
问题 Difference between flat memory model and protected memory model? VxWorks supports flat memory model, Does Linux also supports flat memory model? 回答1: In order to give an answer that makes sense, let's review some concepts first. Most modern processors have a Memory Management Unit (MMU) which is used for a number of purpose. One purpose is to map between the Virtual Address (the one the CPU "sees") and the Physical Address (where the chips are actually connected). This is called address

VxWorks驱动移植至SylixOS总结

霸气de小男生 提交于 2019-12-02 16:43:58
本文档描述了将VxWorks中的驱动源码快速移植至SylixOS中的方法,使用时需要结合SylixOS中的VxWorks兼容层实现。 1. 驱动注册与初始化 1.1 VxWorks中驱动注册与初始化 1.1.1 初始化函数 VxWorks中大部分函数使用了VxWorks的VxBus结构,对于基于VxBus的驱动结构,通常都定义了如下所示的结构体。 LOCAL struct drvBusFuncs xxxDrvFuncs = { xxxInstInit, /* devInstanceInit */ xxxInstInit2, /* devInstanceInit2 */ xxxInstConnect /* devConnect */ }; devInstanceInit在Kernel初始化前被调用,若设备或其一部分被Kernel使用,则相关的初始化实现在该函数中完成。 devInstanceInit2在Kernel初始化后被调用,若无特别要求,初始化都应在此函数中实现。 devInstanceConnect用于设备的连接,通常可以不使用,但如果它依赖于其他设备,则启动代码在其中实现。 1.1.2 中断连接 VxWorks的中断连接在系统配置相关c文件中统一实现。 1.2 SylixOS中驱动注册与初始化 1.2.1 初始化函数 SylixOS中驱动的初始化入口在bspInit